Tutorials › Linear Algebra › Changing Domain and Codomain Bases Independently

Coordinates and Change of Basis · Tutorial 389 of 1000

Changing Domain and Codomain Bases Independently

Use one transition matrix to convert input coordinates and another to convert output coordinates, then verify the resulting matrix by applying the map to a vector.

Intermediate 9 min read

What You'll Learn

  • Identify the direction of each transition matrix from its source and target bases.
  • Derive the matrix formula for changing domain and codomain bases independently.
  • Compute a new coordinate matrix for a map from R² to R³.
  • Check a transformed matrix by applying it to coordinates and reconstructing the output.
  • Recover the original matrix and diagnose a common output-coordinate error.

Two Coordinate Changes for One Map

A linear map takes vectors in a domain to vectors in a codomain. The coordinates used to describe those vectors do not have to come from the same basis, or even from spaces of the same dimension. When the domain basis changes, the input coordinates must be converted before applying the map’s matrix. When the codomain basis changes, the output coordinates must be converted afterward. These are separate operations, represented by separate transition matrices.

We work over \(\mathbb{R}\). Let \(V\) and \(W\) be finite-dimensional vector spaces, and let \(T:V\to W\) be linear. Write \(\mathcal{B}\) and \(\mathcal{C}\) for the bases used to represent the map initially, and \(\mathcal{B}'\) and \(\mathcal{C}'\) for the new domain and codomain bases. For a basis \(\mathcal{B}\), the coordinate vector \([\mathbf{x}]_{\mathcal{B}}\) records the coefficients of \(\mathbf{x}\) in that basis. The matrix \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) is defined by the rule that multiplying it by \([\mathbf{x}]_{\mathcal{B}}\) gives \([T(\mathbf{x})]_{\mathcal{C}}\).

Definition: For ordered bases \(\mathcal{B}\) and \(\mathcal{B}'\) of the same space, the transition matrix \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}\) converts \(\mathcal{B}'\)-coordinates into \(\mathcal{B}\)-coordinates: \([\mathbf{x}]_{\mathcal{B}}=\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}[\mathbf{x}]_{\mathcal{B}'}\). Its columns are the \(\mathcal{B}\)-coordinates of the vectors in \(\mathcal{B}'\), in order.

The arrow in the subscript indicates the direction of coordinate conversion: \(\mathcal{B}'\)-coordinates go in, and \(\mathcal{B}\)-coordinates come out. In particular, it is not a direction for moving the vector itself. The same convention applies to the codomain transition matrix \(\mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}}\), which converts \(\mathcal{C}\)-coordinates into \(\mathcal{C}'\)-coordinates.

The Independent-Basis Conversion Formula

Theorem: Let \(T:V\to W\) be a linear map between finite-dimensional real vector spaces. Let \(\mathcal{B},\mathcal{B}'\) be ordered bases of \(V\), and let \(\mathcal{C},\mathcal{C}'\) be ordered bases of \(W\). Then \([T]_{\mathcal{C}'\leftarrow\mathcal{B}'}=\mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}}[T]_{\mathcal{C}\leftarrow\mathcal{B}}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}\).

Proof. Take any \(\mathbf{x}\in V\). First convert its new domain coordinates to the original domain coordinates: \([\mathbf{x}]_{\mathcal{B}}=\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}[\mathbf{x}]_{\mathcal{B}'}\). By the definition of the original matrix of \(T\), \([T(\mathbf{x})]_{\mathcal{C}}=[T]_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{x}]_{\mathcal{B}}\). Convert these output coordinates to the new codomain coordinates: \([T(\mathbf{x})]_{\mathcal{C}'}=\mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}}[T(\mathbf{x})]_{\mathcal{C}}\). Substituting the first two equalities into the third gives \([T(\mathbf{x})]_{\mathcal{C}'}=\mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}}[T]_{\mathcal{C}\leftarrow\mathcal{B}}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}[\mathbf{x}]_{\mathcal{B}'}\). By definition, \([T]_{\mathcal{C}'\leftarrow\mathcal{B}'}\) is the matrix that sends \([\mathbf{x}]_{\mathcal{B}'}\) to \([T(\mathbf{x})]_{\mathcal{C}'}\). The displayed equality holds for every \(\mathbf{x}\in V\), so the two matrices are equal. \(\square\)

This formula also explains the order of multiplication. The rightmost factor acts first: it changes the input coordinates. The middle matrix applies the map in the original bases. The leftmost factor changes the output coordinates. The dimensions match: if \(\dim V=n\) and \(\dim W=m\), the factors have sizes \(m\times m\), \(m\times n\), and \(n\times n\), so the result is an \(m\times n\) matrix.

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

Worked Example: Change Both Bases Independently

Let \(T:\mathbb{R}^2\to\mathbb{R}^3\) be given in standard coordinates by \(T(x_1,x_2)=(x_1+2x_2,\ x_2,\ x_1-x_2)\). The original domain and codomain bases are standard. Use the new domain basis \(\mathcal{B}'=((1,1),(1,-1))\) and the new codomain basis \(\mathcal{C}'=((1,0,0),(1,1,0),(0,0,1))\) to find the matrix of \(T\).

In standard coordinates the matrix is \(\mathbf{A}=\begin{bmatrix}1&2\\0&1\\1&-1\end{bmatrix}\). The columns of the domain transition matrix are the new domain basis vectors written in standard coordinates. Thus \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}=\begin{bmatrix}1&1\\1&-1\end{bmatrix}\). The columns of the codomain transition matrix \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{C}'}\) are the new codomain basis vectors in standard coordinates: \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{C}'}=\begin{bmatrix}1&1&0\\0&1&0\\0&0&1\end{bmatrix}\).

To obtain the direction needed in the conversion formula, invert this last matrix. Direct multiplication verifies the inverse:

$$ \mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}} = \begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix}, \qquad \begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix} \begin{bmatrix}1&1&0\\0&1&0\\0&0&1\end{bmatrix} = \begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}. $$

Apply the input transition matrix first:

$$ \mathbf{A}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'} = \begin{bmatrix}1&2\\0&1\\1&-1\end{bmatrix} \begin{bmatrix}1&1\\1&-1\end{bmatrix} = \begin{bmatrix}3&-1\\1&-1\\0&2\end{bmatrix}. $$

Now apply the output transition matrix:

$$ \mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}} \mathbf{A}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'} = \begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix} \begin{bmatrix}3&-1\\1&-1\\0&2\end{bmatrix} = \begin{bmatrix}2&0\\1&-1\\0&2\end{bmatrix}. $$

Therefore \([T]_{\mathcal{C}'\leftarrow\mathcal{B}'}=\begin{bmatrix}2&0\\1&-1\\0&2\end{bmatrix}\). As an additional check on its columns, the first new domain basis vector maps to \(T(1,1)=(3,1,0)\). Its \(\mathcal{C}'\)-coordinates are \((2,1,0)\), since \(2(1,0,0)+1(1,1,0)=(3,1,0)\). The second basis vector maps to \(T(1,-1)=(-1,-1,2)\), whose \(\mathcal{C}'\)-coordinates are \((0,-1,2)\), since \(0(1,0,0)-1(1,1,0)+2(0,0,1)=(-1,-1,2)\). These are exactly the two columns computed above.

Check the New Matrix on an Input

Worked Example: Apply and Reconstruct

Use the new matrix from the previous example to find the \(\mathcal{C}'\)-coordinates of \(T(2,0)\), and check the answer in standard coordinates.

The input vector has new domain coordinates \((1,1)\), because \(1(1,1)+1(1,-1)=(2,0)\). Applying the new matrix gives

$$ [T(2,0)]_{\mathcal{C}'} = \begin{bmatrix}2&0\\1&-1\\0&2\end{bmatrix} \begin{bmatrix}1\\1\end{bmatrix} = \begin{bmatrix}2\\0\\2\end{bmatrix}. $$

Reconstruct the vector from these output coordinates: \(2(1,0,0)+0(1,1,0)+2(0,0,1)=(2,0,2)\). Directly from the definition of \(T\), \(T(2,0)=(2+2\cdot0,\ 0,\ 2-0)=(2,0,2)\). The reconstructed output agrees with the direct evaluation.

In general, reconstruction is a useful check because a coordinate vector is not itself the vector it describes. For example, the coordinate vector \((2,0,2)\) in this codomain basis describes \((2,0,2)\), but that agreement is specific to these coefficients and this basis. The reconstruction step must use the actual basis vectors, not treat the coordinates as standard coordinates automatically.

Recovering the Original Matrix

Worked Example: Reverse the Conversion

Suppose the new matrix is \(\mathbf{M}'=\begin{bmatrix}2&0\\1&-1\\0&2\end{bmatrix}\), and the bases are those in the first worked example. Recover the matrix in standard coordinates.

Rearrange the conversion formula by converting the new output coordinates back to standard coordinates and the standard input coordinates to new domain coordinates:

$$ \mathbf{A} = \mathbf{P}_{\mathcal{C}\leftarrow\mathcal{C}'} \mathbf{M}' \mathbf{P}_{\mathcal{B}'\leftarrow\mathcal{B}}. $$

The input transition matrix in this reverse direction is \(\mathbf{P}_{\mathcal{B}'\leftarrow\mathcal{B}}= \begin{bmatrix}\tfrac12&\tfrac12\\\tfrac12&-\tfrac12\end{bmatrix}\). Indeed, multiplying it by \(\begin{bmatrix}1&1\\1&-1\end{bmatrix}\) gives \(\mathbf{I}_2\). The output transition back to standard coordinates is \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{C}'}= \begin{bmatrix}1&1&0\\0&1&0\\0&0&1\end{bmatrix}\). Now multiply in order:

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

This is the original standard matrix. Multiplying it by \(\begin{bmatrix}x_1\\x_2\end{bmatrix}\) gives \(\begin{bmatrix}x_1+2x_2\\x_2\\x_1-x_2\end{bmatrix}\), which recovers the stated rule for \(T\).

Common Pitfall: Confusing Coordinates with Vectors

A common error is to assign output coordinates without reconstructing the output, or to use the basis vectors as if they were standard coordinate directions. For the codomain basis \(\mathcal{C}'=((1,0,0),(1,1,0),(0,0,1))\), consider \(T(1,1)=(3,1,0)\). A mistaken claim is that its \(\mathcal{C}'\)-coordinates are \((1,\tfrac12,0)\). Reconstructing that claim gives \(1(1,0,0)+\tfrac12(1,1,0)+0(0,0,1)=(\tfrac32,\tfrac12,0)\), which is not \((3,1,0)\). The correct coordinates are \((2,1,0)\), because \(2(1,0,0)+1(1,1,0)+0(0,0,1)=(3,1,0)\).

Another frequent error is to reverse just one transition matrix. If the columns of \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{C}'}\) are the new codomain basis vectors in old coordinates, that matrix converts new coordinates to old ones. To convert old output coordinates to new ones, use its inverse, \(\mathbf{P}_{\mathcal{C}'\leftarrow\mathcal{C}}\). The subscripts and the direction of the conversion should be checked before multiplying.

For a map from \(\mathbb{R}^n\) to \(\mathbb{R}^m\), the domain transition matrix multiplies on the right and the codomain transition matrix multiplies on the left. These operations are independent: changing only the domain basis uses the right factor, while changing only the codomain basis uses the left factor. In general, when the domain and codomain are different spaces, the two transition matrices need not be the same.

Check Your Understanding

For each question, track the direction of the coordinate conversion before computing.

  1. If \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{B}'}\) converts new domain coordinates to old ones, which side of the original map matrix does it multiply on?
  2. For \(\mathcal{C}'=((1,0,0),(1,1,0),(0,0,1))\), find the \(\mathcal{C}'\)-coordinates of \((4,2,3)\) by reconstructing the vector.
  3. Explain why a map from \(\mathbb{R}^2\) to \(\mathbb{R}^3\) has a \(3\times2\) coordinate matrix for any choices of domain and codomain bases.
  4. Write the formula for recovering \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) from \([T]_{\mathcal{C}'\leftarrow\mathcal{B}'}\).
  5. Using the first worked example, verify the new matrix on the input whose \(\mathcal{B}'\)-coordinates are \((1,0)\), and check by direct evaluation of \(T\).

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