<s>[INST] Commutative matrices Knowing that $AB=BA$, find the matrices that commute with the matrix
\begin{pmatrix}
  1 & 2 \\
  3 & 4  \\
 \end{pmatrix}
I have assumed that multiplying matrix 
$\begin{pmatrix}
  a & b \\
  c & d \end{pmatrix}
$ by the first one should be equal to multiplying the first one by $\begin{pmatrix}
  a & b \\
  c & d \end{pmatrix}
$
Alright: 
$\begin{pmatrix}
a+2c & b+2d\\
3a+4c & 3b+4d\end{pmatrix}
$
 equals
$\begin{pmatrix}
a+3b & 2a+4b\\
c+3d & 2c+4d\end{pmatrix}
$

so:
$\begin{pmatrix}
a+2c = a+3b => 2c = 3b = 0\\
3a+4c = c +3d => a+c - d=0\\
b+2d = 2a+ 4b => -2a - 3b + 2d = 0\\
3b + 4d = 2c + 4d => 3b - 2c =0\end{pmatrix}
$
I was left with equations from which I have formed another matrix and used Gauss algorithm to evaluate it: 
$\begin{pmatrix} 
1 & 0 & 1 & -1 & 0 \\
-2& -3 &0 &2& 0\\
0 &3 &-2& 0 &0\\
0 &-3& 2& 0 &0\end{pmatrix}
$
I made some changes (r3:=r3+r4; r4:=r4+r3; r2:=r2+2r1) and the upper diagonal matrix is:
$\begin{pmatrix} 
1 & 0 & 1 & -1 & 0 \\
0& -3 &2 &0& 0\\
0 &0 &0& 0 &0\\
0 &0& 0& 0 &0\end{pmatrix}
$

I was left with a set of equations
\begin{eqnarray}
a+ c + d      &=& 0 \\
-3b + 2c &=& 0
\end{eqnarray}
and now I'm stuck. Any help would be highly appreciated! 

EDIT: A is the given matrix. 
 [/INST] You should be left with a little more than two equations. If $$A=\begin{bmatrix}1&2\\3&4\end{bmatrix}$$
and $$B=\begin{bmatrix}a&b\\c&d\end{bmatrix},$$
then $$AB=\begin{bmatrix}a+2c & b+2d\\ 3a+4c & 3b+4d\end{bmatrix}$$
and $$BA=\begin{bmatrix}a+3b & 2a+4b\\ c+3d & 2c+4d\end{bmatrix}$$
which gives you $4$ equations.
</s>