Skip to main content

Section 7 Matrix Transformations

Subsection Application: Computer Graphics

As we will discuss, left multiplication by an \(m \times n\) matrix defines a function from \(\R^n\) to \(\R^m\text{.}\) Such a function defined by matrix multiplication is called a matrix transformation. In this section we study some of the properties of matrix transformations and understand how, using the pivots of the matrix, to determine when the output of a matrix transformation covers the whole space \(R^m\) or when a transformation maps distinct vectors to distinct outputs.

Matrix transformations are used extensively in computer graphics to produce animations as seen in video games and movies. For example, consider the dancing figure at left in Figure 7.1. We can identify certain control points (e.g., the point at the neck, where the arms join the torso, etc.) to mark the locations of important points. Using just the control points we can reconstruct the figure. Each control point can be represented as a vector, and so we can manipulate the figure by manipulating the control points with matrix transformations. We will explore this idea in more detail later in this section.

Figure 7.1. A dancing figure and a rotated dancing figure.

Subsection Introduction

In this section we will consider special functions which take vectors as inputs and produce vectors as outputs. We will use matrix multiplication to produce the output vectors.

If \(A\) is an \(m \times n\) matrix and \(\vx\) is a vector in \(\R^n\text{,}\) then the matrix-vector product \(A \vx\) is a vector in \(\R^m\text{.}\) (Pick some specific \(n, m\) values to understand this statement better.) Therefore, left multiplication by the matrix \(A\) takes an input vector \(\vx\) in \(\R^n\) and produces an output vector \(A\vx\) in \(\R^m\text{,}\) which we will refer to as the image of \(\vx\) under the transformation. This defines a function \(T\) from \(\R^n\) to \(\R^m\) where

\begin{equation*} T(\vx) = A \vx \,\text{.} \end{equation*}

These functions are the matrix transformations.

Definition 7.2.

A matrix transformation is a function \(T: \R^n \to \R^m\) defined by

\begin{equation*} T(\vx) = A\vx \end{equation*}

for some \(m \times n\) matrix \(A\text{.}\)

Many of the transformations we consider in this section are from \(\R^2\) to \(\R^2\) so that we can visualize the transformations. As an example, let us consider the transformation \(T\) defined by

\begin{equation*} T\left(\left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right] \right) = \left[ \begin{array}{cr} 1\amp 0 \\ 0\amp -1 \end{array} \right]\left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right]\text{.} \end{equation*}

If we plot the input vectors \(\vu_1 = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{,}\) \(\vu_2 = \left[ \begin{array}{c} 0\\1 \end{array} \right]\text{,}\) \(\vu_3 = \left[ \begin{array}{c} 1 \\ 2 \end{array} \right]\text{,}\) and \(\vu_4 = \left[ \begin{array}{r} -1 \\ 1 \end{array} \right]\) (as (blue) circles) and their images \(T(\vu_1) = \left[ \begin{array}{cr} 1\amp 0 \\ 0\amp -1 \end{array} \right]\left[ \begin{array}{c} 1 \\ 0 \end{array} \right] = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{,}\) \(T(\vu_2) = \left[ \begin{array}{r} 0 \\ -1 \end{array} \right]\text{,}\) \(T(\vu_3) = \left[ \begin{array}{r} 1 \\ -2 \end{array} \right]\text{,}\) and \(T(\vu_4) = \left[ \begin{array}{r} -1 \\ -1 \end{array} \right]\) (as (red) ×'s) on the same set of axes as shown in Figure 7.3, we see that this transformation reflects the input vectors across the \(x\)-axis. We can also see this algebraically since the reflection of the point \((x_1,x_2)\) around the \(x\)-axis is the point \((x_1,-x_2)\text{,}\) and

\begin{equation*} T\left( \left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right] \right) = \left[ \begin{array}{r} x_1 \\ -x_2 \end{array} \right]\text{.} \end{equation*}
Figure 7.3. Inputs and outputs of the transformation \(T\text{.}\)

Preview Activity 7.1.

We now consider other transformations from \(\R^2\) to \(\R^2\text{.}\)

(a)

Suppose a transformation \(T\) is defined by

\begin{equation*} T\left( \left[ \begin{array}{c} x_1\\x_2 \end{array} \right] \right) = \left[ \begin{array}{cc} 2\amp 0 \\ 0\amp 2 \end{array} \right] \left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right]\text{.} \end{equation*}
(i)

Find \(T(\vu_i)\) for each of \(\vu_1 = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{,}\) \(\vu_2 = \left[ \begin{array}{c} 0\\1 \end{array} \right]\text{,}\) \(\vu_3 = \left[ \begin{array}{c} 1 \\ 2 \end{array} \right]\text{,}\) and \(\vu_4 = \left[ \begin{array}{r} -1 \\ 1 \end{array} \right]\text{.}\) (In other words, substitute \(\vu_1, \vu_2, \vu_3, \vu_4\) into the formula above to see what output is obtained.)

Plot all input vectors and their images on the same axes in \(\R^2\text{.}\) Clearly identify which image corresponds to which input vector. Then give a geometric description of what this transformation does.

(b)

The transformation in the introduction performs a reflection across the \(x\)-axis. Find a matrix transformation that performs a reflection across the \(y\)-axis.

(c)

Suppose a transformation \(T\) is defined by

\begin{equation*} T(\vx) = A\vx\text{,} \end{equation*}

where

\begin{equation*} A = \left[ \begin{array}{cc} 1\amp 0 \\ 0\amp 0 \end{array} \right]\text{.} \end{equation*}
(i)

Find \(T(\vu_i)\) for each of \(\vu_1 = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{,}\) \(\vu_2 = \left[ \begin{array}{c} 0\\1 \end{array} \right]\text{,}\) \(\vu_3 = \left[ \begin{array}{c} 1 \\ 2 \end{array} \right]\text{,}\) and \(\vu_4 = \left[ \begin{array}{r} -1 \\ 1 \end{array} \right]\text{.}\)

(ii)

Plot all input vectors and their images on the same axes in \(\R^2\text{.}\) Give a geometric description of this transformation.

(iii)

Is there an input vector which produces \(\vb = \left[ \begin{array}{c} 1 \\ 1 \end{array} \right]\) as an output vector?

(iv)

Find all input vectors that produce the output vector \(\vb = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{.}\) Is there a unique input vector, or multiple input vectors?

Subsection Properties of Matrix Transformations

A matrix transformation is a function. When dealing with functions in previous mathematics courses we have used the terms domain and range with our functions. Recall that the domain of a function is the set of all allowable inputs into the function and the range of a function is the set of all outputs of the function. We do the same with transformations. If \(T\) is the matrix transformation \(T(\vx) = A \vx\) for some \(m \times n\) matrix \(A\text{,}\) then \(T\) maps vectors from \(\R^n\) into \(\R^m\text{.}\) So \(\R^n\) is the domain of \(T\) — the set of all input vectors. However, the set \(\R^m\) is only the target set for \(T\) and not necessarily the range of \(T\text{.}\) We call \(\R^m\) the codomain of \(T\text{,}\) while the range of \(T\) is the set of all output vectors. The range of a transformation will come up later, so we make a formal definition.

Definition 7.4.

The range of a matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is the set

\begin{equation*} \Range{T} = \{T(\vx) : \vx \in \R^n\}\text{.} \end{equation*}

The range is always a subset of the codomain, but the two sets do not have to be equal. In addition, if a vector \(\vb\) in \(\R^m\) satisfies \(\vb = T(\vx)\) for some \(\vx\) in \(\R^n\text{,}\) then we say that \(\vb\) is the image of \(\vx\) under the transformation \(T\text{.}\) For this reason we also use the term image to also mean the range of a transformation, with the corresponding notation \(\Image(T)\text{.}\)

Because of the properties of the matrix-vector product, if the matrix transformation \(T\) is defined by \(T(\vx) = A\vx\) for some \(m \times n\) matrix \(A\text{,}\) then

\begin{equation*} T(\vu + \vv) = A(\vu + \vv) = A\vu + A\vv \end{equation*}

and

\begin{equation*} T(c\vu) = A(c\vu) = cA\vu = cT(\vu) \end{equation*}

for any vectors \(\vu\) and \(\vv\) in \(\R^n\) and any scalar \(c\text{.}\) So every matrix transformation \(T\) satisfies the following two important properties:

  1. \(T(\vu + \vv) = T(\vu) + T(\vv)\) and

  2. \(T(c\vu) = c T(\vv)\text{.}\)

The first property says that a matrix transformation \(T\) preserves sums of vectors and the second that \(T\) preserves scalar multiples of vectors.

Activity 7.2.

Let \(T\) be a matrix transformation, and let \(\vu\) and \(\vv\) be vectors in the domain of \(T\) so that \(T(\vu) = \left[ \begin{array}{c} 1 \\ 2 \\ 0 \end{array} \right]\) and \(T(\vv) = \left[ \begin{array}{r} -3 \\ 1 \\ 4 \end{array} \right]\text{.}\)

(a)

Exactly which vector is \(T(2\vu - 3\vv)\text{?}\) Explain.

(b)

If \(a\) and \(b\) are any scalars, what is the vector \(T(a\vu + b\vv)\text{?}\) Why?

As we saw in Activity 7.2, we can combine the two properties of a matrix transformation \(T\) into one: for any scalars \(a\) and \(b\) and any vectors \(\vu\) and \(\vv\) in the domain of \(T\) we have

\begin{equation} T(a\vu+b\vv) = aT(\vu) + bT(\vv)\text{.}\tag{7.1} \end{equation}

We can then extend equation (7.1) (by mathematical induction) to any finite linear combination of vectors. That is, if \(\vv_1\text{,}\) \(\vv_2\text{,}\) \(\ldots\text{,}\) \(\vv_k\) are any vectors in the domain of a matrix transformation \(T\) and if \(x_1\text{,}\) \(x_2\text{,}\) \(\ldots\text{,}\) \(x_k\) are any scalars, then

\begin{equation} T(x_1 \vv_1 + x_2 \vv_2 + \cdots + x_k \vv_k) = x_1 T(\vv_1) + x_2 T(\vv_2) + \cdots + x_k T(\vv_k)\text{.}\tag{7.2} \end{equation}

In other words, a matrix transformation preserves linear combinations. For this reason matrix transformations are examples of a larger set of transformation that are called linear transformations. We will discuss general linear transformations in a later section.

There is one other important property of a matrix transformation for us to consider. The functions we encountered in earlier mathematics courses, e.g., \(f(x) = 2x+1\text{,}\) could send the input 0 to any output. However, as a consequence of the definition, any matrix transformation \(T\) maps the zero vector to the zero vector because

\begin{equation*} T(\vzero) = A\vzero = \vzero \,\text{.} \end{equation*}

Note that the two vectors \(\vzero\) in the last equation may not be the same vector — if \(T : \R^n \to \R^m\text{,}\) then the first \(\vzero\) is in \(\R^n\) and the second in \(\R^m\text{.}\) It should be clear from the context which vector \(\vzero\) is meant.

Subsection Onto and One-to-One Transformations

The problems we have been asking about solutions to systems of linear equations can be rephrased in terms of matrix transformations. The question about whether a system \(A \vx = \vb\) is consistent for any vector \(\vb\) is also a question about the existence of a vector \(\vx\) so that \(T(\vx) = \vb\text{,}\) where \(T\) is the matrix transformation defined by \(T(\vx) = A \vx\text{.}\)

Activity 7.3.

Let \(T\) be the matrix transformation defined by \(T(\vx) = A\vx\) where \(A\) is

\begin{equation*} \left[ \begin{array}{rc} 1\amp 0 \\ 0\amp 1 \\ 0\amp 2 \end{array} \right]\text{.} \end{equation*}
(a)

Find \(T\left(\left[\begin{array}{c} 1\\1 \end{array} \right]\right)\) and \(T\left(\left[\begin{array}{c} 1\\1\\1 \end{array} \right]\right)\text{.}\) If it is not possible to find one or both of the output vectors, indicate why.

(b)

What are the domain and codomain of \(T\text{?}\) Why? (Recall that the domain is the space of all input vectors, while the codomain is the space in which the output vectors are contained.)

(c)

Can you find a vector \(\vx\) for which \(T(\vx)= \left[\begin{array}{c} 2\\3\\6 \end{array} \right]\text{?}\) Can you find a vector \(\vx\) for which \(T(\vx)=\left[\begin{array}{c} 2\\3\\1 \end{array} \right]\text{?}\)

(d)

Which \(\vb=\left[\begin{array}{c} a\\b\\c \end{array} \right]\) are the image vectors for this transformation? Is the range of \(T\) equal to the codomain of \(T\text{?}\) Explain.

(e)

The previous question can be rephrased as a matrix equation question. We are asking whether \(A \vx = \vb\) is consistent for every \(\vb\text{.}\) How is the answer to this question related to the pivots of \(A\text{?}\)

If \(T\) is a matrix transformation, Activity 7.3 illustrates that the range of a matrix transformation \(T\) may not equal its codomain. In other words, there may be vectors \(\vb\) in the codomain of \(T\) that are not the image of any vector in the domain of \(T\text{.}\) If it is the case for a matrix transformation \(T\) that there is always a vector \(\vx\) in the domain of \(T\) such that \(T(\vx) = \vb\) for any vector \(\vb\) in the codomain of \(T\text{,}\) then \(T\) is given a special name.

Definition 7.5.

A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is onto if each \(\vb\) in \(\R^m\) is the image of at least one \(\vx\) in \(\R^n\text{.}\)

So the matrix transformation \(T\) from \(\R^n\) to \(\R^m\) defined by \(T(\vx) = A\vx\) is onto if the equation \(A \vx = \vb\) has a solution for each vector \(\vb\) in \(\R^m\text{.}\) Since the vectors \(A\vx\) are linear combinations of the columns of \(A\text{,}\) \(T\) is onto exactly when the span of the columns of \(A\) is all of \(\R^m\text{.}\) Activity 7.3 shows us that \(T\) is onto if every row of \(A\) contains a pivot.

Another question to ask about matrix transformations is how many vectors there can be that map onto a given output vector.

Activity 7.4.

Let \(T\) be the matrix transformation defined by \(T(\vx) = A \vx\) where \(A\) is

\begin{equation*} \left[ \begin{array}{ccc} 1 \amp 3 \amp 0 \\ 0 \amp 0 \amp 1 \end{array} \right]\text{.} \end{equation*}
(a)

Find \(T\left(\left[\begin{array}{c} 1\\1 \end{array} \right]\right)\) and \(T\left(\left[\begin{array}{c} 1\\1\\1 \end{array} \right]\right)\text{.}\) If it is not possible to find one or both of the output vectors, indicate why.

(b)

What are the domain and codomain of \(T\text{?}\) Why?

(c)

Find \(T\left(\left[\begin{array}{c} 1\\1\\2 \end{array} \right]\right)\text{.}\) Are there any other \(\vx\)'s for which \(T(\vx)\) is this same output vector?

Hint.

Set up an equation to solve for such \(\vx\)'s.

(d)

Assume more generally that for some vector \(\vb\text{,}\) there is a vector \(\vx\) so that \(T(\vx) = \vb\text{.}\) Write this as a matrix equation to determine how many solutions this equation has. Explain. How is the answer to this question related to the pivots of \(A\text{?}\)

The uniqueness of a solution to \(A \vx = \vb\) is the same as saying that the matrix transformation \(T\) defined by \(T(\vx) = A\vx\) maps exactly one vector to \(\vb\text{.}\) A matrix transformation \(T\) that has the property that every image vector is an image in exactly one way is also a special type of transformation.

Definition 7.6.

A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is one-to-one if each \(\vb\) in \(\R^m\) is the image of at most one \(\vx\) in \(\R^n\text{.}\)

So the matrix transformation \(T\) from \(\R^n\) to \(\R^m\) defined by \(T(\vx) = A\vx\) is one-to-one if the equation \(A \vx = \vb\) has a unique solution whenever \(A \vx = \vb\) is consistent. Since the vectors \(A\vx\) are linear combinations of the columns of \(A\text{,}\) the unique solution requirement indicates that any output vector can be written in exactly one way as a linear combination of the columns of \(A\text{.}\) This implies that the columns of \(A\) are linearly independent. Activity 7.4 indicates that this happens when every column of \(A\) is a pivot column.

To summarize, if \(T\) is a matrix transformation defined by \(T(\vx) = A \vx\text{,}\) then \(T\) is onto if every row of \(A\) contains a pivot, and \(T\) is one-to-one if every column of \(A\) is a pivot column. It is important to note the difference: being one-to-one depends on the rows of \(A\) and being onto depends on the columns of \(A\text{.}\)

Having a matrix transformation from \(\R^n\) to \(\R^m\) can tell us things about \(m\) and \(n\text{.}\) For example, when a matrix transformation from \(\R^n\) to \(\R^m\) is one-to-one, it means that there is a unique input vector for every output vector. Since a matrix transformation preserves the algebraic structure of \(\R^n\text{,}\) this implies that the collection of the images of the vectors in the domain of \(T\) form a copy of \(\R^n\) inside of \(\R^m\text{.}\) If we think of \(T\) as a one-to-one matrix transformation with \(T(\vx) = A \vx\) for some \(m \times n\) matrix, then every column of \(A\) will have to be a pivot column. It follows that if there is a one-to-one matrix transformation from \(\R^n\) to \(\R^m\text{,}\) we must have \(m \geq n\text{.}\) Similarly, if a matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is onto, then for each \(\vb\) in \(\R^m\text{,}\) if we select one vector in the domain of \(T\) whose image is \(\vb\text{,}\) then the collection of these vectors in the domain of \(T\) is a copy of \(\R^m\) inside of \(\R^n\text{.}\) So if there is an onto matrix transformation from \(\R^n\) to \(\R^m\text{,}\) then \(n \geq m\text{.}\) As a consequence, the only way a matrix transformation from \(\R^n\) to \(\R^m\) is both one-to-one and onto is if \(n = m\text{.}\)

We conclude this section by adding new equivalent conditions to Theorem 5.3 and Theorem 6.9 from Section 5 and Section 6.

We will continue to add to these theorems, which will eventually give us many different but equivalent perspectives to look at a linear algebra problem. Please keep these equivalent criteria in mind when considering the best possible approach to a problem.

Subsection Examples

What follows are worked examples that use the concepts from this section.

Example 7.9.

Let \(A = \left[ \begin{array}{crrr} 1\amp 1\amp -1\amp -1 \\ 3\amp 6\amp 0\amp 3 \\ 2\amp -1\amp -5\amp -8 \end{array} \right]\) and let \(T(\vx) = A\vx\text{.}\)

(a)

Identify the domain of \(T\text{.}\) Explain your reasoning.

Solution.

Since \(A\) is a \(3 \times 4\) matrix, \(A\) has four columns. Now \(A \vx\) is a linear combination of the columns of \(A\) with weights from \(\vx\text{,}\) so \(\vx\) must have four entries to correspond to the columns of \(A\text{.}\) We conclude that the domain of \(T\) is \(\R^4\text{.}\)

(b)

Is \(T\) one-to-one. Explain.

Solution.

Technology shows that the reduced row echelon form of \(A\) is

\begin{equation*} \left[ \begin{array}{ccrr} 1\amp 0\amp -2\amp -3 \\ 0\amp 1\amp 1\amp 2 \\ 0\amp 0\amp 0\amp 0 \end{array} \right]\text{.} \end{equation*}

Since \(A\) contains non-pivot columns, the homogeneous system \(A \vx = \vzero\) has infinitely many solutions. So \(T\) is not one-to-one. In other words, if there is a column of \(A\) that is a non-pivot column, then \(A\) is not one-to-one.

(c)

Is \(T\) onto? If yes, explain why. If no, describe the range of \(T\) as best you can, both algebraically and graphically.

Solution.

Since the reduced row echelon form of \(A\) has rows of zeros, there will be vectors \(\vb\) in \(\R^3\) such that the reduced row echelon form of \([A \ \vb]\) will have a row of the form \([0 \ 0 \ 0 \ 0 \ c]\) for some nonzero scalar \(c\text{.}\) This means that \(T(\vx) = A\vx = \vb\) will have no solution and \(T\) is not onto. In other words, if there is a row of \(A\) that does not contain a pivot, then \(T\) is not onto.

Example 7.10.

A matrix transformation \(T: \R^2 \to \R^2\) defined by

\begin{equation*} T\left(\left[ \begin{array}{c} x\\y \end{array} \right] \right) = \left[ \begin{array}{c} cx\\y \end{array} \right] \end{equation*}

is a contraction in the \(x\) direction if \(0 \lt c \lt 1\) and a dilation in the \(x\) direction if \(c>1\text{.}\)

(a)

Find a matrix \(A\) such that \(T(\vx) = A\vx\text{.}\)

Solution.

Since

\begin{equation*} \left[ \begin{array}{cc} c\amp 0\\0\amp 1 \end{array} \right] \left[ \begin{array}{c} x\\y \end{array} \right] = \left[ \begin{array}{c} cx\\y \end{array} \right]\text{,} \end{equation*}

the matrix \(A = \left[ \begin{array}{cc} c\amp 0\\0\amp 1 \end{array} \right]\) has the property that \(T(\vx) = A\vx\text{.}\)

(b)

Sketch the square \(S\) with vertices \(\vu_1 = \left[ \begin{array}{c} 0\\0 \end{array} \right]\text{,}\) \(\vu_2 = \left[ \begin{array}{c} 1\\0 \end{array} \right]\text{,}\) \(\vu_3 = \left[ \begin{array}{c} 1\\1 \end{array} \right]\text{,}\) and \(\vu_4 = \left[ \begin{array}{c} 0\\1 \end{array} \right]\text{.}\) Determine and sketch the image of \(S\) under \(T\) if \(c = 2\text{.}\)

Solution.

We can determine the image of \(S\) under \(T\) by calculating what \(T\) does to the vertices of \(S\text{.}\) Notice that

\begin{align*} T(\vu_1) \amp = \left[ \begin{array}{cc} 2\amp 0\\ 0\amp 1 \end{array}\right] \left[ \begin{array}{c} 0\\ 0 \end{array} \right] = \left[ \begin{array}{c} 0\\ 0 \end{array} \right]\\ T(\vu_2) \amp = \left[ \begin{array}{cc} 2\amp 0\\ 0\amp 1 \end{array}\right] \left[ \begin{array}{c} 1\\ 0 \end{array} \right] = \left[ \begin{array}{c} 2\\ 0 \end{array} \right]\\ T(\vu_3) \amp = \left[ \begin{array}{cc} 2\amp 0\\ 0\amp 1 \end{array}\right] \left[ \begin{array}{c} 1\\ 1 \end{array} \right] = \left[ \begin{array}{c} 2\\ 1 \end{array} \right]\\ T(\vu_4) \amp = \left[ \begin{array}{cc} 2\amp 0\\ 0\amp 1 \end{array}\right] \left[ \begin{array}{c} 0\\ 1 \end{array} \right] = \left[ \begin{array}{c} 0\\ 1 \end{array} \right] \end{align*}

Since \(T\) is a linear map, the image of \(S\) under \(T\) is the polygon with vertices \((0,0)\text{,}\) \((1,0)\text{,}\) \((2,1)\text{,}\) and \((0,1)\) as shown in Figure 7.11. From Figure 7.11 we can see that \(T\) stretches the figure in the \(x\) direction only by a factor of 2.

Figure 7.11. The input square \(S\) and the output \(T(S)\text{.}\)

Subsection Summary

In this section we determined how to represent any matrix transformation from \(\R^n\) to \(\R^m\) as a matrix transformation, and what it means for a matrix transformation to be one-to-one and onto.

  • A matrix transformation is a function \(T: \R^n \to \R^m\) defined by \(T(\vx) = A\vx\) for some \(m \times n\) matrix \(A\text{.}\)

  • A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) satisfies

    \begin{equation*} T(a\vu + b\vv) = aT(\vu) + bT(\vv) \end{equation*}

    for any scalars \(a\) and \(b\) and any vectors \(\vu\) and \(\vv\) in \(\R^n\text{.}\) The fact that \(T\) preserves linear combinations is why we say that \(T\) is a linear transformation.

  • An \(m \times n\) matrix \(A\) defines the matrix transformation \(T\) via

    \begin{equation*} T(\vx) = A \vx\text{.} \end{equation*}

    The domain of this transformation is \(\R^n\) because the matrix-vector product \(A \vx\) is only defined if \(\vx\) is an \(n \times 1\) vector.

  • If \(A\) is an \(m \times n\) matrix, then the codomain of the matrix transformation \(T\) defined by \(T(\vx) = A \vx\) is \(\R^m\text{.}\) This is because the matrix-vector product \(A \vx\) with \(\vx\) an \(n \times 1\) vector is an \(m \times 1\) vector. The range of \(T\) is the subset of the codomain of \(T\) consisting of all vectors of the form \(T(\vx)\) for vectors \(\vx\) in the domain of \(T\text{.}\)

  • A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is one-to-one if each \(\vb\) in \(\R^m\) is the image of at most one \(\vx\) in \(\R^n\text{.}\) If \(T\) is a matrix transformation represented as \(T(\vx) = A\vx\text{,}\) then \(T\) is one-to-one if each column of \(A\) is a pivot column, or if the columns of \(A\) are linearly independent.

  • A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is onto if each \(\vb\) in \(\R^m\) is the image of at least one \(\vx\) in \(\R^n\text{.}\) If \(T\) is a matrix transformation represented as \(T(\vx) = A\vx\text{,}\) then \(T\) is onto if each row of \(A\) contains a pivot position, or if the span of the columns of \(A\) is all of \(\R^m\text{.}\)

Exercises Exercises

1.

Given matrix \(A=\left[ \begin{array}{ccr} 1\amp 2 \amp 1 \\ 1 \amp 0 \amp -3 \end{array} \right]\text{,}\) write the coordinate form of the transformation \(T\) defined by \(T(\vx)=A\vx\text{.}\) (Note: Writing a transformation in coordinate form refers to writing the transformation in terms of the entries of the input and output vectors.)

2.

Suppose the transformation \(T\) is defined by \(T(\vx)=A\vx\) where

\begin{equation*} A=\left[ \begin{array}{ccr} 1\amp 1\amp -1 \\ 2\amp 1\amp 1 \\ 4\amp 1\amp 4 \end{array} \right]\text{.} \end{equation*}

Determine if \(\vb=\left[ \begin{array}{c} 1\\0\\0 \end{array} \right]\) is in the range of \(T\text{.}\) If so, find all \(\vx\)'s which map to \(\vb\text{.}\)

3.

Suppose \(T\) is a matrix transformation and

\begin{equation*} T(\vv_1) = \left[ \begin{array}{c} 1 \\ 2 \end{array} \right] \, , \, T(\vv_2) = \left[ \begin{array}{r} -2 \\ 3 \end{array} \right] \end{equation*}

Find \(T(2\vv_1 -5 \vv_2)\text{.}\)

4.

Given a matrix transformation defined as

\begin{equation*} T\left( \left[ \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array} \right] \right) = \left[ \begin{array}{c} 2x_1 -x_3 \\ -x_1 +2x_2 +x_3 \\ 3x_2 - 4x_3 \end{array} \right] \end{equation*}

determine the matrix \(A\) for which \(T(\vx) = A\vx\text{.}\)

5.

Suppose a matrix transformation \(T\) defined by \(T(\vx)=A\vx\) for some unknown \(A\) matrix satisfies

\begin{equation*} T\left( \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \right) = \left[ \begin{array}{c} 2\\ 1 \end{array} \right] \, \text{ and } \, T\left( \left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \right) = \left[ \begin{array}{r} -1\\ 3 \end{array} \right] \,\text{.} \end{equation*}

Use the matrix transformation properties to determine \(T(\vx)\) where \(\vx= \left[ \begin{array}{c} x_1\\x_2 \end{array} \right]\text{.}\) Use the expression for \(T(\vx)\) to determine the matrix \(A\text{.}\)

6.

For each of the following matrices, determine if the transformation \(T\) defined by \(T(\vx)=A\vx\) is onto and if \(T\) is one-to-one.

(a)

\(A=\left[ \begin{array}{ccr} 1\amp 1 \amp 1 \\ 1 \amp 2 \amp -3 \end{array} \right]\)

(b)

\(A=\left[ \begin{array}{ccc} 1\amp 1 \amp 2 \\ 2 \amp 2 \amp 4 \end{array} \right]\)

(c)

\(A=\left[ \begin{array}{rcc} 1\amp 1 \amp 2 \\ 1 \amp 2 \amp 3 \\ -1 \amp 1 \amp 2 \end{array} \right]\)

(d)

\(A=\left[ \begin{array}{cc} 1\amp 1 \\ 2 \amp 3 \\ 3 \amp 0 \end{array} \right]\)

7.

Come up with an example of a one-to-one transformation from \(\R^3\) to \(\R^4\text{,}\) if possible. If not, explain why not.

8.

Come up with an example of an onto transformation from \(\R^3\) to \(\R^4\text{,}\) if possible. If not, explain why not.

9.

Come up with an example of a one-to-one but not onto transformation from \(\R^4\) to \(\R^4\text{,}\) if possible. If not, explain why not.

10.

Two students are talking about when a matrix transformation is one-to-one.

Student 1: If we have a matrix transformation, then we need to check that \(A\vx=\vb\) has a unique solution for every \(\vb\) for which \(A\vx=\vb\) has a solution, right?
Student 2: Well, that's the definition. Each \(\vb\) in the codomain has to be the image of at most one \(\vx\) in the domain. So when \(\vb\) is in the range, corresponding to \(A\vx=\vb\) having a solution, then there is exactly one solution \(\vx\text{.}\)
Student 1: But wouldn't it be enough to check that \(A\vx=\vzero\) has a unique solution? Doesn't that translate to the other \(\vb\) vectors? If there is a unique solution for one \(\vb_1\text{,}\) then there can't be infinitely many solutions for another \(\vb_2\text{.}\)
Student 2: I don't know. It feels to me as if changing the right hand side could change whether there is a unique solution, or infinitely many solutions, or no solution.
Which part of the above conversation do you agree with? Which parts need fixing?

11.

Show that if \(T\) is a matrix transformation from \(\R^n\) to \(\R^m\) and \(L\) is a line in \(\R^n\text{,}\) then \(T(L)\text{,}\) the image of \(L\text{,}\) is a line or a single vector. (Note that a line in \(\R^n\) is the set of all vectors of the form \(\vv+c\vw\) where \(c\) is a scalar, and \(\vv, \vw\) are two fixed vectors in \(\R^n\text{.}\))

12.

Label each of the following statements as True or False. Provide justification for your response.

(a) True/False.

The range of a transformation is the same as the codomain of the transformation.

(b) True/False.

The codomain of a transformation \(T\) defined by \(T(\vx)=A\vx\) is the span of the columns of \(A\text{.}\)

(c) True/False.

A one-to-one transformation is a transformation where each input has a unique output.

(d) True/False.

A one-to-one transformation is a transformation where each output can only come from a unique input.

(e) True/False.

If a matrix transformation from \(\R^n\) to \(\R^n\) is one-to-one, then it is also onto.

(f) True/False.

A matrix transformation from \(\R^2\) to \(\R^3\) cannot be onto.

(g) True/False.

A matrix transformation from \(\R^3\) to \(\R^2\) cannot be onto.

(h) True/False.

A matrix transformation from \(\R^3\) to \(\R^2\) cannot be one-to-one.

(i) True/False.

If the columns of a matrix \(A\) are linearly independent, then the transformation \(T\) defined by \(T(\vx)=A\vx\) is onto.

(j) True/False.

If the columns of a matrix \(A\) are linearly independent, then the transformation \(T\) defined by \(T(\vx)=A\vx\) is one-to-one.

(k) True/False.

If \(A\) is an \(m \times n\) matrix with \(n\) pivots, then the transformation \(\vx \mapsto A\vx\) is onto.

(l) True/False.

If \(A\) is an \(m \times n\) matrix with \(n\) pivots, then the transformation \(\vx \mapsto A\vx\) is one-to-one.

(m) True/False.

If \(\vu\) is in the range of a matrix transformation \(T\text{,}\) then there is an \(\vx\) in the domain of \(T\) such that \(T(\vx)=\vu\text{.}\)

(n) True/False.

If \(T\) is a one-to-one matrix transformation, then \(T(\vx)=\vzero\) has a non-trivial solution.

(o) True/False.

If the transformations \(T_1: \R^m \to \R^n\) and \(T_2:\R^n \to \R^p\) are onto, then the transformation \(T_2 \circ T_1\) defined by \(T_2\circ T_1(\vx)=T_2(T_1(\vx))\) is also onto.

(p) True/False.

If the transformations \(T_1: \R^m \to \R^n\) and \(T_2:\R^n \to \R^p\) are one-to-one, then the transformation \(T_2 \circ T_1\) defined by \(T_2\circ T_1(\vx)=T_2(T_1(\vx))\) is also one-to-one.

Subsection Project: The Geometry of Matrix Transformations

In this section we will consider certain types of matrix transformations and analyze their geometry. Much more would be needed for real computer graphics, but the essential ideas are contained in our examples. A GeoGebra applet is available at geogebra.org/m/rh4bzxee for you to use to visualize the transformations in this project.

Project Activity 7.5.

We begin with transformations that produce the rotated dancing image in Figure 7.1. Let \(R\) be the matrix transformation from \(\R^2\) to \(\R^2\) defined by

\begin{equation*} R\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right) = \left[\begin{array}{lr} \cos(\theta) \amp -\sin(\theta) \\ \sin(\theta) \amp \cos(\theta) \end{array} \right]\left[ \begin{array}{c} x \\ y \end{array} \right]\text{.} \end{equation*}

These matrices are the rotation matrices.

(a)

Suppose \(\theta = \frac{\pi}{2}\text{.}\) Then

\begin{equation*} R\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right) = \left[ \begin{array}{cr} 0\amp -1 \\ 1\amp 0 \end{array} \right] \left[ \begin{array}{c} x \\ y \end{array} \right]\text{.} \end{equation*}
(i)

Find the images of \(\vu_1 = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\text{,}\) \(\vu_2 = \left[ \begin{array}{c} \frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{array} \right]\text{,}\) and \(\vu_3 = \left[ \begin{array}{c} 0 \\ 1 \end{array} \right]\) under \(R\text{.}\)

(ii)

Plot the points determined by the vectors from part i. The matrix transformation \(R\) performs a rotation. Based on this small amount of data, what would you say the angle of rotation is for this transformation \(R\text{?}\)

(b)
>

Now let \(R\) be the general matrix transformation defined by the matrix

\begin{equation*} \left[\begin{array}{lr} \cos(\theta) \amp -\sin(\theta) \\ \sin(\theta) \amp \cos(\theta) \end{array} \right]\text{.} \end{equation*}

Follow the steps indicated to show that \(R\) performs a counterclockwise rotation of an angle \(\theta\) around the origin. Let \(P\) be the point defined by the vector \(\left[ \begin{array}{c} x\\y \end{array} \right] = \left[ \begin{array}{c}\cos(\alpha) \\ \sin(\alpha) \end{array} \right]\) and \(Q\) the point defined by the vector \(\left[ \begin{array}{c} w\\z \end{array} \right] = \left[ \begin{array}{c} \cos(\alpha+\theta) \\ \sin(\alpha+\theta) \end{array} \right]\) as illustrated in Figure 7.12.

Figure 7.12. A rotation in the plane.

(i)

Use the angle sum trigonometric identities

\begin{align*} \cos(A+B) \amp = \cos(A) \cos(B) - \sin(A) \sin(B)\\ \sin(A+B) \amp = \cos(A) \sin(B) + \cos(B) \sin(A) \end{align*}

to show that

\begin{align*} w \amp = \cos(\theta)x - \sin(\theta)y\\ z \amp = \sin(\theta)x + \cos(\theta)y\text{.} \end{align*}
(ii)

Now explain why the counterclockwise rotation around the origin by an angle \(\theta\) can be represented by left multiplication 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*}

Project Activity 7.5 presented the rotation matrices. Other matrices have different effects.

Project Activity 7.6. Different matrix transformations.

(a)

Let \(S\) be the matrix transformation from \(\R^2\) to \(\R^2\) defined by

\begin{equation*} S\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right) = \left[ \begin{array}{cr} 1\amp 0.5 \\ 0\amp 1 \end{array} \right]\left[ \begin{array}{c} x \\ y \end{array} \right]\text{.} \end{equation*}

Determine the entries of the output vector \(S\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right)\) and explain the action of the transformation \(S\) on the dancing figure as illustrated in Figure 7.13. (The transformation \(S\) is called a shear in the \(x\) direction.)

Figure 7.13. A dancing figure and a sheared dancing figure.

(b)

Let \(C\) be the matrix transformation from \(\R^2\) to \(\R^2\) defined by

\begin{equation*} C\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right) = \left[ \begin{array}{cr} 0.65\amp 0 \\ 0\amp 0.65 \end{array} \right]\left[ \begin{array}{c} x \\ y \end{array} \right]\text{.} \end{equation*}

Determine the entries of the output vector \(C\left(\left[ \begin{array}{c} x \\ y \end{array} \right] \right)\) and explain the action of the transformation \(C\) on the dancing figure as illustrated in Figure 7.14. (The transformation \(C\) is called a contraction.) How would your response change if each \(0.65\) was changed to \(2\) in the matrix \(C\text{?}\)

Figure 7.14. A dancing figure and a contracted dancing figure.

So far we have seen specific matrix transformations perform a rotations, shears, and contractions. We can combine these, and other, matrix transformations by composition to change figures in different ways, and to created animations of geometric figures. (As we will see later, combining transformations needs to be done carefully in order to obtain the result we want. For example, if we want to first rotate then translate, in what order should the matrices be applied?)