Tutorials › Linear Algebra › Mixed Problems on Linear Transformations in Rn

Linear Transformations of R^n · Tutorial 210 of 1000

Mixed Problems on Linear Transformations in Rn

Translate between linear maps and matrices, solve for inputs with prescribed outputs, and analyze compositions using exact calculations.

Intermediate 10 min read

What You'll Learn

  • Construct a standard matrix from a coordinate formula or geometric action
  • Evaluate a linear transformation by multiplying its standard matrix by an input
  • Find all preimages of an output by solving a linear system
  • Use pivot positions to test injectivity and surjectivity
  • Compute a composite map in the correct order and verify it on a vector
  • Recognize why an output may have no preimage or many preimages

From a Transformation to a Matrix

A linear transformation can be presented in several ways: by a coordinate formula, by a geometric description, or by its action on a particular input. Mixed problems ask us to move between these descriptions and use the resulting matrix to answer questions about images, preimages, and whether every output is attainable. The calculations are connected: the columns of the standard matrix record the images of the standard basis vectors, and matrix multiplication then evaluates the transformation on any input.

Throughout, the scalar field is \(\mathbb{R}\). A map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear if \(T(a\mathbf{x}+b\mathbf{y})=aT(\mathbf{x})+bT(\mathbf{y})\) for all \(\mathbf{x},\mathbf{y}\in\mathbb{R}^n\) and \(a,b\in\mathbb{R}\). The standard basis vectors \(\mathbf{e}_1,\dots,\mathbf{e}_n\) have a \(1\) in one coordinate and \(0\) in the others. Every vector \(\mathbf{x}\in\mathbb{R}^n\) can be written as \(x_1\mathbf{e}_1+\cdots+x_n\mathbf{e}_n\).

Definition: The standard matrix of a linear map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is the \(m\times n\) matrix whose \(j\)th column is \(T(\mathbf{e}_j)\). Thus \(\mathbf{A}=\begin{bmatrix}T(\mathbf{e}_1)&\cdots&T(\mathbf{e}_n)\end{bmatrix}\), and \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\) for every \(\mathbf{x}\in\mathbb{R}^n\).

The map and its standard matrix are related, but they are not the same object: the map takes vectors to vectors, while the matrix is an array of entries that represents that action in standard coordinates.

Theorem (Standard-matrix representation): If \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear, then there is exactly one matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\) such that \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\) for every \(\mathbf{x}\in\mathbb{R}^n\). Its columns are \(T(\mathbf{e}_1),\dots,T(\mathbf{e}_n)\).

Proof. Set \(\mathbf{A}=\begin{bmatrix}T(\mathbf{e}_1)&\cdots&T(\mathbf{e}_n)\end{bmatrix}\). For any \(\mathbf{x}=(x_1,\dots,x_n)^\top\), linearity gives \(T(\mathbf{x})=T(\sum_{j=1}^n x_j\mathbf{e}_j)=\sum_{j=1}^n x_jT(\mathbf{e}_j)=\mathbf{A}\mathbf{x}\). This proves existence. If a matrix \(\mathbf{B}\) also satisfies \(T(\mathbf{x})=\mathbf{B}\mathbf{x}\) for all \(\mathbf{x}\), then for each \(j\), \(\mathbf{B}\mathbf{e}_j=T(\mathbf{e}_j)=\mathbf{A}\mathbf{e}_j\). Multiplication by \(\mathbf{e}_j\) selects column \(j\), so every column of \(\mathbf{B}\) equals the corresponding column of \(\mathbf{A}\). Therefore \(\mathbf{B}=\mathbf{A}\), proving uniqueness. \(\square\)

Coordinate Formulas, Images, and Preimages

Worked Example: A Map from \(\mathbb{R}^3\) to \(\mathbb{R}^2\)

Let \(T(x,y,z)=(x+2y-z,\;2x+y+z)\). Find its standard matrix, evaluate \(T(1,-1,2)\), and find every input mapping to \((3,1)\).

Evaluate the formula on each standard basis vector:

$$ T(\mathbf{e}_1)=\begin{bmatrix}1\\2\end{bmatrix},\qquad T(\mathbf{e}_2)=\begin{bmatrix}2\\1\end{bmatrix},\qquad T(\mathbf{e}_3)=\begin{bmatrix}-1\\1\end{bmatrix}. $$

These vectors become the columns, so the standard matrix is \(\mathbf{A}=\begin{bmatrix}1&2&-1\\2&1&1\end{bmatrix}\). For \(\mathbf{x}=(1,-1,2)^\top\),

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 1(1)+2(-1)+(-1)(2)\\ 2(1)+1(-1)+1(2) \end{bmatrix} = \begin{bmatrix}-3\\3\end{bmatrix}. $$

Substitution in the original formula gives \((1-2-2,\;2-1+2)=(-3,3)\), which checks the matrix calculation.

To find all preimages of \((3,1)^\top\), solve the augmented system. The row operations are shown at each step:

$$ \begin{bmatrix}1&2&-1&3\\2&1&1&1\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&2&-1&3\\0&-3&3&-5\end{bmatrix} \xrightarrow{R_2\to-\frac13R_2} \begin{bmatrix}1&2&-1&3\\0&1&-1&\frac53\end{bmatrix} $$
$$ \xrightarrow{R_1\to R_1-2R_2} \begin{bmatrix}1&0&1&-\frac13\\0&1&-1&\frac53\end{bmatrix}. $$

Writing \(z=t\), the equations give \(x=-\frac13-t\) and \(y=\frac53+t\). Therefore every preimage is \((-\frac13-t,\frac53+t,t)^\top\), with \(t\in\mathbb{R}\). For a check, the first output coordinate is \((-\frac13-t)+2(\frac53+t)-t=3\), and the second is \(2(-\frac13-t)+(\frac53+t)+t=1\). The parameter is free, so this output has infinitely many preimages.

A preimage problem is exactly a system \(\mathbf{A}\mathbf{x}=\mathbf{b}\). It may have no solution, one solution, or infinitely many solutions. The column space \(\operatorname{Col}\mathbf{A}\) is the set of all linear combinations of the columns of \(\mathbf{A}\); equivalently, it is the set of outputs \(T(\mathbf{x})\). Thus \(\mathbf{b}\) has a preimage precisely when \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\).

Theorem: For a linear map \(T:\mathbb{R}^n\to\mathbb{R}^m\), \(T\) is injective if and only if \(T(\mathbf{x})=\mathbf{0}\) has only the solution \(\mathbf{x}=\mathbf{0}\). Also, \(T\) is surjective if and only if every \(\mathbf{b}\in\mathbb{R}^m\) has a preimage, equivalently \(\operatorname{Col}\mathbf{A}=\mathbb{R}^m\), where \(\mathbf{A}\) is the standard matrix.

Proof. Suppose first that \(T\) is injective and \(T(\mathbf{x})=\mathbf{0}\). Since \(T(\mathbf{0})=\mathbf{0}\) by linearity, \(T(\mathbf{x})=T(\mathbf{0})\), so injectivity gives \(\mathbf{x}=\mathbf{0}\). Conversely, suppose the only solution of \(T(\mathbf{x})=\mathbf{0}\) is \(\mathbf{0}\), and suppose \(T(\mathbf{x})=T(\mathbf{y})\). Linearity gives \(T(\mathbf{x}-\mathbf{y})=T(\mathbf{x})-T(\mathbf{y})=\mathbf{0}\), so \(\mathbf{x}-\mathbf{y}=\mathbf{0}\), hence \(\mathbf{x}=\mathbf{y}\). This proves injectivity. By definition, surjectivity means that for each \(\mathbf{b}\in\mathbb{R}^m\) there is an \(\mathbf{x}\) with \(T(\mathbf{x})=\mathbf{b}\). Since \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\), the set of all such outputs is exactly the set of linear combinations of the columns of \(\mathbf{A}\), namely \(\operatorname{Col}\mathbf{A}\). Therefore surjectivity is equivalent to \(\operatorname{Col}\mathbf{A}=\mathbb{R}^m\). \(\square\)

For matrix tests, the earlier pivot criteria apply: a map is injective exactly when the homogeneous system has a pivot in every variable column, and it is surjective exactly when there is a pivot in every row. These conditions are distinct, especially for rectangular matrices.

Worked Example: A Map That Is Neither Injective Nor Surjective

Let \(S:\mathbb{R}^2\to\mathbb{R}^3\) be \(S(x,y)=(x+y,\;2x+2y,\;0)\). Determine its image, test injectivity and surjectivity, and solve \(S(x,y)=(3,6,0)\).

The standard matrix has columns \(S(\mathbf{e}_1)=(1,2,0)^\top\) and \(S(\mathbf{e}_2)=(1,2,0)^\top\):

$$ \mathbf{B}=\begin{bmatrix}1&1\\2&2\\0&0\end{bmatrix} \sim \begin{bmatrix}1&1\\0&0\\0&0\end{bmatrix} \quad(R_2\to R_2-2R_1). $$

The original columns are equal, so \(S(x,y)=(x+y)(1,2,0)^\top\), and the image is \(\operatorname{span}\{(1,2,0)^\top\}\). There is no pivot in the second variable column, so the map is not injective: indeed \(S(1,-1)=(0,0,0)\) even though \((1,-1)\ne(0,0)\). There are three rows but only one pivot row, so the map is not surjective onto \(\mathbb{R}^3\). For example, \((3,5,0)^\top\) cannot be in the image because every output has its second coordinate twice its first.

To solve for the preimages of \((3,6,0)^\top\), the first coordinate requires \(x+y=3\), and the other two coordinates then agree automatically. Set \(y=t\); the full family is \((x,y)=(3-t,t)\), \(t\in\mathbb{R}\). Substitution gives \(S(3-t,t)=(3,6,0)\), as required. This example distinguishes two questions: whether a particular output has a preimage, and whether every output has a preimage.

Composing Transformations

If \(T:\mathbb{R}^n\to\mathbb{R}^m\) and \(U:\mathbb{R}^m\to\mathbb{R}^p\), their composition \(U\circ T\) first applies \(T\), then applies \(U\). If the standard matrices are \(\mathbf{A}\) and \(\mathbf{B}\), respectively, their sizes are \(m\times n\) and \(p\times m\), so the product \(\mathbf{B}\mathbf{A}\) is defined and has size \(p\times n\).

Theorem (Standard matrix of a composition): With the maps and matrices above, the standard matrix of \(U\circ T\) is \(\mathbf{B}\mathbf{A}\).

Proof. For every \(\mathbf{x}\in\mathbb{R}^n\), the standard-matrix representations give \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\) and \(U(\mathbf{y})=\mathbf{B}\mathbf{y}\) for \(\mathbf{y}\in\mathbb{R}^m\). Therefore \((U\circ T)(\mathbf{x})=U(T(\mathbf{x}))=\mathbf{B}(\mathbf{A}\mathbf{x})=(\mathbf{B}\mathbf{A})\mathbf{x}\). By uniqueness of the standard matrix, the composition has standard matrix \(\mathbf{B}\mathbf{A}\). \(\square\)

Worked Example: Reflect, Then Shear

Let \(S(x,y)=(x,-y)\) be reflection across the \(x\)-axis, and let \(H(x,y)=(x+2y,y)\) be a shear. Find the matrix and formula for \(H\circ S\), evaluate it at \((3,1)\), and find the preimage of \((1,-1)\).

The standard matrices are \(\mathbf{A}_S=\begin{bmatrix}1&0\\0&-1\end{bmatrix}\) and \(\mathbf{A}_H=\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Because reflection occurs first, the composition matrix is \(\mathbf{A}_H\mathbf{A}_S\):

$$ \begin{bmatrix}1&2\\0&1\end{bmatrix} \begin{bmatrix}1&0\\0&-1\end{bmatrix} = \begin{bmatrix}1&-2\\0&-1\end{bmatrix}. $$

Thus \((H\circ S)(x,y)=(x-2y,-y)\), and \((H\circ S)(3,1)=(3-2,-1)=(1,-1)\). To find the preimage of \((1,-1)\), solve \(x-2y=1\) and \(-y=-1\). The second equation gives \(y=1\); then the first gives \(x=3\). Substitution checks both coordinates. The matrix has a pivot in each column and each row: \(R_2\to -R_2\), followed by \(R_1\to R_1+2R_2\), reduces it to \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\). The pivot criteria therefore show that this composition is both injective and surjective.

Common Pitfall: Reversing the Composition

A common error is to multiply the matrices in the order the transformations are named rather than the order they act. For “reflect, then shear,” writing \(\mathbf{A}_S\mathbf{A}_H\) gives the wrong map:

$$ \mathbf{A}_S\mathbf{A}_H = \begin{bmatrix}1&2\\0&-1\end{bmatrix}, \qquad \begin{bmatrix}1&2\\0&-1\end{bmatrix} \begin{bmatrix}3\\1\end{bmatrix} = \begin{bmatrix}5\\-1\end{bmatrix}. $$

This is not the correct output \((1,-1)\). It corresponds to applying the shear first and then reflecting. The correction is to translate the words into actions: \(S\) acts first, so its matrix is on the right, and \(H\) acts second, so its matrix is on the left. Directly checking a test vector is an effective way to catch an order error.

Mixed transformation problems become more manageable when each question is matched to its mathematical object. A coordinate formula or geometric action determines the standard matrix; an image is a matrix-vector product; a preimage is a solution of \(\mathbf{A}\mathbf{x}=\mathbf{b}\); injectivity concerns whether \(\mathbf{A}\mathbf{x}=\mathbf{0}\) has nonzero solutions; and surjectivity concerns whether every target vector is attainable. For compositions, first record the order of actions, then check that the matrix sizes allow the product, and finally verify the result on an input.

Check Your Understanding

For each problem, state the reasoning as well as the result.

  1. For \(T(x,y)=(2x-y,\;x+3y)\), find the standard matrix and compute \(T(1,2)\).
  2. For \(T(x,y,z)=(x+y,\;y+z)\), find all inputs mapping to \((4,1)\).
  3. For \(S(x,y)=(x+y,\;2x+2y,\;0)\), explain why \((1,3,0)\) has no preimage.
  4. If \(T\) has matrix \(\mathbf{A}\) and \(U\) has matrix \(\mathbf{B}\), which product represents “apply \(T\), then \(U\)”? Give the dimensions of both matrices.
  5. Explain how the pivot columns and pivot rows test injectivity and surjectivity, respectively, for a standard matrix.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon