The Misconception: (a + b)² ≠ a² + b² for Matrices
A common mistake in linear algebra is assuming that the formula (a + b)² = a² + b² holds true for matrices. This is incorrect! This formula is only valid for real numbers, not for matrices.
Why the Formula Doesn't Apply to Matrices
The reason lies in the noncommutative nature of matrix multiplication. While multiplication of real numbers is commutative (ab = ba), matrix multiplication is not (AB ≠ BA in general).
Let's break down the issue:
 (a + b)²: This expands to (a + b)(a + b)
 Expanding using distributive property: We get a² + ab + ba + b²
 For matrices: ab and ba are generally not equal, meaning the middle terms do not combine into 2ab.
The Correct Formula for Matrices
The correct formula for the square of the sum of two matrices is:
(a + b)² = a² + ab + ba + b²
This formula accounts for the noncommutative nature of matrix multiplication.
Example
Consider two matrices:

A =
[ 1 2 ] [ 3 4 ] 
B =
[ 5 6 ] [ 7 8 ]
Calculating (A + B)² directly, we get:
(A + B)² =
[ 6 8 ]
[ 10 12 ]
*
[ 6 8 ]
[ 10 12 ]
=
[ 76 100 ]
[ 140 196 ]
Now, let's calculate A² + AB + BA + B²:

A² =
[ 7 10 ] [ 15 22 ] 
AB =
[ 19 22 ] [ 43 50 ] 
BA =
[ 23 34 ] [ 31 46 ] 
B² =
[ 59 70 ] [ 85 100 ]
Adding all these results together, we get:
A² + AB + BA + B² =
[ 76 100 ]
[ 140 196 ]
This matches the result we obtained from calculating (A + B)² directly.
Key Takeaway
The formula (a + b)² = a² + b² does not hold for matrices. Remember to use the correct formula, which includes both ab and ba terms, to account for the noncommutative nature of matrix multiplication.