Matrices: Common Mistakes and Fixes (1)

easy 2 min read

Question

If A=(2314)A = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} and B=(1021)B = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}, find ABAB, BABA, and check whether AB=BAAB = BA.

Solution — Step by Step

Row ii of ABAB = (row ii of AA) · (columns of BB).

Entry (1,1)(1,1): 21+32=82 \cdot 1 + 3 \cdot 2 = 8. Entry (1,2)(1,2): 20+31=32 \cdot 0 + 3 \cdot 1 = 3. Entry (2,1)(2,1): 11+42=91 \cdot 1 + 4 \cdot 2 = 9. Entry (2,2)(2,2): 10+41=41 \cdot 0 + 4 \cdot 1 = 4.

AB=(8394)AB = \begin{pmatrix} 8 & 3 \\ 9 & 4 \end{pmatrix}

Entry (1,1)(1,1): 12+01=21 \cdot 2 + 0 \cdot 1 = 2. Entry (1,2)(1,2): 13+04=31 \cdot 3 + 0 \cdot 4 = 3. Entry (2,1)(2,1): 22+11=52 \cdot 2 + 1 \cdot 1 = 5. Entry (2,2)(2,2): 23+14=102 \cdot 3 + 1 \cdot 4 = 10.

BA=(23510)BA = \begin{pmatrix} 2 & 3 \\ 5 & 10 \end{pmatrix}

ABBAAB \ne BA. Matrix multiplication is not commutative in general.

Final answer: AB=(8394)AB = \begin{pmatrix} 8 & 3 \\ 9 & 4 \end{pmatrix}, BA=(23510)BA = \begin{pmatrix} 2 & 3 \\ 5 & 10 \end{pmatrix}, and ABBAAB \ne BA.

Why This Works

Matrix multiplication is row-of-first dotted with column-of-second. Unlike scalar multiplication, the order changes the answer. Special cases where AB=BAAB = BA exist (e.g., diagonal matrices, AA and A1A^{-1}, AA and II), but in general expect non-commutativity.

This is why “matrix algebra” is genuinely different from ordinary algebra — every identity from school like (A+B)2=A2+2AB+B2(A+B)^2 = A^2 + 2AB + B^2 is wrong unless AB=BAAB = BA.

Alternative Method

Use the column-as-linear-combination view: column jj of ABAB equals AA acting on column jj of BB. Sometimes faster when one matrix has many zero columns.

The classic blunder: writing (A+B)2=A2+2AB+B2(A+B)^2 = A^2 + 2AB + B^2. Correct expansion is A2+AB+BA+B2A^2 + AB + BA + B^2. Only equal to the school version when AB=BAAB = BA. Always preserve the order in matrix algebra.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next