Invariant polynomials for a product of algebraic groups Let $G_1$ and $G_2$ be connected reductive algebraic groups defined over $\mathbb{C}$ and let $V_1$ and $V_2$ be irreducible representations of $G_1$ and $G_2$ respectively. I'm interested in general techniques for computing the (generators of the) invariant polynomial functions on the representation $V_1 \otimes V_2$ of the group $G_1 \times G_2$. 
In particular, I'm interested in computing a generating set for $\mathbb{C}[V_1 \otimes V_2]^{SO_n \otimes SO_m}$, where $V_1 = \mathbb{C}^n$ and  $V_2 = \mathbb{C}^m$ are the natural modules these special orthogonal groups ($n \geq m >2$). My first guess is to treat $V_1 \otimes V_2$ as a direct sum of $m$ copies of $V_{1}$ and use the first formulation of the Fundamental Theorem for $SO_n$ which gives me a generating set for $\mathbb{C}[V_{1}^{m}]^{SO_n}$ (which all have degree $2$, being the orthogonal contractions $(v,w)$?). But now I'm stuck trying to figure out what structure this algebra has as an $SO_m$-module, and what the degrees of the generators of the invariant polynomial algebra should thus be. 
According to a table in "Some Remarks on Nilpotent Orbits" by V. Kac, $\mathbb{C}[V_1 \otimes V_2]^{SO_n \otimes SO_m}$ should be generated by $m$ invariant polynomials of degrees $2,4,6,...$ 
This seems like it should be a fairly simple exercise, but I'm just going about it the wrong way. 
 A: There is a fruitful way of thinking about the algebra $\mathbb{C}[M_{n,m}]^{{O_n}\times O_m}$ that originates from the $(GL_n, GL_m)$-duality. Namely, 

$$
\mathbb{C}[M_{n,m}]=\bigoplus_{\lambda}V_n^{\lambda}\otimes V_m^{\lambda},
$$

where the sum is over all partitions $\lambda$ with at most $\min(n,m)$ parts and $V_n^\lambda$ is the polynomial representation of $GL_n$ with highest weight $\lambda=(\lambda_1,\lambda_2,\ldots)$ with zeros appended at the end to make it length $n,$ and similarly for $m.$  Now, since $O_n$ is a spherical subgroup of $GL_n$, the space of $O_n$-invariants $V_n^{\lambda}$ is at most one-dimensional; it is non-zero precisely when $\lambda$ is even (i.e. all parts are even). A good source for these results is Roger Howe's Schur Lectures.
It follows that as a vector space, 

$$
\mathbb{C}[M_{n,m}]^{O_n\times O_m}=\bigoplus_{\lambda}(V_n^{\lambda})^{O_n}\otimes (V_m^{\lambda})^{O_m},
$$

and now the sum is over even partitions with the same restriction as before, and every summand is one-dimensional and is spanned by an explicitly described polynomial on $M_{n,m}$. Using standard techniques (described in the Schur lectures), this description can be amplified to yield the algebra structure as well. Namely, the algebra is graded by an affine semigroup of rank $\min(n,m)$ and is freely generated by explicit elements in degrees $2k$ for $1\leq k\leq \min(n,m).$ With a bit of extra work, one can also handle the more general case of $SO_n\times SO_m$ invariants.

Let me connect this description of the invariants with Abdelmalek's description following the path that Neil originally had in mind. Assume for concreteness that $n\geq m.$ The First Fundamental Theorem for $O_n$ in geometric form states that the map
$$
q:M_{n,m}\to Sym_{m,m} \qquad X\mapsto X^{T}X
$$
is the geometric quotient, i.e. it is $O_n$-invariant and gives rise to the isomorphism
$$
\mathbb{C}[M_{n,m}]^{O_n}\simeq \mathbb{C}[Sym_{m,m}].
$$
(The restriction $n\geq m$ assures that the image of $q$, which consists of symmetric matrices of rank at most $\min(n,m),$ is all of $Sym_{m,m}.$)
It is also clearly $GL_m$-equivariant, where $GL_m$ acts on the symmetric matrices of order $m$ by 
$$
Y\to g^T Y g\qquad Y\in Sym_{m,m}, g\in GL_m,
$$
and, a fortiori, $O_m$-invariant. Now pass to the $O_m$-invariants! Under this identification, 

$$
\mathbb{C}[M_{n,m}]^{O_n\times O_m} \simeq \mathbb{C}[Sym_{m,m}]^{O_m}.
$$

Thus the problem is reduced to determination of the orthogonal invariants of a symmetric matrix $Y$. It is well known that this invariant ring is freely generated by the coefficients of the characteristic polynomial of $Y.$ The coefficient of $\lambda^{m-k}$ has degree $k$ in the entries of $Y$ and, up to a sign, it is equal to the sum of the principal minors of $Y=X^T X$ of order $k, 1\leq k\leq m.$ Thus the fundamental invariants have degrees $2k, 1\leq k\leq m,$ in the entries of $X.$ Additionally, it can be verified that the $k$th fundamental invariant corresponds to the summand with $\lambda=(1^k)$ in the direct decomposition of  $\mathbb{C}[M_{n,m}]^{O_n\times O_m}$ coming from the $(GL_n,GL_m)$-duality (i.e. the second highlighted decomposition above).
A: It is best to think of these invariants in terms of pictures but it is hard for me to draw one here.
You are asking about invariant polynomials in variables $X_{a,b}$ with $1\le a\le n$ and
$1\le b\le m$. The invariants are all complete contractions of $X$'s with the following four pieces: $\delta_{a,a'}$ the $n\times n$ Kronecker delta for the $a$'s; $\rho_{b,b'}$ the $m\times m$ Kronecker delta for the $b$'s; $\epsilon_{a_1,\ldots,a_n}$ the completely antisymmetric tensor in the $a$'s normalized so that $\epsilon_{1,2,\ldots,n}=1$ and finally
$\eta_{b_1,\ldots,b_m}$ which is the same thing for the $b$'s.
The rule is you only contract $a$'s with $a$'s and $b$'s with $b$'s. Now you get a lot of graphs in this way. If you only use the Kronecker delta, i.e., $\delta$'s and $\rho$'s
all you can make are cycles: basically traces of powers of $X^T X$.
These must be the invariants in Kac's table.
It turns out that if we now also include the $\epsilon$'s and $\eta$'s then
we can get rid of them almost completely.
For instance if you have two antisymmetric pieces of the same kind, e.g., two $\epsilon$'s,
then it is easy to see that you can trade them for an antisymmetrized sum only involving
$\delta$'s. This is nothing more than the formula $det(AB)=det(A)det(B)$.
So one is reduced to the case of only one $\epsilon$ and one $\eta$.
If you have an $\epsilon$ and say no $\eta$
then you must have a path of $X^TX$'s starting from a leg of that $\epsilon$ and returning
to another leg. This gives zero because it is a contraction of something symmetric against something antisymmetric.
For the remaining case:by the same leg to leg path argument it is easy to see
that starting from a leg of the unique $\epsilon$ one must arrive (after an odd number
of $X$ steps) to a leg of the unique $\eta$ and vice versa.
This can only happen if $n=m$ and the invariant we are considering is in fact
$det(X)$. Your list is missing that one if the dimensions are odd.
In fact even if the dimension is even it is impossible to reduce this determinant
to a polynomial in the invariants from Kac's list.
Take a diagonal $n\times n$ matrix $X$ with eigenvalues $\lambda_1,\ldots,\lambda_n$.
From the basic theory of symmetric polynomials it is easy to see that the even power sums
are not enough to get the determinant.
Conclusion: 
1) The generators are $tr((X^T X)^{p})$ for $p=1,\ldots,m$ when $n>m$
and they are algebraically independent.
2) If $n=m$ one also needs to add $det(X)$.
There is a single relation coming from the trace expansion of
$(det(X))^2=det(X^T X)$.

Edit: I just realized the conclusion is correct but the argument is a bit more complicated.
Indeed in the case with one $\epsilon$ and one $\eta$ one has $n=m$ and several odd paths realizing the connections between the legs of $\epsilon$ and those of $\eta$. The problem is that these paths can have different lengths. But these lengths are all odd and therefore $\ge 1$. One can use the identity
$$\sum_{a_1,\ldots,a_n=1}^{n}
\epsilon_{a_1,\ldots,a_n}\ X_{a_1,b_1}\cdots X_{a_n,b_n}
=det(X)\times \eta_{b_1,\ldots,b_n}$$
to peal off the first layer of $X$'s growing from the $\epsilon$ and thus reduce
to the situation with at least two $\eta$'s.

Edit2: For the statement about no other relation than $(det(X))^2=\ldots$
this can be done easily with symmetric functions of the eigenvalues.
Basically one has to show there are no nonzero polynomials $P$ and $Q$ in the even power sums $p_2,p_4,\ldots$ such that $Q\ e_n=P$ where $e_n$ is the determinant,i.e., the $n$-th
elementary symmetric function. Then write the expansion of $e_n$ in terms of power sums
which contains $p_1^n$ and compare both sides as polynomials in $p_1$ with coefficients
in the ring of polynomials in $p_2,p_3,\ldots,p_n$ .
