# Find the values of $a$ for which these matrices commute, in $\mathbb{Z}_{23}$

Find the values of $a$ for which these matrices commute, in $\mathbb{Z}_{23}$

$A = \left( \begin{array}{cc} 9 & 22 \\ 18 & a + 3 \end{array} \right) % \ \ \ \ \ B = \left( \begin{array}{cc} 6 & 22 \\ 18 & a \end{array} \right)$

My attempt:

If we calculate $AB$ and $BA$

$AB = \left( \begin{array}{cc} 9\cdot6 + 22\cdot18 & 22\cdot9 + 22\cdot a \\ 18\cdot6 + 18\cdot (a + 3) & 22\cdot18 + a\cdot(a + 3) \end{array} \right)$

$BA = \left( \begin{array}{cc} 9\cdot6 + 22\cdot18 & 22\cdot6 + 22\cdot (a + 3) \\ 18\cdot9 + 18\cdot a & 22\cdot18 + a\cdot(a + 3) \end{array} \right)$

If we compare the two matrices element by element we can see that $AB=BA$ for any value of $a$ in $\mathbb{Z}_{23}$.

Is there something wrong with this? Do I need to reduce something modulo $23$?

You don't really need to do any reduction. Note that $B = A + 3I$. Therefore $$AB = A(A + 3I) = A^2 + 3A = (A + 3I)A = BA.$$
• That is a very nice spot. $+1$. Mar 27, 2017 at 0:08
• Oh, that is amazing, the things I miss... Well, wouldn't it be $A=B+3I$? Mar 27, 2017 at 0:09
• $A,B$ just happen to be related in that way. If this wasn't the case, I would have started exactly how you did - by carrying out the matrix multiplications for both $AB,BA$ and comparing the results entry-wise