When are the minimal polynomials of $ST$ and $TS$ not equal for linear operators $T$ and $S$? I am being asked to find a case where $ST$ and $TS$ do not have the same minimal polynomial and its proven difficult.
I know that for any linear operators $T$ and $S$, $ST$ and $TS$ have the same eigenvalues and that if $\lambda$ is an eigenvalue of a linear operator, then it must be a root of the minimal polynomial.
Because of this, I'm assuming that the only difference between their minimal polynomials must be the multiplicity of their roots.
I also know that the minimal polynomial is unique and divides any annihilating polynomial of its respective operator.
Moreover, I was also asked to prove that if at least one of $S$ or $T$ is invertible, then $ST$ and $TS$ have the same minimal polynomial. So, I'm guessing that if I do not want them to have the same minimal polynomial, neither $T$ or $S$ must be invertible. That is, both $ST$ and $TS$ share the eigenvalue $0$.
Despite all of this information at my disposal, I can't seem to construct a situation where the minimal polynomials are different. Apologies if this is a long post; I am just at a loss.

You can easily find $2\times 2$ matrices $S,T$ both of rank $1$ such that $ST=0$ but $TS\neq 0$: you can choose their $1$-dimensional kernels and images at will, so just make sure that the image of $T$ equals the kernel of $S$, but not vice versa. Then the minimal polynomial of $ST$ is $X$, but that of $TS$ is not.
In fact $(TS)^2-TSTS=0$, so $TS$ is nilpotent and its minimal polynomial is $X^2$. This remains so even if $S,T$ were larger square matrices (then not necessarily of rank$~1$).
