I have two matrices: $A = \left( \begin{array}{cc} 1 & a \\ b & 6 \end{array} \right) % \ \ \ \ B = \left( \begin{array}{cc} 4 & c \\ d & 2 \end{array} \right)$. How can I find the values of the parameters $a, b, c, d$ for which the matrices will commute?
I tried calculate $AB$ and $BA$ and compare the matrices elements, but that is not enough to get the result.
I think this have simple solution, but I have difficulties with it.
We have $$AB=\begin{pmatrix} 1&a\\ b&6\\ \end{pmatrix}\begin{pmatrix} 4&c\\ d&2\\ \end{pmatrix}=\begin{pmatrix} 4+ad&c+2a\\ 4b+6d&bc+12 \end{pmatrix}$$ and $$BA=\begin{pmatrix} 4&c\\ d&2\\ \end{pmatrix}\begin{pmatrix} 1&a\\ b&6\\ \end{pmatrix}=\begin{pmatrix} 4+bc&4a+6c\\ d+2b&ad+12 \end{pmatrix}.$$ Hence
\begin{eqnarray} ad&=&bc\\ 0&=&2a+5c\\ 2b+5d&=&0\\ \end{eqnarray}
Thus $a=\frac{-5}{2}c$ and $b=\frac{-5}{2}d$ and thus $\frac{-5}{2}cd=\frac{-5}{2}dc$ is automatic. In other words for all $c,d$ and $a=\frac{-5}{2}c$ and $b=\frac{-5}{2}d$ the matrices commute.
Although the equations you get are not linear, a solution to the linear second and third equation automatically gives a solution to the non-linear equation! That makes this easy.