Tutorials › Linear Algebra › Common Basis-Order and Coordinate-Convention Errors

Matrix Representations of Linear Maps · Tutorial 449 of 1000

Common Basis-Order and Coordinate-Convention Errors

Use basis labels, column coordinates, and composition order carefully to build and verify matrix representations of linear maps.

Intermediate 11 min read

What You'll Learn

  • Read \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) as a map from \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates.
  • Explain why the columns of a representation matrix are coordinate vectors of images of domain basis vectors.
  • Identify the error in treating matrix rows as the images of basis vectors.
  • Apply a reversed-basis representation only to coordinates in its stated input basis.
  • Determine the correct multiplication order for matrices representing a composition.
  • Check a proposed representation by applying it to coordinates and interpreting the output in the correct basis.

Read the Basis Labels Before the Entries

A matrix representing a linear map is not just a rectangular array attached to that map. Its entries depend on the chosen ordered basis of the domain and the chosen ordered basis of the codomain. The labels \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) record those choices: the matrix accepts coordinates in \(\mathcal{B}\) and returns coordinates in \(\mathcal{C}\). Many errors that look like arithmetic mistakes are actually failures to track this input and output convention.

Throughout this tutorial, the spaces are finite-dimensional over \(\mathbb{R}\). An ordered basis \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) of a vector space \(V\) gives each \(\mathbf{v}\in V\) a unique coordinate vector \([\mathbf{v}]_{\mathcal{B}}\in\mathbb{R}^n\), defined by \(\mathbf{v}=x_1\mathbf{b}_1+\cdots+x_n\mathbf{b}_n\) when \([\mathbf{v}]_{\mathcal{B}}=(x_1,\dots,x_n)^{\top}\). The order of the basis vectors matters because it determines the order of the coordinates.

Definition: Let \(T:V\to W\) be a linear map, let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) be an ordered basis of \(V\), and let \(\mathcal{C}=(\mathbf{c}_1,\dots,\mathbf{c}_m)\) be an ordered basis of \(W\). The matrix of \(T\) in these bases, written \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\), is the \(m\times n\) matrix satisfying \[ [T(\mathbf{v})]_{\mathcal{C}}=[T]_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}} \quad\text{for every }\mathbf{v}\in V. \] The arrow indicates the direction from input coordinates to output coordinates.

Keep the two roles separate. The basis to the right of the arrow is the domain basis and determines the input coordinates. The basis to the left is the codomain basis and determines how the output is expressed. If \(T:V\to W\), then the number of columns is \(\dim V\) and the number of rows is \(\dim W\). A matrix with the right dimensions can still be wrong if either basis label is wrong.

Why Columns, Not Rows, Record the Images

Theorem: With \(T\), \(\mathcal{B}\), and \(\mathcal{C}\) as above, column \(j\) of \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) is \([T(\mathbf{b}_j)]_{\mathcal{C}}\), for each \(j=1,\dots,n\).

Proof. Let \(\mathbf{A}=[T]_{\mathcal{C}\leftarrow\mathcal{B}}\), and let \(\mathbf{a}_j\) be its \(j\)th column. The coordinate vector of \(\mathbf{b}_j\) in the ordered basis \(\mathcal{B}\) is the \(j\)th standard coordinate vector \(\mathbf{e}_j\). By the defining property of the representation matrix, \([T(\mathbf{b}_j)]_{\mathcal{C}}=\mathbf{A}\mathbf{e}_j\). Multiplication by \(\mathbf{e}_j\) selects column \(j\), so \(\mathbf{a}_j=[T(\mathbf{b}_j)]_{\mathcal{C}}\). This argument applies to every \(j\) from \(1\) to \(n\). \(\square\)

This is why the standard construction places the coordinate vectors of the images of the domain basis vectors in the columns. Rows have a different role: a row collects the contributions to one output coordinate from all input coordinates. Reading a row as the image of a basis vector confuses these two roles.

Worked Example: Columns Give the Images

Let \(T:\mathbb{R}^2\to\mathbb{R}^2\) be \(T(x,y)=(x+2y,3x+4y)\), using the standard ordered basis \(\mathcal{E}=(\mathbf{e}_1,\mathbf{e}_2)\) in both spaces. Find the representation matrix and check its columns.

The first domain basis vector is \(\mathbf{e}_1=(1,0)^{\top}\), so \(T(\mathbf{e}_1)=(1,3)^{\top}\). The second is \(\mathbf{e}_2=(0,1)^{\top}\), so \(T(\mathbf{e}_2)=(2,4)^{\top}\). Standard coordinates are the vectors themselves, so these image coordinate vectors become the columns:

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

For an arbitrary input \(\mathbf{x}=(x,y)^{\top}\), multiplication gives

$$ \begin{bmatrix}1&2\\3&4\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}x+2y\\3x+4y\end{bmatrix} = [T(\mathbf{x})]_{\mathcal{E}}. $$

Check: Applying the matrix to \(\mathbf{e}_1\) gives \((1,3)^{\top}=T(\mathbf{e}_1)\), and applying it to \(\mathbf{e}_2\) gives \((2,4)^{\top}=T(\mathbf{e}_2)\). The columns match the images.

Common wrong calculation: Writing the rows \((1,2)^{\top}\) and \((3,4)^{\top}\) as the images would give the transposed matrix \(\begin{bmatrix}1&3\\2&4\end{bmatrix}\). That matrix sends \(\mathbf{e}_1\) to \((1,2)^{\top}\), but the actual image is \(T(\mathbf{e}_1)=(1,3)^{\top}\). The correction is to place each image coordinate vector in a column.

Swapping Bases Changes What the Coordinates Mean

Even for the same map, changing the domain basis or codomain basis generally changes the matrix. The identity map makes this dependence especially visible: it leaves each vector unchanged, but its input and output coordinates can be different when the bases differ. In particular, \([T]_{\mathcal{B}\leftarrow\mathcal{C}}\) is not an instruction to take \(\mathcal{B}\)-coordinates as input. Its input is \(\mathcal{C}\)-coordinates, and its output is \(\mathcal{B}\)-coordinates.

Worked Example: The Identity Map with Two Bases

Let \(V=W=\mathbb{R}^2\), let \(\mathcal{B}=(\mathbf{e}_1,\mathbf{e}_2)\), and let \(\mathcal{C}=(\mathbf{c}_1,\mathbf{c}_2)\), where \(\mathbf{c}_1=(1,1)^{\top}\) and \(\mathbf{c}_2=(1,-1)^{\top}\). Find the matrices of the identity map in both directions and track the coordinates of \(\mathbf{e}_1\).

For \([I]_{\mathcal{C}\leftarrow\mathcal{B}}\), the inputs are \(\mathcal{B}\)-coordinates and the outputs are \(\mathcal{C}\)-coordinates. Write each domain basis vector in the codomain basis. Since \(\mathbf{e}_1=\tfrac12\mathbf{c}_1+\tfrac12\mathbf{c}_2\) and \(\mathbf{e}_2=\tfrac12\mathbf{c}_1-\tfrac12\mathbf{c}_2\), the columns are \((\tfrac12,\tfrac12)^{\top}\) and \((\tfrac12,-\tfrac12)^{\top}\):

$$ [I]_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix} \tfrac12&\tfrac12\\ \tfrac12&-\tfrac12 \end{bmatrix}. $$

For the reversed labels, the inputs are \(\mathcal{C}\)-coordinates and the outputs are \(\mathcal{B}\)-coordinates. The columns are now the \(\mathcal{B}\)-coordinate vectors of \(\mathbf{c}_1\) and \(\mathbf{c}_2\):

$$ [I]_{\mathcal{B}\leftarrow\mathcal{C}} = \begin{bmatrix} 1&1\\ 1&-1 \end{bmatrix}. $$

The actual input coordinates for \(\mathbf{e}_1\) in \(\mathcal{C}\) are \([\mathbf{e}_1]_{\mathcal{C}}=(\tfrac12,\tfrac12)^{\top}\). Applying the reversed-basis matrix correctly gives

$$ [I]_{\mathcal{B}\leftarrow\mathcal{C}} [\mathbf{e}_1]_{\mathcal{C}} = \begin{bmatrix}1&1\\1&-1\end{bmatrix} \begin{bmatrix}\tfrac12\\\tfrac12\end{bmatrix} = \begin{bmatrix}1\\0\end{bmatrix} = [\mathbf{e}_1]_{\mathcal{B}}. $$

Check: The output is \(\mathcal{B}\)-coordinates, as the arrow specifies; those coordinates represent \(\mathbf{e}_1\). A tempting but incorrect move is to feed \((1,0)^{\top}\), the \(\mathcal{B}\)-coordinates of \(\mathbf{e}_1\), into this reversed-basis matrix and then read the result as \(\mathcal{C}\)-coordinates. The matrix gives \((1,1)^{\top}\), but according to its labels this is the \(\mathcal{B}\)-coordinate vector of the input vector \(\mathbf{c}_1\), since \((1,0)^{\top}\) was treated as \(\mathcal{C}\)-coordinates. Interpreting \((1,1)^{\top}\) instead as \(\mathcal{C}\)-coordinates would represent \(\mathbf{c}_1+\mathbf{c}_2=(2,0)^{\top}\), not \(\mathbf{e}_1\). The mistake is using coordinates in the wrong input basis and then misreading the output basis.

Composition Matrices Multiply in Application Order

Suppose \(S:U\to V\) is applied first and \(T:V\to W\) second. The output coordinates of \(S\) must be the input coordinates for \(T\). Thus the basis used to express the intermediate vector must agree on both sides of the matrix product. This agreement is what makes the order of multiplication unavoidable.

Theorem: Let \(S:U\to V\) and \(T:V\to W\) be linear maps between finite-dimensional real vector spaces. Let \(\mathcal{A}\), \(\mathcal{B}\), and \(\mathcal{C}\) be ordered bases of \(U\), \(V\), and \(W\), respectively. Then \[ [T\circ S]_{\mathcal{C}\leftarrow\mathcal{A}} = [T]_{\mathcal{C}\leftarrow\mathcal{B}} [S]_{\mathcal{B}\leftarrow\mathcal{A}}. \]

Proof. Let \(\mathbf{u}\in U\). By the defining property of the matrix of \(S\), \([S(\mathbf{u})]_{\mathcal{B}}=[S]_{\mathcal{B}\leftarrow\mathcal{A}}[\mathbf{u}]_{\mathcal{A}}\). Apply the defining property of the matrix of \(T\) to the vector \(S(\mathbf{u})\in V\): \([T(S(\mathbf{u}))]_{\mathcal{C}}=[T]_{\mathcal{C}\leftarrow\mathcal{B}}[S(\mathbf{u})]_{\mathcal{B}}\). Substituting the first equality into the second gives \[ [T(S(\mathbf{u}))]_{\mathcal{C}} = [T]_{\mathcal{C}\leftarrow\mathcal{B}} [S]_{\mathcal{B}\leftarrow\mathcal{A}} [\mathbf{u}]_{\mathcal{A}}. \] This holds for every \(\mathbf{u}\in U\), so the product matrix represents \(T\circ S\) from \(\mathcal{A}\)-coordinates to \(\mathcal{C}\)-coordinates. \(\square\)

The rightmost matrix acts first. In \([T]_{\mathcal{C}\leftarrow\mathcal{B}}[S]_{\mathcal{B}\leftarrow\mathcal{A}}\), the right factor takes \(\mathcal{A}\)-coordinates to \(\mathcal{B}\)-coordinates; the left factor then takes \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates. Reversing the factors generally fails both the basis-label check and the numerical check.

Worked Example: Reversing the Composition Order

Let \(S:\mathbb{R}^2\to\mathbb{R}^2\) be \(S(x,y)=(x+y,y)\), and let \(T:\mathbb{R}^2\to\mathbb{R}^2\) be \(T(x,y)=(x,x+y)\). Use the standard basis for all three spaces. Find the matrix of \(T\circ S\), and compare it with the incorrectly reversed product.

The images of the standard basis vectors give

$$ [S]=\begin{bmatrix}1&1\\0&1\end{bmatrix}, \qquad [T]=\begin{bmatrix}1&0\\1&1\end{bmatrix}. $$

Since \(S\) is applied first, the composition matrix is \([T][S]\):

$$ [T][S] = \begin{bmatrix}1&0\\1&1\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} = \begin{bmatrix} 1\cdot1+0\cdot0&1\cdot1+0\cdot1\\ 1\cdot1+1\cdot0&1\cdot1+1\cdot1 \end{bmatrix} = \begin{bmatrix}1&1\\1&2\end{bmatrix}. $$

Directly, \(T(S(x,y))=T(x+y,y)=(x+y,x+2y)\), which has the same matrix. The reversed product is instead

$$ [S][T] = \begin{bmatrix}1&1\\0&1\end{bmatrix} \begin{bmatrix}1&0\\1&1\end{bmatrix} = \begin{bmatrix}2&1\\1&1\end{bmatrix}. $$

Check: For \(\mathbf{e}_2=(0,1)^{\top}\), first apply \(S\): \(S(\mathbf{e}_2)=(1,1)^{\top}\). Then \(T(1,1)^{\top}=(1,2)^{\top}\). The correct product gives \([T][S]\mathbf{e}_2=(1,2)^{\top}\), whereas the reversed product gives \([S][T]\mathbf{e}_2=(1,1)^{\top}\). The latter is not \(T(S(\mathbf{e}_2))\).

A Reliable Convention Check

Before trusting a proposed matrix, check its labels and its action. These checks are short, but they catch different errors:

  • Check dimensions. If the domain has dimension \(n\) and the codomain has dimension \(m\), the matrix must have \(n\) columns and \(m\) rows.
  • Check a basis vector. Column \(j\) should equal the codomain-coordinate vector of the image of domain basis vector \(j\).
  • Check coordinate meanings. The input column must use the basis named on the right of the arrow, and the output must be interpreted in the basis named on the left.
  • Check composition compatibility. The output basis of the right-hand factor must be the input basis of the left-hand factor. The right-hand factor acts first.

When diagnosing a wrong answer, ask whether it fails because of a numerical computation or because the coordinate vector was assigned the wrong meaning. For example, the multiplication in the reversed-basis example is numerically correct: the error occurs only when \(\mathcal{B}\)-coordinates are supplied where \(\mathcal{C}\)-coordinates are required. Likewise, a transposed matrix may have the correct entries but put image vectors in rows rather than columns. Stating the bases beside every matrix makes these distinctions visible.

Check Your Understanding

For each question, track both the numerical vector and the basis in which its coordinates are expressed.

  1. If \(T:V\to W\), what input basis and output basis are specified by \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\)?
  2. For a matrix of a map in ordered bases \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) and \(\mathcal{C}\), what does column \(j\) represent?
  3. Let \(\mathcal{B}\) be the standard basis and \(\mathcal{C}=((1,1)^{\top},(1,-1)^{\top})\). What is \([\mathbf{e}_2]_{\mathcal{C}}\)?
  4. If \(S:U\to V\) and \(T:V\to W\), which matrix factor acts first in the product representing \(T\circ S\)?
  5. For the maps in the composition example, compute \(T(S(\mathbf{e}_1))\) directly and compare it with the first column of \([T][S]\).
  6. A proposed representation matrix has \(3\) rows and \(2\) columns. What dimensions must its domain and codomain have?

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