# Commutative matrices of a square matrix

Question: Find the all matrice that commute with $$B=\begin{pmatrix} b & 1 & 0 \\ 0 & b & 1 \\ 0 & 0 & b \end{pmatrix}$$.

My work:

Let $$A=\begin{pmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{pmatrix}$$.

Now from $$AB=BA$$ implies,

$$\begin{pmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{pmatrix} . \begin{pmatrix} b & 1 & 0 \\ 0 & b & 1 \\ 0 & 0 & b \end{pmatrix} =\begin{pmatrix} b & 1 & 0 \\ 0 & b & 1 \\ 0 & 0 & b \end{pmatrix}.\begin{pmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{pmatrix}$$

Then,

$$\begin{pmatrix} a_1b & a_1+bb_1 & b_1+c_1b \\ a_2b & a_2+bb_2 & b_2+c_2b \\ a_3b & a_3+bb_3 & b_3+c_3b\end{pmatrix} =\begin{pmatrix} ba_1+a_2 & bb_1+b_2 & c_1b+c_2 \\ ba_2+a_3 & bb_2+b_3 & c_2b+c_3 \\ ba_3 & bb_3 & bc_3\end{pmatrix}$$

Then, solving this,

$$a_1b= ba_1+a_2 \implies a_2=0$$

$$a_1+bb_1=bb_1+b_2 \implies a_1=b_2$$

$$b_1+c_1b=c_1b+c_2 \implies b_1=c_2$$

$$a_2b=ba_2+a_3 \implies a_3=0$$

$$a_2+bb_2=bb_2+b_3 \implies a_2=b_3$$

$$b_2+c_2b=c_2b+c_3 \implies b_2=c_3$$

$$a_3b=ba_3$$ $$a_3+bb_3= bb_3 \implies a_3=0$$

$$b_3+c_3b= bc_3 \implies b_3=0$$.

Then, I am not sure about following setting. Is it right or wrong?

$$A=\begin{pmatrix} a_1 & b_1 & ? \\ 0 & a_1=b_2 & b_1 \\ 0 & 0 & c_3 \end{pmatrix}$$.

I was wondering if you could help to resolve this issue. I appreciate your time.

• Use the fact that $a_{1} = b_{2} = c_{3}$ and just write $a_{1}$ in all of those places Sep 7, 2019 at 0:44
• $A=\begin{pmatrix} a_1 & b_1 & c_1 \\ 0 & a_1 & b_1 \\ 0 & 0 & a_1 \end{pmatrix}$ Is it correct now? Sep 7, 2019 at 1:00
• You can simplify the equations that you have to solve quite a bit by writing $B=bI+N$, so that $AB-BA=AN-NA$. This allows you to set $b=0$, which will simplify most of the terms. Or, you can use Will Jagy’s answer to find $A$ fairly directly, since $N^2$ has a particularly simple form. After computing it, you should be able to spot that $I$, $N$ and $N^2$ are linearly independent.
– amd
Sep 7, 2019 at 1:01
• @Barsal, that is correct. Note that, if you post a comment but do not start it with an @ sign and a user name, nobody gets informed that you have made a comment. I happened to be checking back here after leaving to view other questions.. Sep 7, 2019 at 1:10
• @WillJagy got it! Thank you so much for your help! Sep 7, 2019 at 1:13

It is automatically true that $$B$$ commutes with any matrix of the form $$xI + y B + z B^2.$$ Note that it is not necessary to consider $$B^3$$ or $$B^4,$$ as these can be absorbed into the given expression.

The nontrivial theorem is that, when the minimal polynomial agrees with the characteristic polynomial, then the only matrices commuting with $$B$$ are those polynomial expressions in $$B.$$ That applies here, the condition is equivalent to this: each eigenvalue occurs in just one Jordan block.

In sum, you are still a little off.

• I guess, I have to find a general matrix that commutes with $B! Sep 7, 2019 at 0:44 • @Barsal my advice is that you carefully calculate$B^2$and then my$xI + y B + z B^2.$You should see some simple relationships among the entries there. Then try your original calculation again, I think you will be able to fix the little problems yourself... Sep 7, 2019 at 0:47 • @Barsal I noticed the new comment by Morgan, and he is completely correct. If you just follow his advice, you should be in good shape. I can tell you that the (1,3) entry really is independent of the others, just put$c_1\$ there Sep 7, 2019 at 0:51

I believe there is a simpler way, a path which makes the calculations easier.

Write $$B$$ in the form

$$B = \begin{bmatrix} b & 1 & 0 \\ 0 & b & 1 \\ 0 & 0 & b \end {bmatrix} = bI + N, \tag 1$$

where

$$N = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end {bmatrix}; \tag 2$$

then

$$AB = BA \tag 3$$

becomes

$$A(bI + N) = (bI + N)A \Longrightarrow bA + AN = bA + NA \Longrightarrow AN = NA; \tag 4$$

with

$$A = \begin{bmatrix} a_1 & a_4 & a_7 \\ a_2 & a_5 & a_8 \\ a_3 & a_6 & a_9 \end {bmatrix}, \tag 5$$

equation

$$AN = NA \tag 6$$

yields

$$\begin{bmatrix} a_1 & a_4 & a_7 \\ a_2 & a_5 & a_8 \\ a_3 & a_6 & a_9 \end {bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end {bmatrix} = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end {bmatrix} \begin{bmatrix} a_1 & a_4 & a_7 \\ a_2 & a_5 & a_8 \\ a_3 & a_6 & a_9 \end {bmatrix}, \tag 7$$

or

$$\begin{bmatrix} 0 & a_1 & a_4 \\ 0 & a_2 & a_5 \\ 0 & a_3 & a_6 \end {bmatrix} = \begin{bmatrix} a_2 & a_5 & a_8 \\ a_3 & a_6 & a_9 \\ 0 & 0 & 0 \end {bmatrix}; \tag 8$$

comparing entries of these two matrices we find

$$a_2 = a_3 = a_6 = 0, \tag 9$$

$$a_1 = a_5 = a_9, \; a_4 = a_8, \tag{10}$$

and $$a_7$$ unconstrained (that is, arbitrary).

Thus we have $$A$$ taking the form

$$A = \begin{bmatrix} a & c & d \\ 0 & a & c \\ 0 & 0 & a \end {bmatrix} = aI + cN + dN^2, \tag{11}$$

for

$$N^2 = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end {bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end {bmatrix} = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end {bmatrix}; \tag{12}$$

again, $$a$$, $$c$$, and $$d$$ may be freely selected. It is evident that matrices of the form (12) commute with $$B$$, since each is a polynomial in $$N$$.

• ! Thank u so much! Sep 7, 2019 at 1:58
• @Barsal: glad to be of assistance, and thanks for the "acceptance". Cheers! Sep 7, 2019 at 2:08