  Consider the algebra M(n,F) of n x n matrices over an infinite field F of
arbitrary characteristic. An identity for M(n,F) with forms is such a
polynomial in n x n generic matrices and in \sigma_k(x), 0<k\leq n,
coefficients in the characteristic polynomial of monomials in generic matrices,
that is equal to zero matrix. This notion is a characteristic free analogue of
identities for M(n,F) with trace. In 1996 Zubkov established an infinite
generating set for the T-ideal T(n) of identities for M(n,F) with forms.
Namely, for t>n he introduced partial linearizations of \sigma_t and proved
that they together with the well-known free relations and the Cayley--Hamilton
polynomial generate T(n) as a T-ideal. We show that it is enough to take
partial linearizations of \sigma_t for n<t\leq 2n. In particular, the T-ideal
T(n) is finitely based.
  Working over a field of characteristic different from two, we obtain a
similar result for the ideal of identities with forms for the F-algebra
generated by n x n generic and transpose generic matrices.
  These results imply that ideals of identities for the algebras of matrix
GL(n)- and O(n)-invariants are generated by the well-known free relations
together with partial linearizations of \sigma_t for n<t\leq 2n and partial
linearizations of \sigma_{t,r} for n<t+2r\leq 2n, respectively.
