[Math] Associative property in matrix multiplication

linear algebra

Does the associative property of matrix multiplication hold when one of the matrices is a permutation matrix?

For example consider the following:

X = [ 1 2 3 ] (a 1*3 matrix)
P = [ 0 1 0;
0 0 1;
1 0 0 ] (a 3 * 3 permutation matrix)
Y = transpose([1 4 2] ) (a 3 * 1 matrix)

Here (XP)Y = 9 and X(PY) = 11…

Can I conclude that the associative property of matrix multiplication holds only when all matrices have been reduced their "static" form after row and column exchanges – which is essentially what happens when you multiply by a permutation matrix?

Best Answer

$XP=[3\ 1\ 2]$ and $(XP)Y=3\cdot1+1\cdot4+2\cdot2=11$.

Like Igor said, matrix multiplication is always associative.