Invariant polynomials Let $A\in Mat_{2}(2\times2;\mathbb{R})$and consider the action of the 1-parameter group $e^{tA}$ on $\mathbb{R}^{2}$.
Describe all 1-parameter groups etA which have a nonconstant invariant polynomial. More generally, in each case describe the algebra of all invariant polynomials.
 A: We shall use (without proof)
Lemma. Assume $Q\in\mathbb R[X]$ is a univariate polynomial $c\notin\{\pm1\}$. If $Q(x)=Q(cx)$ for all $x\in\mathbb R$ then $Q$ is constant.
Assume $P$ is a bivariate invariant polynomial for a given $A$.
Consider a few special cases first:
1) Assume $A=\left(\begin{matrix}0&b\\-b&0\end{matrix}\right)$.
Then $e^{tA}=\left(\begin{matrix}\cos bt&\sin bt\\-\sin bt&\cos bt\end{matrix}\right)$ is a rotation and $P(x,y)=x^2+y^2$ is an example of an invariant polynomial.
2) Assume $A=\left(\begin{matrix}a&0\\0&d\end{matrix}\right)$ with $a\ne0$ and $\frac da\in\mathbb Q$, say $d=\frac mn a$ with $m\in\mathbb Z$, $n\in\mathbb N$.
Then $e^{tA}=\left(\begin{matrix}e^{ta}&0\\0&e^{td}\end{matrix}\right)$ and we need $P(x,y) = P(e^{ta}x,e^{td}y)$ for all $x,y,t$. With $t\ne0$ and $c:=e^{\frac {at}n}$ this becomes $P(x,y)=P(c^nx,c^my)$. Thus we see that for $u,v\in\mathbb R$ the univariate polynomial $Q(x)=P(u x^n,v x^m)$ has the property $Q(x)=Q(cx)$ for all $x$. Since $c\ne\pm1$, we see that $Q$ is constant, especially $P(u,v)=P(0,0)$, hence $P$ is constant.
3) Assume $A=\left(\begin{matrix}a&0\\0&d\end{matrix}\right)$ with $a\ne0$ and $\frac da\notin\mathbb Q$.
The monomial $a_{n,m}x^ny^m$ of $P$ becomes $e^{(na+md)t}a_{n,m}x^ny^m$ under the action of $e^{tA}$. Hence whenever $a_{n,m}\ne 0$, we conclude $e^{(na+md)t}=1$ for all $t$, i.e. $na+md=0$. This implies $m=0$ as otherwise $\frac da=\frac{-n}m\in\mathbb Q$. But then also $n=0$ because $a\ne0$. Hence the only nonzero coefficient can be $a_{0,0}$, i.e. $P$ is constant.
4) Assume $A=\left(\begin{matrix}a&1\\0&a\end{matrix}\right)$.
Then $e^{tA} =\left(\begin{matrix}e^{at}&te^{at}\\0&e^{at}\end{matrix}\right) $.
We need $P(x,y)=P((x+ty)e^{at},e^{at}y)$.
If $a=0$, this simply means $P(x,y) = P(x+ty,y)$ and any polynomial not depending on $x$ will do.
Otherwise consider a monomial $a_{n,m}x^ny^m$ in $P$.
Under the action of $e^{tA}$ this contributes $$e^{at}a_{n,m}(x+aty)^ny^m = e^{(n+m)at}a_{n,m}x^ny^m + \text{lower degree in }x$$
Thus if we consider a nonzero monomial with maximal $n$, we conclude $e^{(n+m)at}=1$ for all $t$. Using $a\ne 0$, we conclude $n+m=0$, i.e. $n=m=0$ and finally $P$ is constant.
5) Assume $A=\left(\begin{matrix}a&b\\-b&a\end{matrix}\right)$ with $a\ne0$ and $b\ne0$
Then $e^{tA}=e^{ta}\left(\begin{matrix}\cos bt&\sin bt\\-\sin bt&\cos bt\end{matrix}\right)$.
Especially, for $t=\frac{2\pi}b\ne0$ and $c=e^{ta}$ we can proceed as in case 2, that is we find that $P(x,y) = P(cx,cy)$ and conclude that $P$ is constant, because $c\ne\pm1$ (that is becasue $ta\ne0$).
All other matrices are conjugate to one of the cases above. Note that we end up in case 1) with $b$ arbitrary or case 4) with $a=0$  iff $\operatorname{tr} A=0$ and $\det A\ge 0$.
We conclude that there is a nonconstant invariant polynomial if and only if 
$$\operatorname{tr} A=0,\ \det A\ge 0.$$
