03. Bigger matrices

03. Bigger matrices

Bigger matrices

Just as a 2-by-2 matrix defines a transformation of the plane, an m -by-n matrix defines a transformation 𝐑n𝐑m . An m -by-n matrix is a rectangular array of numbers with m rows and n columns.

Example:

(abcdef) is a 2-by-3 matrix.

The transformation 𝐑n𝐑m associated to an m -by-n matrix M is the map vMv where:

  • v=(x1x2xn)

  • M=(M11M12M1nM21M22M2nMm1Mm2Mmn)

  • Mv is the vector whose j th entry is obtained by multiplying the j th row of M into the column vector v , that is Mv=(M11x1+M12x2++M1nxnM21x1+M22x2++M2nxnMm1x1+Mm2x2++Mmnxn)

This vector Mv has height m because there are m rows of M to multiply into the vector v .

For example, (abcdefghi)(xyz)=(ax+by+czdx+ey+fzgx+hy+iz)

shows how a 3-by-3 matrix eats a vector of height 3 and outputs a vector of height 3.

Example:

Take M=(cosθ-sinθ0sinθcosθ0001) . We get Mv=(xcosθ-ysinθxsinθ+ycosθz).

We see that this is a rotation of 3-dimensional space which fixes the z -axis and rotates by θ in the xy -plane. We call it a rotation by θ about the z -axis.

Example:

Take M=(100010) . We need to feed M a vector of height 3; it will output a vector of height 2. In other words, M defines a transformation 𝐑3𝐑2 . What is the transformation? (100010)(xyz)=(xy).

This is the projection to the xy -plane (which squishes the z -axis to the origin).

Example:

Take M=(100100) . This gives a map 𝐑2𝐑𝟑 : (100100)(xy)=(xy0)

This is the inclusion map of the 2-dimensional xy -plane into 3-dimensional space (putting it at height zero).

3D space containing the xy-plane

These rectangular (nonsquare) matrices change the dimension of the space we're working with, e.g. map from a lower to a higher dimensional space or vice versa. You might wonder why we matrices which are bigger than 3-by-3, given that we live in a 3-dimensional universe. In fact:

  • the theory of special relativity treats space and time on an equal footing, and the Lorentz transformations, which describe all the weird relativistic effects like time dilation and length contraction, mix up space and time, and are given by 4-by-4 matrices.

  • in statistics, data is often represented as a vector of samples; the more samples you have, the bigger the dimension of the vector you need to encode them.

  • More examples

    Example:

    Take M=(112001) . This defines a map 𝐑2𝐑3 : M(xy)=(x+y2xy).

    What does this map "look like"? Its image (the set of points in 3d which have the form Mv for some v𝐑2 ) is a plane. To visualise the plane, we and draw the images of the x - and y -axes in 𝐑2 :

    • The x -axis (vectors of the form (x0) ) goes to the set of vectors (x2x0) .

    • The y -axis (vectors of the form (0y) ) goes to the set of vectors (y0y) .

    The image of M is the unique plane containing these two lines.

    Plane in 3D
    Example:

    Take M=(10-101-1) . This defines a map 𝐑3𝐑2 : (10-101-1)(xyz)=(x-zy-z).

    What does this map look like? Let's imagine it's projecting from 3-dimensional space onto the xy -plane (by including 𝐑2 into 𝐑3 as the xy -plane). The points (xy0) on the xy -plane go to (xy) (i.e. they stay where they are). The point (001) on the z -axis goes to (-1-1) . This means that everything is being projected onto the xy -plane; the projection is along straight line rays which point in the (-1-1-1) -direction (because to get from (001) to (-1-10) you have to go backwards 1 in each of the x , y and z directions. This map is therefore a projection.

    Projection in (-1,-1,-1)-direction to xy-plane

    This line along which we're projecting has a name: it's called the kernel of M . More on this later.