05. Matrix multiplication, 2

05. Matrix multiplication, 2

Examples

We're going to do some examples of matrix multiplication.

Example:

Consider the 90 degree rotation matrix M=(0-110) . We have M2=(0-110)(0-110)

=(-100-1).

This makes sense: two 90 degree rotations compose to give a 180 degree rotation, which sends every point (xy) to its opposite point (-x-y) .

Example:

More generally, if Rα=(cosα-sinαsinαcosα)   Rβ=(cosβ-sinβsinβcosβ)

are two rotations then the composite is RαRβ=(cosα-sinαsinαcosα)(cosβ-sinβsinβcosβ)
=(cosαcosβ-sinαsinβ-cosαsinβ-sinαcosβsinαcosβ+cosαsinβ-sinαsinβ+cosαcosβ)
=(cos(α+β)-sin(α+β)sin(α+β)cos(α+β))
=Rα+β.
(using trigonometric addition formulas). This is what we expect, of course: rotating by β and then α amounts to rotating by α+β .

Example:

Let I=(1001) be the identity matrix and M be any matrix. Then IM=(1001)(M11M12M21M22)

=(M11M12M21M22)
=M.
Similarly, MI=M . As you can see, the identity matrix really plays the role of the number 1 here.

Example:

Let A=(1000) and B=(0100) . Then AB=(0100)

but BA=(0000).
This shows that the order in which we multiply matrices matters: ABBA . So matrix multiplication is not commutative!

As an exercise, can you think of a matrix B which does not commute with A=(1101) ?