Testing commutativity of matrix multiplication
Consider the product of two general 2 x 2 matrices:
X
Now consider the product in the opposite order:
X
A direct check tells us that the first product is not equal to the second. Let's determine the conditions under which they are equal by subtracting one from the other, setting equal to zero, and solving:
X
Let's try solving the two equations in the first row for a and b in terms of the other indeterminates:
X and X ,
which give us the conditions under which the product is commutative.