[Math] Find conditions on a,b,c and d in matrix B that commute with both matrices C and D

linear algebramatrices

I'm having trouble here:

Find conditions on a,b,c, and d such that
B = \begin{bmatrix}a & b\\c & d\\ \end{bmatrix}

commutes with both \begin{bmatrix}1 & 0\\0 & 0\\ \end{bmatrix} and \begin{bmatrix}0 & 0\\0 & 1\\ \end{bmatrix}

I understand that for a matrix to commute AB = BA, but I don't know how to work with two distinct matrices. Would it be setting up four equations like:

\begin{bmatrix} a+0b & 0a+0b\\0c+0d&0c+0d\end{bmatrix} = \begin{bmatrix} a+0c & b+0d\\0a+0c&0b+0d\end{bmatrix}

Sorry about formatting. Very new here.

Best Answer

Let's look at the first matrix first. You get $$\left[\begin{array}{cc} a & b\\c & d\end{array}\right]\left[\begin{array}{cc}1 &0\\0& 0\end{array}\right] = \left[\begin{array}{cc}1 &0\\0& 0\end{array}\right]\left[\begin{array}{cc} a & b\\c & d\end{array}\right]$$ or $$\left[\begin{array}{cc}a &0\\c& 0\end{array}\right]=\left[\begin{array}{cc}a &b\\0& 0\end{array}\right].$$

Since all entries have to match up, we must have $a=a$, $b=0$, $c=0$, and $0=0$. The only informative equations here are $b=0$ and $c=0$.

Now, if you repeat the above for the second matrix, what do you get?