# In matrix multiplication, is (A-B)(A+B) = A^2-B^2?

Jul 9, 2015

No, because matrix multiplication is not commutative in general, so

$\left(A - B\right) \left(A + B\right) = {A}^{2} + A B - B A + {B}^{2}$

is not always equal to ${A}^{2} - {B}^{2}$

#### Explanation:

Since matrix multiplication is not commutative in general, take any two matrices $A$, $B$ such that $A B \ne B A$.

Then $A B - B A \ne 0$ so

$\left(A - B\right) \left(A + B\right) = {A}^{2} + A B - B A + {B}^{2} \ne {A}^{2} + {B}^{2}$

For example, let $A = \left(\begin{matrix}1 & 0 \\ 0 & 0\end{matrix}\right)$ and $B = \left(\begin{matrix}0 & 1 \\ 0 & 0\end{matrix}\right)$

Then $A B = \left(\begin{matrix}0 & 1 \\ 0 & 0\end{matrix}\right) = B$, but $B A = \left(\begin{matrix}0 & 0 \\ 0 & 0\end{matrix}\right)$

$\left(A - B\right) \left(A + B\right) = \left(\begin{matrix}1 & - 1 \\ 0 & 0\end{matrix}\right) \left(\begin{matrix}1 & 1 \\ 0 & 0\end{matrix}\right) = \left(\begin{matrix}1 & 1 \\ 0 & 0\end{matrix}\right)$

${A}^{2} - {B}^{2} = \left(\begin{matrix}1 & 0 \\ 0 & 0\end{matrix}\right) - \left(\begin{matrix}0 & 0 \\ 0 & 0\end{matrix}\right) = \left(\begin{matrix}1 & 0 \\ 0 & 0\end{matrix}\right)$