Skip to main content
Logo image

Section 2.6 The geometry of matrix transformations

Matrix transformations, which we explored in the last section, allow us to describe certain functions \(T:\real^n\to\real^m\text{.}\) In this section, we will demonstrate how matrix transformations provide a convenient way to describe geometric operations, such as rotations, reflections, and scalings. We will then explore how matrix transformations are used in computer animation.

Preview Activity 2.6.1.

We will describe the matrix transformation \(T\) that reflects 2-dimensional vectors across the horizontal axis. For instance, FigureΒ 2.6.1 illustrates how a vector \(\xvec\) is reflected onto the vector \(T(\xvec)\text{.}\)
A two dimensional vector and its reflection across the horizontal axis.
The vector \(\xvec=\twovec32\) and its reflection across the horizontal axis \(T(\xvec)=\twovec3{-2}\text{.}\)
Figure 2.6.1. A vector \(\xvec\) and its reflection \(T(\xvec)\) across the horizontal axis.

(a)

If \(\xvec = \twovec{2}{4}\text{,}\) what is the vector \(T(\xvec)\text{?}\) Sketch the vectors \(\xvec\) and \(T(\xvec)\text{.}\)

(b)

More generally, if \(\xvec=\twovec{x}{y}\text{,}\) what is \(T(\xvec)\text{?}\)

(c)

Find the vectors \(T\left(\twovec{1}{0}\right)\) and \(T\left(\twovec{0}{1}\right)\text{.}\)

(d)

Use your results to write the matrix \(A\) so that \(T(\xvec) = A\xvec\text{.}\) Then verify that \(T\left(\twovec{x}{y}\right)\) agrees with what you found in part b.

(e)

Describe the transformation that results from composing \(T\) with itself; that is, what is the transformation \(T\circ T\text{?}\) Explain how matrix multiplication can be used to justify your response.

Subsection 2.6.1 The geometry of \(2\times2\) matrix transformations

We have now seen how a few geometric operations, such as rotations and reflections, can be described using matrix transformations. The following activity shows, more generally, that matrix transformations can perform a variety of important geometric operations.

Activity 2.6.2. Using matrix transformations to describe geometric operations.

Instructions.
The diagram below demonstrates the effect of a matrix transformation \(T\) on the plane. You may modify the matrix \(A=\begin{bmatrix} a \amp b \\ c \amp c \\ \end{bmatrix}\) defining \(T\) through the sliders at the top.
Since a matrix transformation takes a vector as input and produces a vector as output, we will show the inputs and outputs on separate sets of axes. In particular, the axes on the left represent the inputs while the axes on the right illustrate how input features are transformed by \(T\text{.}\)
Figure 2.6.2. The matrix transformation \(T\) transforms features shown on the left into features shown on the right.
For the following \(2\times2\) matrices \(A\text{,}\) use the diagram to study the effect of the corresponding matrix transformation \(T(\xvec) = A\xvec\text{.}\) For each transformation, describe the geometric effect the transformation has on the plane.
  1. \(A=\left[\begin{array}{rr} 2 \amp 0 \\ 0 \amp 1 \\ \end{array}\right]\text{.}\)
  2. \(A=\left[\begin{array}{rr} 2 \amp 0 \\ 0 \amp 2 \\ \end{array}\right]\text{.}\)
  3. \(A=\left[\begin{array}{rr} 0 \amp 1 \\ -1 \amp 0 \\ \end{array}\right]\text{.}\)
  4. \(A=\left[\begin{array}{rr} 1 \amp 1 \\ 0 \amp 1 \\ \end{array}\right]\text{.}\)
  5. \(A=\left[\begin{array}{rr} -1 \amp 0 \\ 0 \amp 1 \\ \end{array}\right]\text{.}\)
  6. \(A=\left[\begin{array}{rr} 1 \amp 0 \\ 0 \amp 0 \\ \end{array}\right]\text{.}\)
  7. \(A=\left[\begin{array}{rr} 1 \amp 0 \\ 0 \amp 1 \\ \end{array}\right]\text{.}\)
  8. \(A=\left[\begin{array}{rr} 1 \amp -1 \\ -2 \amp 2 \\ \end{array}\right]\text{.}\)
The previous activity presented some examples showing that matrix transformations can perform interesting geometric operations, such as rotations, scalings, and reflections. Before we go any further, we should explain why it is possible to represent these operations by matrix transformations. In fact, we ask more generally: what types of functions \(T:\real^n\to\real^m\) are represented as matrix transformations?
The linearity of matrix-vector multiplication provides the key to answering this question. Remember that if \(A\) is a matrix, \(\vvec\) and \(\wvec\) vectors, and \(c\) a scalar, then
\begin{equation*} \begin{aligned} A(c\vvec) \amp {}={} cA\vvec \\ A(\vvec + \wvec) \amp {}={} A\vvec + A\wvec\text{.} \end{aligned}\text{.} \end{equation*}
This means that a matrix transformation \(T(\xvec) = A\xvec\) satisfies the corresponding linearity property:

Linearity of Matrix Transformations.

\begin{equation*} \begin{aligned} T(c\vvec) \amp {}={} cT(\vvec) \\ T(\vvec + \wvec) \amp {}={} T(\vvec) + T(\wvec)\text{.} \end{aligned} \end{equation*}
It turns out that, if \(T:\real^n\to\real^m\) satisfies these two linearity properties, then we can find a matrix \(A\) such that \(T(\xvec) = A\xvec\text{.}\) In fact, PropositionΒ 2.5.6 tells us how to form \(A\text{;}\) we simply write
\begin{equation*} A = \left[\begin{array}{rrrr} \end{array}\right]\text{.} \end{equation*}
We will now check that \(T(\xvec) = A\xvec\) using the linearity of \(T\text{:}\)
\begin{equation*} \begin{aligned} T(\xvec) = T\left(\fourvec{x_1}{x_2}{\vdots}{x_n}\right) \amp {}={} T(x_1\evec_1 + x_2\evec_2 + \ldots + x_n\evec_n) \\ \\ \amp {}={} x_1T(\evec_1) + x_2T(\evec_2) + \ldots + x_nT(\evec_n) \\ \\ \amp {}={} x_1A\evec_1 + x_2A\evec_2 + \ldots + x_nA\evec_n \\ \\ \amp {}={} A(x_1\evec_1 + x_2\evec_2 + \ldots + x_n\evec_n) \\ \\ \amp {}={} A\fourvec{x_1}{x_2}{\vdots}{x_n} \\ \\ \amp {}={} A\xvec \end{aligned}\text{.} \end{equation*}
The result is the following proposition.
Said simply, this proposition means says that if have a function \(T:\real^n\to\real^m\) and can verify the two linearity properties stated in the proposition, then we know that \(T\) is a matrix transformation. Let’s see how this works in practice.

Example 2.6.4.

We will consider the function \(T:\real^2\to\real^2\) that rotates a vector \(\xvec\) by \(45^\circ\) in the counterclockwise direction to obtain \(T(\xvec)\) as seen in FigureΒ 2.6.5.
A two dimensional vector and the vector obtained by rotating it by 45 degrees.
There are two figures shown on the left and on the right. The figure on the left contains the vector \(\xvec=\twovec31\) while the figure on the right has the vector \(T(\xvec)\) obtained by rotating \(\xvec\) counterclockwise by 45 degrees.
Figure 2.6.5. The function \(T\) rotates a vector counterclockwise by \(45^\circ\text{.}\)
We first need to know that \(T\) can be represented by a matrix transformation, which means, by PropositionΒ 2.6.3, that we need to verify the linearity properties:
\begin{equation*} \begin{aligned} T(c\vvec) \amp {}={} cT(\vvec) \\ T(\vvec + \wvec) \amp {}={} T(\vvec) + T(\wvec)\text{.} \end{aligned} \end{equation*}
The next two figures illustrate why these properties hold. For instance, FigureΒ 2.6.6 shows the relationship between \(T(\vvec)\) and \(T(c\vvec)\) when \(c\) is a scalar. In particular, scaling a vector and then rotating it is the same as rotating and then scaling it, which means that \(T(c\vvec) = cT(\vvec)\text{.}\)
A vector and a scalar multiple along with the result of rotating both vectors by 45 degrees.
Two figures are shown side by side. On the left is a vector \(\vvec\) and a scalar multiple \(c\vvec\text{,}\) both of which lie on the same line. The matrix transformation \(T\) rotates vectors counterclockwise by 45 degrees. In the figure on the right are the vectors \(T(\vvec)\) and \(T(c\vvec)\text{,}\) which again lie on the same line. This demonstrates that \(T(c\vvec) = cT(\vvec)\text{.}\)
Figure 2.6.6. We see that the vector \(T(c\vvec)\) is a scalar multiple to \(T(\vvec)\) so that \(T(c\vvec) = cT(\vvec)\text{.}\)
Similarly, FigureΒ 2.6.7 shows the relationship between \(T(\vvec+\wvec)\text{,}\) \(T(\vvec)\text{,}\) and \(T(\wvec)\text{.}\) Remember that the sum of two vectors is represented by the diagonal of the parallelogram defined by the two vectors. The rotation \(T\) has the effect of rotating the parallelogram defined by \(\vvec\) and \(\wvec\) into the parallelogram defined by \(T(\vvec)\) and \(T(\wvec)\text{,}\) explaining why \(T(\vvec+\wvec) = T(\vvec) + T(\wvec)\text{.}\)
Two vectors and their sum along with the results of rotating all of these vectors by 45 degrees.
Two figures are presented, one on the left and one on the right. In the left figure are the vectors \(\vvec\) and \(\wvec\text{,}\) the parallelogram formed by them, and their vector sum \(\vvec+\wvec\text{.}\) Denoting the transformation that rotates vectors counterclockwise by 45 degrees, the right figure contains the vectors \(T(\vvec)\) and \(T(\wvec)\text{,}\) the parallelogram formed by them, and the vector \(T(\vvec+\wvec)\text{,}\) which forms the diagonal of this parallelogram. This demonstrates that \(T(\vvec+\wvec) = T(\vvec) + T(\wvec)\text{.}\)
Figure 2.6.7. We see that the vector \(T(\vvec+\wvec)\) is the sum of \(T(\vvec)\) and \(T(\wvec)\) so that \(T(\vvec + \wvec) = T(\vvec) + T(\wvec)\text{.}\)
Having verified these two properties, we now know that the function \(T\) that rotates vectors by \(45^\circ\) is a matrix transformation. We may therefore write it as \(T(\xvec) = A\xvec\) where \(A\) is the \(2\times2\) matrix \(A=\left[\begin{array}{rr} T(\evec_1) \amp T(\evec_2) \end{array}\right]\text{.}\) The columns of this matrix, \(T(\evec_1)\) and \(T(\evec_2)\text{,}\) are shown on the right of FigureΒ 2.6.8.
Two vectors and the results of applying the matrix transformation T to them.
The two vector \(\evec_1=\twovec10\) and \(\evec_2=\twovec01\) are shown on the left. On the right is shown the result of rotating both of these vectors counterclockwise by 45 degrees, which is the effect of the matrix transformation \(T\text{.}\)
Figure 2.6.8. The matrix transformation \(T\) rotates \(\evec_1\) and \(\evec_2\) by \(45^\circ\text{.}\)
Notice that \(T(\evec_1)\) forms an isosceles right triangle, as shown in FigureΒ 2.6.9. Since the length of \(\evec_1\) is 1, the length of \(T(\evec_1)\text{,}\) the hypotenuse of the triangle, is also 1, and by Pythagoras’ theorem, the lengths of its legs are \(1/\sqrt{2}\text{.}\)
The vector obtained by rotating e 1 counterclockwise by 45 degrees.
The vector \(T(\evec_1)\text{,}\) where \(\evec_1=\twovec10\text{,}\) is represented by an arrow that begins at the origin, has length one, and makes a 45 degree angle with the positive horizontal axis. A right triangle is formed by this vector, the horizontal axis, and a vertical line segment from the tip of the vector to the horizontal axis. The legs of this right triangle each have length \(1/\sqrt{2}\text{.}\)
Figure 2.6.9. The vector \(T(\evec_1)\) has length 1 and is the hypotenuse of a right isosceles triangle.
This leads to \(T(\evec_1) = \twovec{\frac1{\sqrt{2}}} {\frac1{\sqrt{2}}}\text{.}\) In the same way, we find that \(T(\evec_2) = \twovec{-\frac1{\sqrt{2}}} {\frac1{\sqrt{2}}}\) so that the matrix \(A\) is
\begin{equation*} A = \left[\begin{array}{rr} \frac{1}{\sqrt{2}} \amp -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \amp \frac{1}{\sqrt{2}} \\ \end{array}\right]\text{.} \end{equation*}
You may wish to check this using the interactive diagram in the previous activity using the approximation \(1/\sqrt{2} \approx 0.7\text{.}\)
In this example, we found that \(T\text{,}\) a function describing a rotation in the plane, was in fact a matrix transformation by checking that
\begin{equation*} \begin{aligned} T(c\vvec) \amp {}={} cT(\vvec) \\ T(\vvec + \wvec) \amp {}={} T(\vvec) + T(\wvec)\text{.} \end{aligned}. \end{equation*}
The same kind of thinking applies more generally to show that rotations, reflections, and scalings are matrix transformations. Similarly, we could revisit the functions in ActivityΒ 2.5.3 and verify that they are matrix transformations.

Activity 2.6.3.

In this activity, we seek to describe various matrix transformations by finding the matrix that gives the desired transformation. All of the transformations that we study here have the form \(T:\real^2\to\real^2\text{.}\)
  1. Find the matrix of the transformation that has no effect on vectors; that is, \(T(\xvec) = \xvec\text{.}\)
  2. Find the matrix of the transformation that reflects vectors in \(\real^2\) across the line \(y=x\text{.}\)
  3. What is the result of composing the reflection you found in the previous part with itself; that is, what is the effect of reflecting across the line \(y=x\) and then reflecting across this line again? Provide a geometric explanation for your result as well as an algebraic one obtained by multiplying matrices.
  4. Find the matrix that rotates vectors counterclockwise in the plane by \(90^\circ\text{.}\)
  5. Compare the result of rotating by \(90^\circ\) and then reflecting in the line \(y=x\) to the result of first reflecting in \(y=x\) and then rotating \(90^\circ\text{.}\)
  6. Find the matrix that results from composing a \(90^\circ\) rotation with itself four times; that is, if \(T\) is the matrix transformation that rotates vectors by \(90^\circ\text{,}\) find the matrix for \(T\circ T\circ T \circ T\text{.}\) Explain why your result makes sense geometrically.
  7. Explain why the matrix that rotates vectors counterclockwise by an angle \(\theta\) is
    \begin{equation*} \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right]\text{.} \end{equation*}

Subsection 2.6.2 Matrix transformations and computer animation

Linear algebra plays a significant role in computer animation. We will now illustrate how matrix transformations and some of the ideas we have developed in this section are used by computer animators to create the illusion of motion in their characters.
FigureΒ 2.6.10 shows a test character used by Pixar animators. On the left is the original definition of the character; on the right, we see that the character has been moved into a different pose. To make it appear that the character is moving, animators create a sequence of frames in which the character’s pose is modified slightly from one frame to the next often using matrix transformations.
A three dimensional rendering of a human character used in computer animation.
A three dimensional human character used in computer animation. The character is standing upright with both arms extending horizontally to the sides. There is also an set of triangles that form a solid encasing the character. Computer animators move the character by moving the vertices of the triangles.
The same character shown leaning to one side.
The same character is now shown leaning to one side with its arms still extending perpendicularly to the body.
Figure 2.6.10. Computer animators define a character and create motion by drawing it in a sequence of poses. Β© Disney/Pixar
Of course, realistic characters will be drawn in three-dimensions. To keep things a little more simple, however, we will look at this two-dimensional character and devise matrix transformations that move them into different poses.
A simple two dimensional stick figure that will be used in an upcoming activity.
A simple two dimensional stick figure that could represent a character in a computer animated film is shown against a coordinate grid and set of axes. The character’s feet are at the points \((-1/2,0)\) and \((1/2,0)\text{.}\) Legs extend from the feet and join the character’s body at \((0,1/2)\text{.}\) The character’s head is an ellipse centered by \((0,2)\) with a vertical span of one unit and a horizontal span of half a unit. The arms are drawn as a single line from \((-1/2,1/2)\) to \((1/2,3/2)\text{.}\)
Of course, the first thing we may wish to do is simply move them to a different position in the plane, such as that shown in FigureΒ 2.6.11. Motions like this are called translations.
The character has been translated two units horizontally and one unit vertically.
The character has been translated two units horizontally and one unit vertically.
Figure 2.6.11. Translating our character to a new position in the plane.
This presents a problem because a matrix transformation \(T:\real^2\to\real^2\) has the property that \(T(\zerovec) = A\zerovec = \zerovec\text{.}\) This means that a matrix transformation cannot move the origin of the coordinate plane. To address this restriction, animators use homogeneous coordinates, which are formed by placing the two-dimensional coordinate plane inside \(\real^3\) as the plane \(z=1\text{,}\) as shown in FigureΒ 2.6.12.
A three dimensional figure showing the two dimensional coordinate plane drawn as the plane z equal 1.
A three dimensional diagram with coordinate axes labelled \(x\text{,}\) \(y\text{,}\) and \(z\text{.}\) The two dimensional coordinate plane, including the stick figure character, is included as the plane \(z=1\) so that it appears as a horizontal plane one unit above the origin.
Figure 2.6.12. Include the two-dimensional coordinate plane in \(\real^3\) as the plane \(z=1\) so that we can translate the character.
As a result, rather than describing points in the plane as vectors \(\twovec{x}{y}\text{,}\) we describe them as three-dimensional vectors \(\threevec{x}{y}{1}\text{.}\) As we see in the next activity, this allows us to translate our character in the plane.

Activity 2.6.4.

In this activity, we will use homogeneous coordinates and matrix transformations to move our character into a variety of poses.
  1. Since we regard our character as living in \(\real^3\text{,}\) we will consider matrix transformations defined by matrices
    \begin{equation*} \left[\begin{array}{rrr} a \amp b \amp c \\ d \amp e \amp f \\ 0 \amp 0 \amp 1 \\ \end{array}\right]\text{.} \end{equation*}
    Verify that such a matrix transformation transforms points in the plane \(z=1\) into points in the same plane; that is, verify that
    \begin{equation*} \left[\begin{array}{rrr} a \amp b \amp c \\ d \amp e \amp f \\ 0 \amp 0 \amp 1 \\ \end{array}\right] \threevec{x}{y}{1} = \threevec{x'}{y'}{1}\text{.} \end{equation*}
    Express the coordinates of the resulting point \(x'\) and \(y'\) in terms of the coordinates of the original point \(x\) and \(y\text{.}\)
    Instructions.
    The diagram below allows you to choose parameters \(a, b, \ldots, f\) to define the matrix associated to the matrix \(\begin{bmatrix} a \amp b \amp c \\ d \amp e \amp f \\ 0 \amp 0 \amp 1 \\ \end{bmatrix}\text{.}\) The transformation’s effect on our character is shown on the right.
    Figure 2.6.13. An interactive diagram that allows us to move the character using homogeneous coordinates.
  2. Find the matrix transformation that translates our character to a new position in the plane, as shown in FigureΒ 2.6.14
    The standard view of the stick figure character.
    The standard view of the stick figure character.
    The stick figure character after translating two units horizontally and one unit vertically.
    The stick figure character after translating two units horizontally and one unit vertically.
    Figure 2.6.14. Translating to a new position.
  3. As originally drawn, our character is waving with one of their hands. In one of the movie’s scenes, we would like them to wave with their other hand, as shown in FigureΒ 2.6.15. Find the matrix transformation that moves them into this pose.
    The standard view of the stick figure character.
    The standard view of the stick figure character.
    The stick figure character has been reflected in the vertical axis.
    The stick figure character has been reflected in the vertical axis.
    Figure 2.6.15. Waving with the other hand.
  4. Later, our character performs a cartwheel by moving through the sequence of poses shown in FigureΒ 2.6.16. Find the matrix transformations that create these poses.
    The stick figure character after rotating 45 degrees counterclockwise about the origin.
    The stick figure character after rotating 45 degrees counterclockwise about the origin.
    The stick figure character after rotating 90 degrees counterclockwise about the origin.
    The stick figure character after rotating 90 degrees counterclockwise about the origin.
    The stick figure character after rotating 135 degrees counterclockwise about the origin.
    The stick figure character after rotating 135 degrees counterclockwise about the origin.
    The stick figure character after rotating 180 degrees counterclockwise about the origin.
    The stick figure character after rotating 180 degrees counterclockwise about the origin.
    Figure 2.6.16. Performing a cartwheel.
  5. Next, we would like to find the transformations that zoom in on our character’s face, as shown in FigureΒ 2.6.17. To do this, you should think about composing matrix transformations. This can be accomplished in the diagram by using the Compose button, which makes the current pose, displayed on the right, the new beginning pose, displayed on the left. What is the matrix transformation that moves the character from the original pose, shown in the upper left, to the final pose, shown in the lower right?
    The standard view of the stick figure character.
    The standard view of the stick figure character.
    The the stick figure character has been translated downward by one unit.
    The the stick figure character has been translated downward by one unit.
    The the stick figure character has been again translated downward by one unit.
    The the stick figure character has been again translated downward by one unit so that its head is centered at the origin and its feet are half a unit on either side of \((0,-2)\text{.}\)
    The stick figure character has been enlarged by a factor of two.
    Starting from the last position, the character has been enlarged by a factor of two. The head is still centered at the origin but the feet are now one unit on either side of \((0,-4)\)
    Figure 2.6.17. Zooming in on our characters’ face.
  6. We would also like to create our character’s shadow, shown in the sequence of poses in FigureΒ 2.6.18. Find the sequence of matrix transformations that achieves this. In particular, find the matrix transformation that takes our character from their original pose to their shadow in the lower right.
    The standard view of the stick figure character.
    The standard view of the stick figure character.
    The character is drawn with the same height but slanting to the right at a 45 degree angle.
    The character’s feet are still half a horizontal unit on either side of the origin. However, its body forms a 45 degree line from the positive horizontal axis, and its head is centered about the point \((2,2)\text{.}\)
    The character has been vertically compressed from its previous position.
    From its previous position, the character has been vertically compressed by a factor of two. The feet are still half a horizontal unit on either side of the origin but the head is now centered on \((2,1)\text{.}\)
    The character has again been vertically compressed from its previous position.
    From its previous position, the characters has again been vertically compressed by a factor of two. The feet are still half a horizontal unit on either side of the origin but the head is now centered on \((2,1/2)\text{.}\)
    Figure 2.6.18. Casting a shadow.
  7. Write a final scene to the movie and describe how to construct a sequence of matrix transformations that create your scene.

Subsection 2.6.3 Summary

This section explored how geometric operations are performed by matrix transformations.
  • A function \(T:\real^n\to\real^m\) is a matrix transformation if and only if these properties are satisfied:
    \begin{equation*} \begin{aligned} T(c\vvec) \amp = cT(\vvec) \\ T(\vvec+\wvec) \amp = T(\vvec)+T(\wvec). \\ \end{aligned} \end{equation*}
  • Geometric operations, such as rotations, reflections, and scalings, can be represented as matrix transformations.
  • Composing geometric operations corresponds to matrix multiplication.
  • Computer animators use homogeneous coordinates and matrix transformations to create the illusion of motion.

Exercises 2.6.4 Exercises

1.

For each of the following geometric operations in the plane, find a \(2\times 2\) matrix that defines the matrix transformation performing the operation.
  1. Rotates vectors by \(180^\circ\text{.}\)
  2. Reflects vectors across the vertical axis.
  3. Reflects vectors across the line \(y=-x\text{.}\)
  4. Rotates vectors counterclockwise by \(60^\circ\text{.}\)
  5. First rotates vectors counterclockwise by \(60^\circ\) and then reflects in the line \(y=x\text{.}\)

2.

This exercise investigates the composition of reflections in the plane.
  1. Find the result of first reflecting across the line \(y=0\) and then \(y=x\text{.}\) What familiar operation is the cumulative effect of this composition?
  2. What happens if you compose the operations in the opposite order; that is, what happens if you first reflect across \(y=x\) and then \(y=0\text{?}\) What familiar operation results?
  3. What familiar geometric operation results if you first reflect across the line \(y=x\) and then \(y=-x\text{?}\)
  4. What familiar geometric operation results if you first rotate by \(90^\circ\) and then reflect across the line \(y=x\text{?}\)
It is a general fact that the composition of two reflections results in a rotation through twice the angle from the first line of reflection to the second. We will investigate this more generally in ExerciseΒ 2.6.4.8

3.

Shown below in FigureΒ 2.6.19 are the vectors \(\evec_1\text{,}\) \(\evec_2\text{,}\) and \(\evec_3\) in \(\real^3\text{.}\)
A set of three dimensional coordinate axes with a vector of length one drawn on each of the axes.
A set of three dimensional coordinate axes. Each coordinate axis contains a vector of length one pointing in the direction in which the coordinate increases. In particular, we have \(\evec_1=\threevec100\text{,}\) \(\evec_2=\threevec010\text{,}\) and \(\evec_3=\threevec001\text{.}\)
Figure 2.6.19. The vectors \(\evec_1\text{,}\) \(\evec_2\text{,}\) and \(\evec_3\) in \(\real^3\text{.}\)
  1. Imagine that the thumb of your right hand points in the direction of \(\evec_1\text{.}\) A positive rotation about the \(x\) axis corresponds to a rotation in the direction in which your fingers point. Find the matrix definining the matrix transformation \(T\) that rotates vectors by \(90^\circ\) around the \(x\)-axis.
  2. In the same way, find the matrix that rotates vectors by \(90^\circ\) around the \(y\)-axis.
  3. Find the matrix that rotates vectors by \(90^\circ\) around the \(z\)-axis.
  4. What is the cumulative effect of rotating by \(90^\circ\) about the \(x\)-axis, followed by a \(90^\circ\) rotation about the \(y\)-axis, followed by a \(-90^\circ\) rotation about the \(x\)-axis.

4.

If a matrix transformation performs a geometric operation, we would like to find a matrix transformation that undoes that operation.
  1. Suppose that \(T:\real^2\to\real^2\) is the matrix transformation that rotates vectors by \(90^\circ\text{.}\) Find a matrix transformation \(S:\real^2\to\real^2\) that undoes the rotation; that is, \(S\) takes \(T(\xvec)\) back into \(\xvec\) so that \((S\circ T)(\xvec) = \xvec\text{.}\) Think geometrically about what the transformation \(S\) should be and then verify it algebraically.
    We say that \(S\) is the inverse of \(T\) and we will write it as \(T^{-1}\text{.}\)
  2. Verify algebraically that the reflection \(R:\real^2\to\real^2\) across the line \(y=x\) is its own inverse; that is, \(R^{-1} = R\text{.}\)
  3. The matrix transformation \(T:\real^2\to\real^2\) defined by the matrix
    \begin{equation*} A= \left[\begin{array}{rr} 1\amp 1 \\ 0 \amp 1\\ \end{array}\right] \end{equation*}
    is called a shear. Find the inverse of \(T\text{.}\)
  4. Describe the geometric effect of the matrix transformation defined by
    \begin{equation*} A=\left[\begin{array}{rr} \frac12 \amp 0 \\ 0 \amp 3\\ \end{array}\right] \end{equation*}
    and then find its inverse.

5.

We have seen that the matrix
\begin{equation*} \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right] \end{equation*}
performs a rotation through an angle \(\theta\) about the origin. Suppose instead that we would like to rotate by \(90^\circ\) about the point \((1,2)\text{.}\) Using homogeneous coordinates, we will develop a matrix that performs this operation.
Our strategy is to
This is shown in FigureΒ 2.6.20.
A set of four diagrams illustrating how to rotate a vector about a point other than the origin.
This is a set of four diagrams. In the upper left is an arrow beginning at the point \((1,2)\text{.}\) In the upper right diagram, the arrow has been translated so that it begins at the origin.
In the lower left, the arrow beginning at the origin has been rotated about the origin. Finally, the diagram in the lower right shows the rotated vector translated back so that it begins at the point \((1,2)\text{.}\)
Figure 2.6.20. A sequence of matrix transformations that, when read right to left and top to bottom, rotate a vector about the point \((1,2)\text{.}\)
Remember that, when working with homogeneous coordinates, we consider matrices of the form
\begin{equation*} \left[\begin{array}{rrr} a \amp b \amp c \\ d \amp e \amp f \\ 0 \amp 0 \amp 1 \\ \end{array}\right]\text{.} \end{equation*}
  1. The first operation is a translation by \((-1,-2)\text{.}\) Find the matrix that performs this translation.
  2. The second operation is a \(90^\circ\) rotation about the origin. Find the matrix that performs this rotation.
  3. The third operation is a translation by \((1,2)\text{.}\) Find the matrix that performs this translation.
  4. Use these matrices to find the matrix that performs a \(90^\circ\) rotation about \((1,2)\text{.}\)
  5. Use your matrix to determine where the point \((-10, 5)\) ends up if rotated by \(90^\circ\) about the \((1,2)\text{.}\)

6.

Consider the matrix transformation \(T:\real^2\to\real^2\) that assigns to a vector \(\xvec\) the closest vector on horizontal axis as illustrated in FigureΒ 2.6.21. This transformation is called the projection onto the horizontal axis. You may imagine \(T(\xvec)\) as the shadow cast by \(\xvec\) from a flashlight far up on the positive \(y\)-axis.
Two diagrams that show a vector and its vertical projection onto the horizontal axis.
The diagram on the left shows a vector \(\xvec = \twovec23\text{.}\) The matrix transformation \(T\) projects vertically onto the horizontal axis so that the diagram on the right shows the vector \(T(\xvec) = \twovec20\text{.}\)
Figure 2.6.21. Projection onto the \(x\)-axis.
  1. Find the matrix that defines this matrix transformation \(T\text{.}\)
  2. Find the matrix that defines projection on the vertical axis.
  3. What is the result of composing the projection onto the horizontal axis with the projection onto the vertical axis?
  4. Find the matrix that defines projection onto the line \(y=x\text{.}\)

7.

This exercise concerns the matrix transformations defined by matrices of the form
\begin{equation*} A = \left[\begin{array}{rr} a \amp -b \\ b \amp a \\ \end{array}\right]\text{.} \end{equation*}
Let’s begin by looking at two special types of these matrices.
  1. First, consider the matrix where \(a = 2\) and \(b=0\) so that
    \begin{equation*} A = \left[\begin{array}{rr} 2 \amp 0 \\ 0 \amp 2 \\ \end{array}\right]\text{.} \end{equation*}
    Describe the geometric effect of this matrix. More generally, suppose we have
    \begin{equation*} A = \left[\begin{array}{rr} r \amp 0 \\ 0 \amp r \\ \end{array}\right]\text{,} \end{equation*}
    where \(r\) is a positive number. What is the geometric effect of \(A\) on vectors in the plane?
  2. Suppose now that \(a = 0\) and \(b = 1\) so that
    \begin{equation*} A = \left[\begin{array}{rr} 0 \amp -1 \\ 1 \amp 0 \\ \end{array}\right]\text{.} \end{equation*}
    What is the geometric effect of \(A\) on vectors in the plane? More generally, suppose we have
    \begin{equation*} A = \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right]\text{.} \end{equation*}
    What is the geometric effect of \(A\) on vectors in the plane?
  3. In general, the composition of matrix transformation depends on the order in which we compose them. For these transformations, however, it is not the case. Check this by verifying that
    \begin{equation*} \left[\begin{array}{rr} r \amp 0 \\ 0 \amp r \\ \end{array}\right] \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right] = \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right] \left[\begin{array}{rr} r \amp 0 \\ 0 \amp r \\ \end{array}\right]\text{.} \end{equation*}
  4. Let’s now look at the general case where
    \begin{equation*} A = \left[\begin{array}{rr} a \amp -b \\ b \amp a \\ \end{array}\right]\text{.} \end{equation*}
    We will draw the vector \(\twovec{a}{b}\) in the plane and express it using polar coordinates \(r\) and \(\theta\) as shown in FigureΒ 2.6.22.
    A vector is represented by an arrow with its length and the angle with the horizontal axis indicated.
    The vector \(\twovec ab\) is represented as an arrow beginning at the origin. The length of the vector is denoted by \(r\) and the angle with the positive horizontal axis by \(\theta\text{.}\)
    Figure 2.6.22. A vector may be expressed in polar coordinates.
    We then have
    \begin{equation*} \twovec{a}{b} = \twovec{r\cos\theta}{r\sin\theta}\text{.} \end{equation*}
    Show that the matrix
    \begin{equation*} \left[\begin{array}{rr} a \amp -b \\ b \amp a \\ \end{array}\right] = \left[\begin{array}{rr} r \amp 0 \\ 0 \amp r \\ \end{array}\right] \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right]\text{.} \end{equation*}
  5. Using this description, describe the geometric effect on vectors in the plane of the matrix transformation defined by
    \begin{equation*} A= \left[\begin{array}{rr} a \amp -b \\ b \amp a \\ \end{array}\right]\text{.} \end{equation*}
  6. Suppose we have a matrix transformation \(T\) defined by a matrix \(A\) and another transformation \(S\) defined by \(B\) where
    \begin{equation*} A= \left[\begin{array}{rr} a \amp -b \\ b \amp a \\ \end{array}\right],~~~ B= \left[\begin{array}{rr} c \amp -d \\ d \amp c \\ \end{array}\right]\text{.} \end{equation*}
    Describe the geometric effect of the composition \(S\circ T\) in terms of the \(a\text{,}\) \(b\text{,}\) \(c\text{,}\) and \(d\text{.}\)
The matrices of this form give a model for the complex numbers and will play an important role in SectionΒ 4.4.

8.

We saw earlier that the rotation in the plane through an angle \(\theta\) is given by the matrix:
\begin{equation*} \left[\begin{array}{rr} \cos\theta \amp -\sin\theta \\ \sin\theta \amp \cos\theta \\ \end{array}\right]\text{.} \end{equation*}
We would like to find a similar expression for the matrix that represents the reflection across \(L_\theta\text{,}\) the line passing through the origin and making an angle of \(\theta\) with the positive \(x\)-axis, as shown in FigureΒ 2.6.23.
A line, a vector x, and the result of reflecting x in the line.
The line \(L_\theta\) that makes an angle \(\theta\) with the positive horizontal axis along with a vector \(\xvec\text{.}\) The result of reflecting \(\xvec\) in the line \(L_\theta\) is shown and denoted by \(T(\xvec)\text{.}\)
Figure 2.6.23. The reflection across the line \(L_\theta\text{.}\)
  1. To do this, notice that this reflection can be obtained by composing three separate transformations as shown in FigureΒ 2.6.24. Beginning with the vector \(\xvec\text{,}\) we apply the transformation \(R\) to rotate by \(-\theta\) and obtain \(R(\xvec)\text{.}\) Next, we apply \(S\text{,}\) a reflection in the horizontal axis, followed by \(T\text{,}\) a rotation by \(\theta\text{.}\) We see that \(T(S(R(\xvec)))\) is the same as the reflection of \(\xvec\) in the original line \(L_\theta\text{.}\)
    A series of four diagrams that decompose the reflection in a line into simpler transformations.
    In the upper left diagram is shown a line and a vector \(\xvec\text{.}\) In the upper right is shown the result of rotating the line clockwise so that the line becomes the horizontal axis. The rotated vector is denoted by \(R(\xvec)\text{.}\)
    In the lower left, the result of reflecting \(R(\xvec)\) in the horizontal axis is shown and denoted by \(S(R(\xvec))\text{.}\) Finally, in the lower right, the horizontal axis is rotated counterclockwise back into the original line. The resulting vector is now denoted as \(T(S(R(\xvec)))\text{.}\)
    Figure 2.6.24. Reflection in the line \(L_\theta\) as a composition of three transformations.
    Using this decomposition, show that the reflection in the line \(L_\theta\) is described by the matrix
    \begin{equation*} \left[\begin{array}{rr} \cos(2\theta) \amp \sin(2\theta) \\ \sin(2\theta) \amp -\cos(2\theta) \\ \end{array}\right]\text{.} \end{equation*}
    You will need to remember the trigonometric identities:
    \begin{equation*} \begin{aligned} \cos(2\theta) \amp {}={} \cos^2\theta - \sin^2\theta \\ \sin(2\theta) \amp {}={} 2\sin\theta\cos\theta \\ \end{aligned}\text{.} \end{equation*}
  2. Now that we have a matrix that describes the reflection in the line \(L_\theta\text{,}\) show that the composition of the reflection in the horizontal axis followed by the reflection in \(L_\theta\) is a counterclockwise rotation by an angle \(2\theta\text{.}\) We saw some examples of this earlier in ExerciseΒ 2.6.4.2.