02. Matrices: examples

02. Examples

Vectors in the plane

In the last video, we saw that a 2-by-2 matrix of numbers ( a b c d ) defines a geometric transformation of the plane 𝐑 2 : ( x y ) ( a x + b y c x + d y ) .

Remark:

Recall that 𝐑 denotes the real number line. 𝐑 2 denotes the 2-dimensional plane of all column vectors of height 2 (i.e. ( x y ) ); 𝐑 3 denotes the 3-dimensional space of all column vectors of height 3 (i.e. ( x y z ) ; and more generally, 𝐑 n denotes the n -dimensional space of all column vectors of height n (i.e. ( x 1 x 2 x n ) ).

Just as the coordinates ( x y ) encode points in the plane, we should think of the matrix ( a b c d ) as encoding a transformation of the plane. In this lecture, we will take a range of examples and see what the corresponding transformation looks like.

Example 1

Let M = ( 1 0 0 0 ) . If I apply M to v = ( x y ) then I get M v = ( 1 0 0 0 ) ( x y ) = ( x 0 ) . This takes v to the point on the x -axis with the same x -coordinate, so M represents a vertical projection map to the x -axis.

Vertical projection to the x-axis

Example 2

Consider the action of ( 1 0 0 1 ) . This sends ( x y ) to ( x y ) ; this transformation leaves everything as it was: it is called the identity transformation. We call this matrix the identity matrix, and we often write this matrix as I ; it plays the role of the number 1 in the algebra of matrices.

Useful lemma

Lemma:

Let M = ( a b c d ) , let e 1 = ( 1 0 ) and e 2 = ( 0 1 ) . Then

  • M e 1 is the first column of M , i.e. ( a c ) .

  • M e 2 is the second column of M , i.e. ( b d ) .

Basis vectors (1,0) and (0,1)

We'll call e 1 , e 2 basis vectors, which basically means that any other vector can be written as a combination of e 1 and e 2 in a unique way. More on this in MATH220.

We'll just check it for M e 1 : M e 1 = ( a b c d ) ( 1 0 ) = ( a + 0 c + 0 ) = ( a c ) . The calculation for M e 2 is similar.

Example 3

Take M = ( 0 1 1 0 ) .

  • Where does e 1 go? It goes to the first column of M , which is e 2 .

  • Where does e 2 go? It goes to the second column of M , which is e 1 .

So e 1 and e 2 get switched. This corresponds to a reflection in the line y = x :

Reflection in the line y=x

Let's check that the line y = x is indeed fixed by the action of M . The vectors ( x x ) (and only these ones) lie on this line, so let's compute: M ( x x ) = ( x x ) , which indeed tells us that the points on the line y = x are fixed.

Example 4

Take M = ( 0 - 1 1 0 ) .

  • Where does e 1 go? It goes to the first column of M , which is e 2 .

  • Where does e 2 go? It goes to the second column of M , which is - e 1 .

Rotation by 90 degrees

We see that this looks like a 90 degree ( π / 2 radian) rotation. This makes sense, because the matrix ( cos θ - sin θ sin θ cos θ ) for a rotation by an angle θ specialises to M when θ = π / 2 , because cos ( π / 2 ) = 0 and sin ( π / 2 ) = 1 .

Example 5

Take M = ( 1 1 0 1 ) . We have

  • e 1 e 1 ,

  • e 2 ( 1 1 ) .

So e 1 is fixed, but e 2 is slanted over in the x -direction. In fact, the whole y -axis gets slanted in the x -direction, for example if we compute M ( 0 2 ) we get ( 2 2 )

Horizontal shear

Example 6

As one final example, we'll take M = ( - 3 16 - 1 5 ) . What on earth does this correspond to? I claim that it corresponds to a shear in a different direction. How can we find the fixed direction?

If v = ( x y ) points in the direction fixed by M then v = M v (that's what it means to be fixed). Therefore ( x y ) = ( - 3 16 - 1 5 ) ( x y ) .

In other words, the first entries of v and M v must coincide, and so must the second entries. This gives us a pair of linear simultaneous equations: x = - 3 x + 16 y , y = - x + 5 y . These are both equivalent to y = x / 4 , so the line y = x / 4 is fixed.

Remark:

Not all matrices have fixed directions, but if they do then this method will find it.

Outlook

In the next video, we will take a look at bigger matrices and higher-dimensional spaces.