Given that $A=\begin{pmatrix}1 &2\\ 0 &-1\end{pmatrix}$ solve $$XA = AX.$$
Multiplying with inverses from the different sides doesn't seem to do the job.
Given that $A=\begin{pmatrix}1 &2\\ 0 &-1\end{pmatrix}$ solve $$XA = AX.$$
Multiplying with inverses from the different sides doesn't seem to do the job.
Let $$X = \begin{pmatrix} a & b \\ c & d\end{pmatrix}$$ Now, let's consider what conditions $X$ must satisfy such that it commutes: $$\begin{pmatrix} 1 & 2 \\ 0 & -1\end{pmatrix}\begin{pmatrix} a & b \\ c & d\end{pmatrix} = \begin{pmatrix} a & b \\ c & d\end{pmatrix}\begin{pmatrix} 1 & 2 \\ 0 & -1\end{pmatrix}$$ This multplies out to be: $$\begin{pmatrix}a +2c & b+2d \\ -c & -d\end{pmatrix} = \begin{pmatrix}a & 2a-b \\c & 2c-d\end{pmatrix}$$ So, we now have 4 equations that must be satisfied. Some of them, like $c = -c$, easily give us a conclusion (that $c = 0$). After this, we see that $a = a$, and $-d = -d$, so these can be anything. The only other real condition is that $b+2d = 2a-b\implies b = a-d$. So, we have that: $$X = \begin{pmatrix}a & a-d \\ 0 & d\end{pmatrix}$$ Should work for any choice of $a$ and $d$.
As the two (evident) eigenvalues are distinct, it follows that the characteristic polynomial and the minimal polynomial of $A$ coincide. Therefore, the only matrices that commute with $A$ are polynomials in $A$ itself, that is $$ sI + t A = \left( \begin{array}{cc} s + t & 2t \\ 0 & s-t \end{array} \right) $$ It is not necessary to use terms $A^2$ or $A^3$ because of Cayley-Hamilton
See http://math.stackexchange.com/questions/92480/given-a-matrix-is-there-always-another-matrix-which-commutes-with-it/92832#92832 for some background