Tutorials › Linear Algebra › Recovering a Matrix from Transformation Constraints

Linear Transformations of R^n · Tutorial 207 of 1000

Recovering a Matrix from Transformation Constraints

Recover a standard matrix from prescribed images by expressing inputs in a basis and checking every condition against the resulting map.

Intermediate 10 min read

What You'll Learn

  • Build a standard matrix from the images of the standard basis vectors.
  • Recover a matrix when the prescribed inputs are independent but not standard basis vectors.
  • Use input coordinates to calculate the columns of the unknown matrix.
  • Check whether additional input-output constraints are consistent with linearity.
  • Verify a recovered transformation by multiplying the matrix by each prescribed input.

What Transformation Constraints Determine

A linear transformation is determined by how it acts on enough inputs to describe every vector in its domain. In this tutorial, the domain is \(\mathbb{R}^2\), and the output space is either \(\mathbb{R}^2\) or \(\mathbb{R}^3\). The unknown standard matrix therefore has two columns: each column records the image of one standard basis vector. If images are prescribed for other independent inputs, we can first express the standard basis vectors using those inputs and then compute their images.

Throughout, vectors are columns and scalars are real. A map \(T:\mathbb{R}^2\to\mathbb{R}^m\), where \(m=2\) or \(m=3\), 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}^2\) and all \(a,b\in\mathbb{R}\). The standard basis vectors are \(\mathbf{e}_1=(1,0)^\top\) and \(\mathbf{e}_2=(0,1)^\top\).

Definition: The standard matrix of a linear map \(T:\mathbb{R}^2\to\mathbb{R}^m\) is the \(m\times2\) matrix \(\mathbf{A}\) such that \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\) for every \(\mathbf{x}\in\mathbb{R}^2\). Its first column is \(T(\mathbf{e}_1)\), and its second column is \(T(\mathbf{e}_2)\).

The columns are outputs, not rows of input-output data. Indeed, if \(\mathbf{x}=(x_1,x_2)^\top=x_1\mathbf{e}_1+x_2\mathbf{e}_2\), linearity gives \(T(\mathbf{x})=x_1T(\mathbf{e}_1)+x_2T(\mathbf{e}_2)\). This is exactly the product of the matrix with columns \(T(\mathbf{e}_1)\) and \(T(\mathbf{e}_2)\) by \(\mathbf{x}\).

Theorem (Standard-matrix recovery): For every linear map \(T:\mathbb{R}^2\to\mathbb{R}^m\), where \(m=2\) or \(m=3\), there is exactly one standard matrix. It is \(\mathbf{A}=\begin{bmatrix}T(\mathbf{e}_1)&T(\mathbf{e}_2)\end{bmatrix}\). Conversely, every \(m\times2\) matrix is the standard matrix of exactly one linear map from \(\mathbb{R}^2\) to \(\mathbb{R}^m\).

Proof. Let \(T\) be linear and set \(\mathbf{A}=\begin{bmatrix}T(\mathbf{e}_1)&T(\mathbf{e}_2)\end{bmatrix}\). For any \(\mathbf{x}=(x_1,x_2)^\top\), the equality \(\mathbf{x}=x_1\mathbf{e}_1+x_2\mathbf{e}_2\) gives \(T(\mathbf{x})=x_1T(\mathbf{e}_1)+x_2T(\mathbf{e}_2)=\mathbf{A}\mathbf{x}\). Thus \(\mathbf{A}\) represents \(T\). If another matrix \(\mathbf{B}\) also represents \(T\), then \(\mathbf{B}\mathbf{e}_1=T(\mathbf{e}_1)\) and \(\mathbf{B}\mathbf{e}_2=T(\mathbf{e}_2)\); these products are the first and second columns of \(\mathbf{B}\), so \(\mathbf{B}=\mathbf{A}\). Conversely, given any \(m\times2\) matrix \(\mathbf{A}\), define \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\). Matrix multiplication gives \(T(a\mathbf{x}+b\mathbf{y})=aT(\mathbf{x})+bT(\mathbf{y})\), so \(T\) is linear, and its values on \(\mathbf{e}_1,\mathbf{e}_2\) are the columns of \(\mathbf{A}\). The formula also shows that no other map with those columns is possible. \(\square\)

Starting with the Standard Basis

Worked Example: Prescribed Images of the Standard Basis

Suppose a linear map \(T:\mathbb{R}^2\to\mathbb{R}^3\) is required to satisfy \(T(\mathbf{e}_1)=(2,-1,0)^\top\) and \(T(\mathbf{e}_2)=(1,3,4)^\top\). Find its standard matrix and calculate \(T(3,-2)^\top\).

Insert the prescribed images as columns, in the same order as the basis vectors:

$$ \mathbf{A}= \begin{bmatrix} 2&1\\ -1&3\\ 0&4 \end{bmatrix}. $$

For \(\mathbf{x}=(3,-2)^\top\), matrix multiplication gives

$$ T(\mathbf{x})=\mathbf{A}\mathbf{x} = \begin{bmatrix} 2&1\\ -1&3\\ 0&4 \end{bmatrix} \begin{bmatrix}3\\-2\end{bmatrix} = \begin{bmatrix} 2(3)+1(-2)\\ (-1)(3)+3(-2)\\ 0(3)+4(-2) \end{bmatrix} = \begin{bmatrix}4\\-9\\-8\end{bmatrix}. $$

Check: the first and second columns are the specified images of \(\mathbf{e}_1\) and \(\mathbf{e}_2\). Also, \((3,-2)^\top=3\mathbf{e}_1-2\mathbf{e}_2\), so linearity gives \(3(2,-1,0)^\top-2(1,3,4)^\top=(4,-9,-8)^\top\), agreeing with the product.

Recovering a Matrix from Other Independent Inputs

Now suppose the prescribed inputs are \(\mathbf{u}\) and \(\mathbf{v}\), not necessarily \(\mathbf{e}_1,\mathbf{e}_2\). They must be linearly independent: neither may be obtained as a scalar multiple of the other, and the only equation \(s\mathbf{u}+t\mathbf{v}=\mathbf{0}\) must have \(s=t=0\). In \(\mathbb{R}^2\), two independent vectors provide unique coordinates for every input. One way to see this computationally is to place them as columns in \(\mathbf{U}=\begin{bmatrix}\mathbf{u}&\mathbf{v}\end{bmatrix}\). The earlier pivot-column criterion says independent columns have a pivot in each column. Here \(\mathbf{U}\) has two rows and two columns, so its reduced row echelon form is \(\mathbf{I}_2\); consequently, \(\mathbf{U}\mathbf{c}=\mathbf{x}\) has exactly one solution \(\mathbf{c}\) for each \(\mathbf{x}\in\mathbb{R}^2\).

Theorem (Recovery from independent inputs): Let \(\mathbf{u},\mathbf{v}\in\mathbb{R}^2\) be linearly independent, and let \(\mathbf{p},\mathbf{q}\in\mathbb{R}^m\), where \(m=2\) or \(m=3\). There is exactly one linear map \(T:\mathbb{R}^2\to\mathbb{R}^m\) such that \(T(\mathbf{u})=\mathbf{p}\) and \(T(\mathbf{v})=\mathbf{q}\).

Proof. Because \(\mathbf{u},\mathbf{v}\) are independent, the pivot-column criterion applied to \(\mathbf{U}=\begin{bmatrix}\mathbf{u}&\mathbf{v}\end{bmatrix}\) gives a pivot in each of its two columns. Its reduced row echelon form is therefore \(\mathbf{I}_2\), so for every \(\mathbf{x}\in\mathbb{R}^2\) there is a unique pair \(s,t\in\mathbb{R}\) with \(\mathbf{x}=s\mathbf{u}+t\mathbf{v}\). Define \(T(\mathbf{x})=s\mathbf{p}+t\mathbf{q}\) using this unique representation. If \(\mathbf{x}=s\mathbf{u}+t\mathbf{v}\) and \(\mathbf{y}=r\mathbf{u}+w\mathbf{v}\), then \(\mathbf{x}+\mathbf{y}=(s+r)\mathbf{u}+(t+w)\mathbf{v}\), and for any scalar \(c\), \(c\mathbf{x}=(cs)\mathbf{u}+(ct)\mathbf{v}\). The definition of \(T\) now gives \(T(\mathbf{x}+\mathbf{y})=T(\mathbf{x})+T(\mathbf{y})\) and \(T(c\mathbf{x})=cT(\mathbf{x})\), so \(T\) is linear. Its values on \(\mathbf{u}\) and \(\mathbf{v}\) are \(\mathbf{p}\) and \(\mathbf{q}\), respectively. Finally, any linear map with those prescribed values must satisfy \(T(s\mathbf{u}+t\mathbf{v})=s\mathbf{p}+t\mathbf{q}\) for every \(\mathbf{x}=s\mathbf{u}+t\mathbf{v}\); thus it must be the map just defined. \(\square\)

This proof also suggests a practical method. Find the coefficients representing \(\mathbf{e}_1\) and \(\mathbf{e}_2\) in terms of \(\mathbf{u},\mathbf{v}\). Apply the same coefficients to \(\mathbf{p},\mathbf{q}\); the resulting output vectors are the columns of the standard matrix.

Worked Example: Two Nonstandard Inputs Determine a 3-by-2 Matrix

Find the standard matrix of the linear map \(T:\mathbb{R}^2\to\mathbb{R}^3\) satisfying \(T(1,1)^\top=(2,1,0)^\top\) and \(T(1,-1)^\top=(0,3,2)^\top\).

The inputs are independent: if \(s(1,1)^\top+t(1,-1)^\top=(0,0)^\top\), then \(s+t=0\) and \(s-t=0\). Adding these equations gives \(2s=0\), hence \(s=0\), and then \(t=0\). Express the standard basis vectors using the inputs \(\mathbf{u}=(1,1)^\top\) and \(\mathbf{v}=(1,-1)^\top\):

$$ \mathbf{e}_1=\tfrac12\mathbf{u}+\tfrac12\mathbf{v}, \qquad \mathbf{e}_2=\tfrac12\mathbf{u}-\tfrac12\mathbf{v}. $$

By linearity, their images are

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

Thus the standard matrix has these images as columns:

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

Check: Multiplying by the first prescribed input adds the columns: \(\mathbf{A}(1,1)^\top=(2,1,0)^\top\). Multiplying by the second subtracts the second column from the first: \(\mathbf{A}(1,-1)^\top=(0,3,2)^\top\). Both constraints are satisfied.

Extra Constraints and Consistency

Sometimes more than two input-output pairs are given. Once two independent inputs determine the map, every additional condition must agree with the same linear combination of outputs. This is not an extra choice: linearity forces it.

Theorem (Compatibility of a dependent input): Suppose \(\mathbf{u},\mathbf{v}\in\mathbb{R}^2\) are independent, and a linear map is prescribed to send them to \(\mathbf{p},\mathbf{q}\). If a further input is \(\mathbf{w}=a\mathbf{u}+b\mathbf{v}\), then its image must be \(a\mathbf{p}+b\mathbf{q}\). Prescribing \(T(\mathbf{w})=\mathbf{r}\) is consistent with these conditions if and only if \(\mathbf{r}=a\mathbf{p}+b\mathbf{q}\).

Proof. If a linear map satisfies \(T(\mathbf{u})=\mathbf{p}\) and \(T(\mathbf{v})=\mathbf{q}\), then \(T(\mathbf{w})=T(a\mathbf{u}+b\mathbf{v})=a\mathbf{p}+b\mathbf{q}\). Therefore consistency requires \(\mathbf{r}=a\mathbf{p}+b\mathbf{q}\). Conversely, if that equality holds, the unique map from the recovery theorem has \(T(\mathbf{w})=a\mathbf{p}+b\mathbf{q}=\mathbf{r}\), so it satisfies the additional condition as well. \(\square\)

Worked Example: Checking a Third Constraint

Suppose \(T:\mathbb{R}^2\to\mathbb{R}^2\) must satisfy \(T(1,0)^\top=(2,-1)^\top\), \(T(0,1)^\top=(3,4)^\top\), and \(T(1,1)^\top=(5,3)^\top\). Determine whether the constraints are consistent and find the standard matrix.

The first two inputs are \(\mathbf{e}_1,\mathbf{e}_2\), so the candidate matrix is

$$ \mathbf{A}= \begin{bmatrix} 2&3\\ -1&4 \end{bmatrix}. $$

The third input is \((1,1)^\top=(1,0)^\top+(0,1)^\top\), so linearity requires its image to be \((2,-1)^\top+(3,4)^\top=(5,3)^\top\), exactly as prescribed. Hence the conditions are consistent. Direct multiplication confirms all three: \(\mathbf{A}(1,0)^\top=(2,-1)^\top\), \(\mathbf{A}(0,1)^\top=(3,4)^\top\), and \(\mathbf{A}(1,1)^\top=(2+3,-1+4)^\top=(5,3)^\top\).

Check: each prescribed input has been multiplied by the recovered matrix, and each product equals its required output.

A Common Mistake: Placing Images in Rows

Suppose \(T(\mathbf{e}_1)=(2,-1)^\top\) and \(T(\mathbf{e}_2)=(3,4)^\top\). A common incorrect arrangement is \(\begin{bmatrix}2&-1\\3&4\end{bmatrix}\), formed by writing the image coordinates as rows. But multiplying this matrix by \(\mathbf{e}_1\) gives \((2,3)^\top\), not the required \((2,-1)^\top\). The correction is to place each image in a column:

$$ \mathbf{A}= \begin{bmatrix}2&3\\-1&4\end{bmatrix}, \qquad \mathbf{A}\mathbf{e}_1= \begin{bmatrix}2\\-1\end{bmatrix}, \qquad \mathbf{A}\mathbf{e}_2= \begin{bmatrix}3\\4\end{bmatrix}. $$

A reliable check is to multiply the proposed matrix by each standard basis vector: the products select its columns, so they must reproduce the prescribed images in order. For nonstandard inputs, check each given input directly instead. If there are extra constraints, first express each extra input as a combination of the independent inputs; its output must use the same coefficients.

Check Your Understanding

For each problem, use column vectors and verify the recovered matrix by multiplication.

  1. If \(T(\mathbf{e}_1)=(1,2,0)^\top\) and \(T(\mathbf{e}_2)=(-1,3,4)^\top\), write the standard matrix for \(T:\mathbb{R}^2\to\mathbb{R}^3\).
  2. Express \(\mathbf{e}_1,\mathbf{e}_2\) in terms of \((1,1)^\top\) and \((1,-1)^\top\).
  3. For the map in the second worked example, calculate \(T(2,1)^\top\) using its standard matrix.
  4. If \(T(1,0)^\top=(1,2)^\top\) and \(T(0,1)^\top=(3,1)^\top\), what must \(T(2,1)^\top\) equal? Explain using linearity.
  5. Can a linear map satisfy both \(T(1,0)^\top=(2,0)^\top\), \(T(0,1)^\top=(0,2)^\top\), and \(T(1,1)^\top=(1,1)^\top\)? Justify your answer.

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