# Invariant polynomials under diagonal action of the orthogonal group

Consider the diagonal action of the orthogonal group $O(n)$ on $\mathbb{R}^n\times\mathbb{R}^n$ defined as: $U\cdot (x,y) = (Ux,Uy)$ for $U\in O(n)$ and $x,y\in\mathbb{R}^n$. I am looking for a description of the algebra of polynomials in $\mathbb{R}[x,y]$ that are invariant under this action. That is, the subalgebra of all polynomials $p(x,y)$ such that $$p(Ux,Uy) = p(x,y)\, \quad \forall U\in O(n), \forall x, y\in\mathbb{R}^n.$$

I'll be interested in the generators of this invariant subalgebra, if possible. I have looked at several sources in Classical Invariant Theory but haven't found what I need yet. Any suggestion or references would be greatly appreciated.

The invariants are generated by the quadratic polynomials $(u,u)$, $(u,v)$, and $(v,v)$ where $(.,.)$ is the scalar product defining $O(n)$. This pattern generalizes to arbitrary many copies of $\mathbb R^n$. This is called the first fundamental theorem for the orthogonal group.
Theorem (Theorem 2.9.A) Every orthogonal invariant in vectors $x^1,...,x^m$ in $\mathbb{R}^n$ is expressible in terms of the $m^2$ scalar products $(x^i,x^j)$.