# Is matrix multiplication commutative for square matrices representing linear transforms?

On several occasions, I have heard that matrix multiplication is commutative for square matrices $A$ and $B$ when they represent linear transformations. Is this true? I know that in general $AB$ is not $BA$ for some matrices $A$ and $B$.

• It's not true even if the matrices are $1\times1$, if the scalar ring is not commutative. Over a commutative ring, I think you know the answer well: matrix multiplication of square matrices of size $n$ is not commutative, unless $n=1$. The classical example is $A=\pmatrix{0&1\\ 0&0}$ and $B=\pmatrix{1&0\\ 0&0}$. This is all about the rules of matrix multiplication. It doesn't matter if the matrices are representations of some linear transformations or not. – user1551 Feb 12 '15 at 9:08

All $n \times n$ square matrices (say, over the field $\mathbb{F}$) can be regarded as linear transformations of an $n$-dimensional vector space $\mathbb{V}$ over $\mathbb{F}$ in a given basis, which allows us to identify $\mathbb{V} \cong \mathbb{F}^n$. In particular, as you note in general $AB$ and $BA$ differ, and hence the answer is no.