# Find all $2×2$ matrices $Q$ such that $PQ = QP$

The matrix $P$ is given as $\pmatrix{1& -1\\ 2&1}$

The fact that it asked for $2\times 2$ matrices which it implies there are other matrices, confused me. I know that $Q$ may be the identity matrix. I also tried to give $Q$ random unknown letters and equated it in $PQ = QP$ but I did not manage to work it out.

• Two months, five questions asked: time's passed to write mathematics properly in this site. – DonAntonio Apr 22 '17 at 12:43
• Weird that you couldn't work it out: it is a system of four linear equations in four variables. – user228113 Apr 22 '17 at 12:45
• You can see, for instance, here for how to write mathematics on this site. See specifically this paragraph for how to write matrices. – Arthur Apr 22 '17 at 12:48
• In this type of question it's clear that $Q=I$ is one solution, $Q=P$ is another and linear combinations of solutions are solutions so that $Q=aI+bP$ is a solution. The question remains: are these all the solutions? – Lord Shark the Unknown Apr 22 '17 at 12:58
• @DonAntonio Yes I tried that process but I am left with just 2 equations and I got stuck in solving them. I am left with 2b=-c and a=d I am not sure how to continue to get numerical values – Nicole Tabone Apr 22 '17 at 13:04

$$\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}1&\!-1\\2&1\end{pmatrix}=\begin{pmatrix}1&\!-1\\2&1\end{pmatrix}\begin{pmatrix}a&b\\c&d\end{pmatrix}\iff$$
$$\begin{pmatrix}a+2b&-a+b\\c+2d&-c+d\end{pmatrix}=\begin{pmatrix}a-c&b-d\\2a+c&2b+d\end{pmatrix}$$
Now solve the corresponding system of linear equations. For example, taking the $\;1,1\;$ entry, we get
$$2b=-c\;,\;\text{and taking the entry}\;1,2\;:\;\;\;a=d\;,\;\;etc.$$