Tutorials › Linear Algebra › Standard Matrices from Basis-Vector Images

Linear Transformations of R^n · Tutorial 189 of 1000

Standard Matrices from Basis-Vector Images

Use the images of the standard basis vectors to build a transformation’s matrix, then verify its action on specific inputs.

Intermediate 9 min read

What You'll Learn

  • Identify the standard basis vectors in the input and output spaces.
  • Construct a matrix by placing the images of the input basis vectors in its columns.
  • Read each matrix entry from the corresponding basis-vector image.
  • Compute basis-vector images directly from a transformation formula.
  • Check a constructed matrix by comparing its product with the transformation’s formula.
  • Recognize why the construction depends on linearity.

Why Basis-Vector Images Give the Columns

A matrix transforms an input by combining its columns, with the input coordinates as coefficients. For a linear transformation, this gives a direct way to build its matrix: find what the transformation does to each standard coordinate vector, then place those output vectors in order as columns. The input coordinates determine how much of each column contributes to the output.

For \(n\in\mathbb{N}\), the standard basis of \(\mathbb{R}^n\) is the ordered list \(\mathcal E_n=(\mathbf e_1,\dots,\mathbf e_n)\), where \(\mathbf e_j\) has a \(1\) in position \(j\) and \(0\) in every other position. For example, \(\mathbf e_1=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf e_2=\begin{bmatrix}0\\1\end{bmatrix}\) in \(\mathbb{R}^2\). Every \(\mathbf x=\begin{bmatrix}x_1\\ \vdots\\x_n\end{bmatrix}\in\mathbb{R}^n\) can be written as \(x_1\mathbf e_1+\cdots+x_n\mathbf e_n\).

Definition: Let \(T:\mathbb{R}^n\to\mathbb{R}^m\) be linear, and let \(\mathcal E_n\) and \(\mathcal E_m\) be the standard bases of the input and output spaces. The standard matrix of \(T\), denoted \([T]_{\mathcal E_m\leftarrow\mathcal E_n}\), is the \(m\times n\) matrix whose \(j\)th column is \(T(\mathbf e_j)\): $$ [T]_{\mathcal E_m\leftarrow\mathcal E_n} = \begin{bmatrix}T(\mathbf e_1)&\cdots&T(\mathbf e_n)\end{bmatrix}. $$

The number of columns is the input dimension \(n\), because there is one column for each input standard basis vector. The number of rows is the output dimension \(m\), because each column is an output vector in \(\mathbb{R}^m\). In practice, calculate the images \(T(\mathbf e_j)\) from the given formula for \(T\); do not assume that the entries in the formula can simply be copied into the matrix in the same arrangement.

Proposition: If \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear and \(\mathbf A=[T]_{\mathcal E_m\leftarrow\mathcal E_n}\), then \(T(\mathbf x)=\mathbf A\mathbf x\) for every \(\mathbf x\in\mathbb{R}^n\).

Proof. Write \(\mathbf x=\begin{bmatrix}x_1&\cdots&x_n\end{bmatrix}^{\top}\). Since \(\mathbf x=x_1\mathbf e_1+\cdots+x_n\mathbf e_n\), linearity gives \(T(\mathbf x)=x_1T(\mathbf e_1)+\cdots+x_nT(\mathbf e_n)\). By construction, the columns of \(\mathbf A\) are \(T(\mathbf e_1),\dots,T(\mathbf e_n)\). Matrix multiplication by \(\mathbf x\) forms exactly that same linear combination of the columns, so \(\mathbf A\mathbf x=T(\mathbf x)\). \(\square\)

This proposition is the reason the column construction works: the matrix product uses the input coordinates to combine the transformation’s basis-vector images. It also gives a practical check. For a test input \(\mathbf x\), compute \(T(\mathbf x)\) from the formula and \(\mathbf A\mathbf x\) from the matrix. The results should agree.

Corollary: If \(\mathbf A=[T]_{\mathcal E_m\leftarrow\mathcal E_n}\) has entries \(a_{ij}\), then \(a_{ij}\) is the \(i\)th coordinate of \(T(\mathbf e_j)\).

Proof. The \(j\)th column of \(\mathbf A\) is \(T(\mathbf e_j)\). The entry in row \(i\), column \(j\) is therefore the \(i\)th coordinate of that column vector, which is the \(i\)th coordinate of \(T(\mathbf e_j)\). \(\square\)

Constructing a Matrix from a Formula

1
Record the dimensions.
For \(T:\mathbb{R}^n\to\mathbb{R}^m\), the standard matrix must have \(m\) rows and \(n\) columns.
2
Find the standard basis inputs.
Use \(\mathbf e_1,\dots,\mathbf e_n\), each with one \(1\) and all other entries \(0\).
3
Evaluate the transformation.
Compute \(T(\mathbf e_j)\) for each \(j\). Each result is an \(m\)-entry column vector.
4
Place the images in order.
Use \(T(\mathbf e_j)\) as column \(j\) to form the standard matrix.
5
Verify on an input.
Compare the formula’s output with the product of the constructed matrix and the input column.

The transformation must be linear for the column construction to represent it on every input. Linearity means that \(T(a\mathbf u+b\mathbf v)=aT(\mathbf u)+bT(\mathbf v)\) for all input vectors \(\mathbf u,\mathbf v\) and real scalars \(a,b\). It is what allows the formula \(T(x_1\mathbf e_1+\cdots+x_n\mathbf e_n)=x_1T(\mathbf e_1)+\cdots+x_nT(\mathbf e_n)\). The examples below use linear formulas.

Worked Example: A Transformation from R² to R³

Let \(T:\mathbb{R}^2\to\mathbb{R}^3\) be defined by \(T\begin{pmatrix}x\\y\end{pmatrix}=\begin{bmatrix}2x-y\\x+3y\\4y\end{bmatrix}\). Find its standard matrix and check it on \(\mathbf x=\begin{bmatrix}3\\-2\end{bmatrix}\).

The input standard basis vectors are \(\mathbf e_1=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf e_2=\begin{bmatrix}0\\1\end{bmatrix}\). Substituting the first gives \(T(\mathbf e_1)=\begin{bmatrix}2(1)-0\\1+3(0)\\4(0)\end{bmatrix}=\begin{bmatrix}2\\1\\0\end{bmatrix}\). Substituting the second gives \(T(\mathbf e_2)=\begin{bmatrix}2(0)-1\\0+3(1)\\4(1)\end{bmatrix}=\begin{bmatrix}-1\\3\\4\end{bmatrix}\). Place these two output vectors in order as columns:

$$ [T]_{\mathcal E_3\leftarrow\mathcal E_2} = \begin{bmatrix}2&-1\\1&3\\0&4\end{bmatrix}. $$

Now compute the output from the original formula at \(\mathbf x=\begin{bmatrix}3\\-2\end{bmatrix}\): \(T(\mathbf x)=\begin{bmatrix}2(3)-(-2)\\3+3(-2)\\4(-2)\end{bmatrix}=\begin{bmatrix}8\\-3\\-8\end{bmatrix}\). The matrix product gives

$$ [T]_{\mathcal E_3\leftarrow\mathcal E_2}\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}8\\-3\\-8\end{bmatrix}. $$

Check: Both calculations give \(\begin{bmatrix}8\\-3\\-8\end{bmatrix}\), as required.

Worked Example: A Transformation from R³ to R²

Let \(S:\mathbb{R}^3\to\mathbb{R}^2\) be defined by \(S\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{bmatrix}x+2y-z\\3x-y+2z\end{bmatrix}\). Construct its standard matrix and check it on \(\mathbf x=\begin{bmatrix}1\\-2\\3\end{bmatrix}\).

The three standard basis inputs are \(\mathbf e_1=\begin{bmatrix}1\\0\\0\end{bmatrix}\), \(\mathbf e_2=\begin{bmatrix}0\\1\\0\end{bmatrix}\), and \(\mathbf e_3=\begin{bmatrix}0\\0\\1\end{bmatrix}\). Evaluate the formula at each:

$$ S(\mathbf e_1)=\begin{bmatrix}1+2(0)-0\\3(1)-0+2(0)\end{bmatrix} =\begin{bmatrix}1\\3\end{bmatrix}, \qquad S(\mathbf e_2)=\begin{bmatrix}0+2(1)-0\\0-1+0\end{bmatrix} =\begin{bmatrix}2\\-1\end{bmatrix}, $$
$$ S(\mathbf e_3)=\begin{bmatrix}0+0-1\\0-0+2(1)\end{bmatrix} =\begin{bmatrix}-1\\2\end{bmatrix}. $$

Thus the standard matrix has two rows, since outputs have two coordinates, and three columns, one for each input basis vector:

$$ [S]_{\mathcal E_2\leftarrow\mathcal E_3} = \begin{bmatrix}1&2&-1\\3&-1&2\end{bmatrix}. $$

From the formula, the test input gives \(S(\mathbf x)=\begin{bmatrix}1+2(-2)-3\\3(1)-(-2)+2(3)\end{bmatrix}=\begin{bmatrix}-6\\11\end{bmatrix}\). From the matrix,

$$ [S]_{\mathcal E_2\leftarrow\mathcal E_3}\mathbf x = \begin{bmatrix}1&2&-1\\3&-1&2\end{bmatrix} \begin{bmatrix}1\\-2\\3\end{bmatrix} = \begin{bmatrix}1-4-3\\3+2+6\end{bmatrix} = \begin{bmatrix}-6\\11\end{bmatrix}. $$

Check: The formula and matrix product agree. In particular, the negative coefficient of \(z\) in the first output coordinate appears in row 1, column 3, because it is the first coordinate of \(S(\mathbf e_3)\).

Reading Coefficients and Zero Images

For a transformation given coordinate by coordinate, each column can often be assembled by collecting the coefficients of one input variable. This is a shortcut for evaluating the standard basis vectors, not a different rule. For example, if the first output coordinate is \(x+2y\), its coefficients on \(x\) and \(y\) are \(1\) and \(2\), so those are the first-row entries. The second output coordinate supplies the second row. Evaluating the basis vectors is a reliable way to confirm the arrangement, especially when signs or several output coordinates make copying coefficients error-prone.

Worked Example: A Zero Column from a Missing Variable

Let \(U:\mathbb{R}^3\to\mathbb{R}^3\) be defined by \(U\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{bmatrix}x+2y\\2x+4y\\-y+3z\end{bmatrix}\). Find its standard matrix and check it on \(\mathbf x=\begin{bmatrix}2\\-1\\2\end{bmatrix}\).

Evaluate at \(\mathbf e_1=\begin{bmatrix}1\\0\\0\end{bmatrix}\): \(U(\mathbf e_1)=\begin{bmatrix}1\\2\\0\end{bmatrix}\). At \(\mathbf e_2=\begin{bmatrix}0\\1\\0\end{bmatrix}\): \(U(\mathbf e_2)=\begin{bmatrix}2\\4\\-1\end{bmatrix}\). At \(\mathbf e_3=\begin{bmatrix}0\\0\\1\end{bmatrix}\): \(U(\mathbf e_3)=\begin{bmatrix}0\\0\\3\end{bmatrix}\). Therefore,

$$ [U]_{\mathcal E_3\leftarrow\mathcal E_3} = \begin{bmatrix}1&2&0\\2&4&0\\0&-1&3\end{bmatrix}. $$

The third column has zero entries in its first two positions because \(z\) does not appear in those output coordinates. The formula gives \(U(\mathbf x)=\begin{bmatrix}2+2(-1)\\2(2)+4(-1)\\-(-1)+3(2)\end{bmatrix}=\begin{bmatrix}0\\0\\7\end{bmatrix}\). Multiplication by the matrix gives

$$ [U]_{\mathcal E_3\leftarrow\mathcal E_3}\mathbf x = \begin{bmatrix}1&2&0\\2&4&0\\0&-1&3\end{bmatrix} \begin{bmatrix}2\\-1\\2\end{bmatrix} = \begin{bmatrix}2-2+0\\4-4+0\\0+1+6\end{bmatrix} = \begin{bmatrix}0\\0\\7\end{bmatrix}. $$

Check: The formula and the matrix product both give \(\begin{bmatrix}0\\0\\7\end{bmatrix}\). A zero entry in a column records a zero coordinate of one basis-vector image; a whole zero column would mean that the corresponding basis vector maps to \(\mathbf 0\).

A Common Mistake: Putting Images in Rows

The images are columns, not rows. The column convention matters because the product \(\mathbf A\mathbf x\) combines the columns using the coordinates of \(\mathbf x\). Consider \(V:\mathbb{R}^2\to\mathbb{R}^2\) given by \(V\begin{pmatrix}x\\y\end{pmatrix}=\begin{bmatrix}2x+3y\\x-y\end{bmatrix}\). Its basis-vector images are \(V(\mathbf e_1)=\begin{bmatrix}2\\1\end{bmatrix}\) and \(V(\mathbf e_2)=\begin{bmatrix}3\\-1\end{bmatrix}\). The correct standard matrix is therefore \(\begin{bmatrix}2&3\\1&-1\end{bmatrix}\).

A mistaken arrangement puts the images across rows and gives \(\begin{bmatrix}2&1\\3&-1\end{bmatrix}\). This fails immediately on \(\mathbf e_1=\begin{bmatrix}1\\0\end{bmatrix}\): \(\begin{bmatrix}2&1\\3&-1\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}=\begin{bmatrix}2\\3\end{bmatrix}\), but \(V(\mathbf e_1)=\begin{bmatrix}2\\1\end{bmatrix}\). The correction is to place \(V(\mathbf e_1)\) in the first column and \(V(\mathbf e_2)\) in the second. With the correct matrix, \(\begin{bmatrix}2&3\\1&-1\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}=\begin{bmatrix}2\\1\end{bmatrix}\), as required.

Another important caution is that basis-vector images alone do not encode an arbitrary formula unless that formula is linear. For instance, \(F:\mathbb{R}^2\to\mathbb{R}^2\), \(F\begin{pmatrix}x\\y\end{pmatrix}=\begin{bmatrix}x\\y+xy\end{bmatrix}\), has \(F(\mathbf e_1)=\begin{bmatrix}1\\0\end{bmatrix}\) and \(F(\mathbf e_2)=\begin{bmatrix}0\\1\end{bmatrix}\). The matrix formed from those columns is the identity matrix, whose product with \(\begin{bmatrix}1\\1\end{bmatrix}\) is \(\begin{bmatrix}1\\1\end{bmatrix}\). But \(F\begin{pmatrix}1\\1\end{pmatrix}=\begin{bmatrix}1\\2\end{bmatrix}\). The mismatch is consistent with the construction’s hypothesis: \(F\) is not linear.

Check Your Understanding

For each linear transformation, calculate the basis-vector images before writing the matrix. Where asked, verify the result on the stated input.

  1. Find the standard matrix of \(T:\mathbb{R}^2\to\mathbb{R}^2\), \(T\begin{pmatrix}x\\y\end{pmatrix}=\begin{bmatrix}x-4y\\2x+y\end{bmatrix}\).
  2. For \(S:\mathbb{R}^3\to\mathbb{R}^2\), \(S\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{bmatrix}2x-z\\x+y+3z\end{bmatrix}\), find the standard matrix and check it on \(\begin{bmatrix}1\\2\\-1\end{bmatrix}\).
  3. For a map from \(\mathbb{R}^4\) to \(\mathbb{R}^3\), how many rows and columns does its standard matrix have? Explain what determines each number.
  4. If the third column of a standard matrix is \(\begin{bmatrix}0\\-2\\5\end{bmatrix}\), what is \(T(\mathbf e_3)\)?
  5. Why can the images of the standard basis vectors be used to represent a linear transformation on every input?

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