document.write( "Question 102267: Multiplication of matrices are only commutative for some cases of matrices. What are these cases? \n" ); document.write( "
Algebra.Com's Answer #74315 by jim_thompson5910(35256)\"\" \"About 
You can put this solution on YOUR website!
Off the top of my head I can only think of these cases where commutativity holds:\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"I%2AA=A%2AI\" where I is the identity matrix\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"A%5E-1%2AA=A%2AA%5E-1\" where \"A%5E-1\" is the inverse of matrix A\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Also, according to Wolfram Mathworld, \"...matrix multiplication is not, in general, commutative (although it is commutative if A and B are diagonal and of the same dimension).\"\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "For instance, if you have matrices diagonal matrices A and B\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"A=%28matrix%283%2C3%2C2%2C0%2C0%2C0%2C3%2C0%2C0%2C0%2C5%29%29\", \"B=%28matrix%283%2C3%2C5%2C0%2C0%2C0%2C6%2C0%2C0%2C0%2C7%29%29\"\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "the first product AB is \r
\n" ); document.write( "\n" ); document.write( "\"AB=%28matrix%283%2C3%2C10%2C0%2C0%2C0%2C18%2C0%2C0%2C0%2C35%29%29\"\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "and the second product BA is \r
\n" ); document.write( "\n" ); document.write( "\"BA=%28matrix%283%2C3%2C10%2C0%2C0%2C0%2C18%2C0%2C0%2C0%2C35%29%29\"\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "which is the same product as AB. So if you were to do this with general entries of the matrices A and B, you would find that \"AB=BA\" only if A and B are diagonal matrices and they are both the same size
\n" ); document.write( "
\n" );