# Find All Matrices $B$ that Commutes With a Given Matrix $A$: $AB=BA$

## Problem 272

Let

\[A=\begin{bmatrix}

1 & 3\\

2& 4

\end{bmatrix}.\]
Then

**(a)** Find all matrices

\[B=\begin{bmatrix}

x & y\\

z& w

\end{bmatrix}\]
such that $AB=BA$.

**(b)** Use the results of part (a) to exhibit $2\times 2$ matrices $B$ and $C$ such that

\[AB=BA \text{ and } AC \neq CA.\]

Sponsored Links

Contents

## Solution.

### Find all matrices $B$ such that $AB=BA$

Since we want to find $B$ such that $AB=BA$, we need to find $x, y, z, w$ satisfying

\[\begin{bmatrix}

1 & 3\\

2& 4

\end{bmatrix}\begin{bmatrix}

x & y\\

z& w

\end{bmatrix}=\begin{bmatrix}

x & y\\

z& w

\end{bmatrix}\begin{bmatrix}

1 & 3\\

2& 4

\end{bmatrix}.\]

Comparing entries, we have the following system of linear equations.

\begin{align*}

x+3z&=x+2y\\

y+3w&=3x+4y\\

2x+4z&=z+2w\\

2y+4w&=3z+4w.

\end{align*}

Simplifying this, we obtain

\begin{align*}

2y-3z &=0\\

3x+3y-3w &=0\\

2x+3z-2w &=0\\

2y-3z &=0.

\end{align*}

Note that the first and the last equations are identical. So we omit the first equation from our consideration.

To solve this system, we use the Gauss-Jordan elimination method. Namely we form the augmented matrix of this system and apply elementary row operations as follows.

\begin{align*}

\left[\begin{array}{rrrr|r}

3 & 3 & 0 & -3 &0 \\

2 & 0 & 3 & -2 & 0 \\

0 & 2 & -3 & 0 & 0

\end{array}\right]
\xrightarrow{\frac{1}{3}R_1}

\left[\begin{array}{rrrr|r}

1 & 1 & 0 & -1 &0 \\

2 & 0 & 3 & -2 & 0 \\

0 & 2 & -3 & 0 & 0

\end{array}\right]
\xrightarrow{R_2-2R_1}\\[10pt]
\left[\begin{array}{rrrr|r}

1 & 1 & 0 & -1 &0 \\

0 & -2 & 3 & 0 & 0 \\

0 & 2 & -3 & 0 & 0

\end{array}\right]
\xrightarrow{\substack{R_1+\frac{1}{2}R_2 \\ R_2+R_3}}

\left[\begin{array}{rrrr|r}

1 & 0 & 3/2 & -1 &0 \\

0 & -2 & 3 & 0 & 0 \\

0 & 0 & 0 & 0 & 0

\end{array}\right]\\[10pt]
\xrightarrow{-\frac{1}{2}R_2}

\left[\begin{array}{rrrr|r}

1 & 0 & 3/2 & -1 &0 \\

0 & 1 & -3/2 & 0 & 0 \\

0 & 0 & 0 & 0 & 0

\end{array}\right].

\end{align*}

The last matrix is in reduced row echelon form. From this, we obtain the general solution

\begin{align*}

x&=-\frac{3}{2}z+w\\

y&=\frac{3}{2}z,

\end{align*}

where $z$ and $w$ are free variables.

Therefore the matrix $B$ such that $AB=BA$ must be

\begin{align*}

B&=\begin{bmatrix}

-\frac{3}{2}z+w & \frac{3}{2}z\\

z& w

\end{bmatrix}\\

&=z\begin{bmatrix}

-\frac{3}{2} & \frac{3}{2}\\

1& 0

\end{bmatrix}

+w

\begin{bmatrix}

1 & 0\\

0& 1

\end{bmatrix}

\end{align*}

for any $z$ and $w$.

### (b) Find matrices $B, C$ such that $AB=BA$, $AC\neq CA$

By part (a), if

\[B=z\begin{bmatrix}

-\frac{3}{2} & \frac{3}{2}\\

1& 0

\end{bmatrix}

+w

\begin{bmatrix}

1 & 0\\

0& 1

\end{bmatrix}\]
for some $z, w$, then we have $AB=BA$.

For example, let $z=2, w=0$. Then the matrix

\[B=\begin{bmatrix}

-3 & 3\\

2& 0

\end{bmatrix}\]
satisfies $AB=BA$.

To find a matrix $C$ such that $AC \neq CA$, the matrix $C$ must not be of the form of the formula of $B$.

For example, let

\[C=\begin{bmatrix}

0 & 0\\

1& 0

\end{bmatrix}.\]
You may directly check that $AC\neq CA$.

Or, we can show that $C$ is never be the matrix of the form

\[\begin{bmatrix}

-\frac{3}{2}z+w & \frac{3}{2}z\\

z& w

\end{bmatrix}.\]

To see this, compare $(1,2)$ and $(2,1)$ entries. There is no $z$ such that

\[\frac{3}{2}z=0 \text{ and } z=1.\]
(This is how I found the matrix $C$ as above.)

Add to solve later

Sponsored Links