Let and be matrices, let and be matrices, let be a matrix, and let be a number. Then
(associativity),
, and (distributivity),
, and
.
Let . During this proof we also write to mean the entry of a matrix .
The entry of is which equals , but this is the sum of the entry of and the entry of , proving the first equality. The second is similar.
The entry of is , so the entry of is
so and have the same entry for any , and are therefore equal. The second equality can be proved similarly.
One special case of this result is very easy: for any row vector and column vector we have
For the general case, we start of by checking that and have the same size. is so is , while and are and respectively so is also . Now we only need to show that for any and , they have the same entry. Let be the th row of and the th column of . The entry of is , so the entry of is . On the other hand, the th row of is and the th column of is , so the entry of is . These two are equal by the special case mentioned at the start of this proof. ∎
These results tell you that you can use some of the normal rules of algebra when you work with matrices, like what happened for permutations. Again, like permutations, what you can’t do is use the commutative property.
Two matrices and are said to commute if and are both defined and .
For some pairs of matrices, the product is defined but is not. For example, if is and is then is defined but isn’t. Even when both and are defined and have the same size they won’t in general be equal.
let and . Then
The identity matrix is the matrix with entry 1 if and 0 otherwise.
For example,
The most important property of identity matrices is that they behave like the number does when you multiply by them.
If is an matrix then .
Let , so is 1 if and 0 otherwise. The formula for matrix multiplication tells us that for any and , the entry of is The only term in this sum that can be nonzero is the one when , so the sum equals . Thus the entry of equals , the entry of .
The other equality can be proved similarly. ∎