# In matrix multiplication, does ABC=ACB if A, B, and C are nxn matrices?

Oct 24, 2015

In general, no.

Matrix multiplication is associative but not commutative.

#### Explanation:

Let $A = \left(\begin{matrix}1 & 0 \\ 0 & 1\end{matrix}\right)$, $B = \left(\begin{matrix}1 & 1 \\ 0 & 0\end{matrix}\right)$ and $C = \left(\begin{matrix}1 & 0 \\ 1 & 0\end{matrix}\right)$

Then:

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

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

What is true for all $n \times n$ matrices $A$, $B$ and $C$ is:

$\left(A B\right) C = A \left(B C\right)$

That is, matrix multiplication is associative.