Why does (A+B)^2 = A^2+2AB+B^2 not work for matrices?

1 Answer
Feb 19, 2018

Because matrix multiplication is not generally commutative.

Explanation:

Matrix multiplication is associative and distributive over addition, but is not generally commutative.

So:

(A+B)^2 = (A+B)(A+B) = A^2+AB+BA+B^2

In general BA != AB, so this is not the same as:

A^2+2AB+B^2

For example:

((1, 1), (0, 1))((0, 1),(1, 1)) = ((1, 2), (1, 1))

((0, 1),(1, 1))((1, 1), (0, 1)) = ((0, 1), (1, 2))