TITLE: $\operatorname{SL}_2(k)$ invariant polynomials in $k[x_1,x_2,y_1,y_2]$
QUESTION [8 upvotes]: Let $k$ be a field and let $\operatorname{SL}_2(k)$ act on $k[x_1,x_2]$ and $k[y_1,y_2]$ in the usual ways.  These actions induce an action on the tensor product $k[x_1,x_2,y_1,y_2]$ that preserves the subspace $k[x_1,x_2,y_1,y_2]_{s,k}$ of polynomials that are homogeneous of degree $s+k$ with total $x_i$ degree $s$ and total $y_i$ degree $k$.  I think these are sometimes said to be of bidegree $(s,k)$, but I'm not entirely sure that's standard terminology.
A computation I've performed in a seemingly unrelated mathematical field has led me to believe that for all $d \geq 0$, there should be a nonzero $\operatorname{SL}_2(k)$-invariant polynomial in $k[x_1,x_2,y_1,y_2]_{d,d}$ that is unique up to scaling.
Question: Assuming I'm right, how can I go about writing this polynomial down explicitly?

REPLY [8 votes]: The polynomial you gave in the comments, $x_1y_2 - y_2 x_1$, after correcting the typo to $x_1 y_2 - x_2 y_1$, is invariant under $\operatorname{SL}_2$.
Proof: It's the determinant of
$$ \begin{pmatrix} x_1 & y_1 \\ x_2 & y_2 \end{pmatrix}$$ and determinants are invariant under left multiplication by matrices of determinant $1$.
It indeed generates the ring of invariants. You can check this using representation theory (bidegree $s, k$ polynomials form the representation $\operatorname{Sym}^s \otimes \operatorname{Sym}^k$ of $\operatorname{SL}_2$, and because $\operatorname{Sym}^j$ is irreducible this has one invariant if $s=k$ and $0$ otherwise) or by observing that any two nonzero matrices with the same determinant are equal up to the action of $\operatorname{SL}_2$.
The same idea can be used to find the $\operatorname{SL}_n$-invariants in the tensor product of $n$ copies of $k[x_1,\dotsc,x_n]$.