Tutorials › Linear Algebra › Mixed-Basis Representation Workshop

Matrix Representations of Linear Maps · Tutorial 450 of 1000

Mixed-Basis Representation Workshop

Learn to compute and check polynomial-map representations when domain, codomain, and intermediate coordinates use different bases.

Intermediate 10 min read

What You'll Learn

  • Read a matrix representation with its domain and codomain bases in the correct order.
  • Build a map’s matrix by finding the codomain coordinates of each domain basis vector’s image.
  • Apply a mixed-basis matrix and reconstruct the resulting polynomial.
  • Compose represented maps using compatible intermediate bases.
  • Add matrices for maps with the same domain and codomain bases.
  • Detect and correct a composition error caused by mismatched coordinate bases.

Tracking Bases Through a Polynomial Map

A matrix for a linear map is tied to choices of bases: its input is a coordinate column in the domain basis, and its output is a coordinate column in the codomain basis. When those bases differ, the entries still follow a consistent rule, but it is important to keep track of which coordinates a matrix accepts and produces. We will do that explicitly for maps between polynomial spaces, then use the same bookkeeping for an action, a composition, and a sum.

Let \(P_2\) denote the real vector space of polynomials of degree at most \(2\). An ordered basis \(\mathcal{B}=(b_1,b_2,b_3)\) of \(P_2\) is a list in which every polynomial in \(P_2\) has a unique expression as a linear combination of \(b_1,b_2,b_3\). The coordinate column \([p]_{\mathcal{B}}\) records those three coefficients in that order. For a linear map \(T:P_2\to P_2\), the notation \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) means that inputs are written in the domain basis \(\mathcal{B}\), while outputs are written in the codomain basis \(\mathcal{C}\).

Definition: If \(\mathcal{B}=(b_1,\dots,b_n)\) is a basis of a finite-dimensional real vector space \(V\), and \(\mathcal{C}=(c_1,\dots,c_m)\) is a basis of \(W\), the matrix \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) of a linear map \(T:V\to W\) has \(j\)-th column \([T(b_j)]_{\mathcal{C}}\). Thus it records the codomain coordinates of the images of the domain basis vectors.

The arrow in the subscript is a useful reminder: \(\mathcal{B}\)-coordinates go in, and \(\mathcal{C}\)-coordinates come out. Once a vector has been expressed in the domain basis, the matrix-vector product performs the map in coordinates.

Theorem: For finite-dimensional real vector spaces \(V,W\), bases \(\mathcal{B}\) of \(V\) and \(\mathcal{C}\) of \(W\), and a linear map \(T:V\to W\), every \(\mathbf{v}\in V\) satisfies $$ [T(\mathbf{v})]_{\mathcal{C}} = [T]_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}. $$

Proof. Write \(\mathcal{B}=(b_1,\dots,b_n)\) and \([\mathbf{v}]_{\mathcal{B}}=(x_1,\dots,x_n)^{\top}\). By the definition of coordinates, \(\mathbf{v}=\sum_{j=1}^{n}x_jb_j\). Linearity gives \(T(\mathbf{v})=\sum_{j=1}^{n}x_jT(b_j)\). Taking \(\mathcal{C}\)-coordinates preserves sums and scalar multiples, so \([T(\mathbf{v})]_{\mathcal{C}}=\sum_{j=1}^{n}x_j[T(b_j)]_{\mathcal{C}}\). The columns of \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) are precisely these coordinate columns, and multiplying that matrix by \((x_1,\dots,x_n)^{\top}\) forms their indicated linear combination. This is the required equality. \(\square\)

Building and Applying a Mixed-Basis Matrix

Worked Example: A Map from One Polynomial Basis to Another

Use the domain basis \(\mathcal{B}=(1+x,1-x,x^2)\) and codomain basis \(\mathcal{C}=(1,x-1,(x-1)^2)\) for the map \(T:P_2\to P_2\) defined by \(T(p)=p'+p(0)(1+x)\). Find its matrix, then compute \(T(p)\) for \(p=2(1+x)-(1-x)+3x^2\).

The listed vectors are bases: in each list, a linear combination equal to zero has all coefficients zero, as follows by comparing the coefficients of \(x^2,x,\) and \(1\) (in that order). To form the matrix, apply \(T\) to each domain basis polynomial and express the result in \(\mathcal{C}\)-coordinates. For a target \(a+b(x-1)+c(x-1)^2\), expansion gives \(cx^2+(b-2c)x+(a-b+c)\).

First, \(T(1+x)=1+(1+x)=2+x\). Its \(x^2\)-coefficient gives \(c=0\); its \(x\)-coefficient gives \(b=1\); its constant coefficient gives \(a-b=2\), hence \(a=3\). Thus \([T(1+x)]_{\mathcal{C}}=(3,1,0)^{\top}\).

Next, \(T(1-x)=-1+(1+x)=x\). Comparing coefficients gives \(c=0\), \(b=1\), and \(a-b=0\), so \([T(1-x)]_{\mathcal{C}}=(1,1,0)^{\top}\). Finally, \(T(x^2)=2x\); its coordinates satisfy \(c=0\), \(b=2\), and \(a-b=0\), giving \([T(x^2)]_{\mathcal{C}}=(2,2,0)^{\top}\). Placing these columns in order yields

$$ [T]_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix} 3&1&2\\ 1&1&2\\ 0&0&0 \end{bmatrix}. $$

The input polynomial has \([p]_{\mathcal{B}}=(2,-1,3)^{\top}\). Therefore

$$ [T(p)]_{\mathcal{C}} = \begin{bmatrix} 3&1&2\\ 1&1&2\\ 0&0&0 \end{bmatrix} \begin{bmatrix}2\\-1\\3\end{bmatrix} = \begin{bmatrix}11\\7\\0\end{bmatrix}. $$

Reconstructing the polynomial from those codomain coordinates gives \(11+7(x-1)=4+7x\). Check: \(p=1+3x+3x^2\), so \(p'=3+6x\) and \(p(0)=1\). Hence \(T(p)=3+6x+(1+x)=4+7x\), agreeing with the matrix calculation.

Composing Maps: Match the Intermediate Coordinates

For a composition \(S\circ T\), the output coordinates of the matrix for \(T\) must be coordinates in the basis used for the input of the matrix for \(S\). The shared intermediate basis is what makes ordinary matrix multiplication represent the composition.

Theorem: Let \(T:V\to W\) and \(S:W\to Z\) be linear maps between finite-dimensional real vector spaces. If \(\mathcal{B},\mathcal{C},\mathcal{D}\) are bases of \(V,W,Z\), respectively, then $$ [S\circ T]_{\mathcal{D}\leftarrow\mathcal{B}} = [S]_{\mathcal{D}\leftarrow\mathcal{C}} [T]_{\mathcal{C}\leftarrow\mathcal{B}}. $$

Proof. For any \(\mathbf{v}\in V\), the coordinate formula already proved gives \([T(\mathbf{v})]_{\mathcal{C}}=[T]_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\). Apply that formula to \(S\) with input \(T(\mathbf{v})\): \([S(T(\mathbf{v}))]_{\mathcal{D}}=[S]_{\mathcal{D}\leftarrow\mathcal{C}}[T(\mathbf{v})]_{\mathcal{C}}\). Substituting the first equality produces the product on the right side of the theorem, times \([\mathbf{v}]_{\mathcal{B}}\). Since this holds for every input coordinate column, the product has as its \(j\)-th column the \(\mathcal{D}\)-coordinates of \(S(T(b_j))\). Those are exactly the columns defining \([S\circ T]_{\mathcal{D}\leftarrow\mathcal{B}}\). \(\square\)

Worked Example: Composing Two Polynomial Maps

Continue with \(T\) and bases \(\mathcal{B},\mathcal{C}\) above. Define \(S:P_2\to P_2\) by \(S(q)=q'+q(0)x^2\), and use the standard basis \(\mathcal{D}=(1,x,x^2)\) for its output. Find the matrix for \(S\circ T\) and check it on the polynomial from the preceding example.

For the three input basis polynomials in \(\mathcal{C}\), the images are \(S(1)=x^2\), \(S(x-1)=1-x^2\), and \(S((x-1)^2)=2x-2+x^2\). Their \(\mathcal{D}\)-coordinate columns are \((0,0,1)^{\top}\), \((1,0,-1)^{\top}\), and \((-2,2,1)^{\top}\). Thus

$$ [S]_{\mathcal{D}\leftarrow\mathcal{C}} = \begin{bmatrix} 0&1&-2\\ 0&0&2\\ 1&-1&1 \end{bmatrix}. $$

Now multiply in the order required by the theorem. The \(\mathcal{C}\)-coordinates produced by \(T\) are the inputs to \(S\):

$$ \begin{aligned} [S\circ T]_{\mathcal{D}\leftarrow\mathcal{B}} &= \begin{bmatrix}0&1&-2\\0&0&2\\1&-1&1\end{bmatrix} \begin{bmatrix}3&1&2\\1&1&2\\0&0&0\end{bmatrix}\\ &= \begin{bmatrix}1&1&2\\0&0&0\\2&0&0\end{bmatrix}. \end{aligned} $$

For the earlier input, \([p]_{\mathcal{B}}=(2,-1,3)^{\top}\), so the composition gives \((7,0,4)^{\top}\) in \(\mathcal{D}\)-coordinates, or \(7+4x^2\). Check: the earlier calculation gave \(T(p)=4+7x\). Applying \(S\) directly gives \((4+7x)'+(4+7x)(0)x^2=7+4x^2\), as required.

Adding Maps with the Same Coordinate Conventions

A sum \(T+U\) is defined when \(T\) and \(U\) have the same domain and codomain. To add their matrices entry by entry, use the same domain basis and the same codomain basis for both. This is not just a convenient convention: for every domain basis vector, the image under \(T+U\) is the sum of the two images, so its codomain coordinate column is the sum of their coordinate columns.

Theorem: Let \(T,U:V\to W\) be linear maps, with bases \(\mathcal{B}\) of \(V\) and \(\mathcal{C}\) of \(W\). Then $$ [T+U]_{\mathcal{C}\leftarrow\mathcal{B}} = [T]_{\mathcal{C}\leftarrow\mathcal{B}}+[U]_{\mathcal{C}\leftarrow\mathcal{B}}. $$

Proof. For each basis vector \(b_j\) of \(\mathcal{B}\), \((T+U)(b_j)=T(b_j)+U(b_j)\). Taking coordinates in the same basis \(\mathcal{C}\) gives \([(T+U)(b_j)]_{\mathcal{C}}=[T(b_j)]_{\mathcal{C}}+[U(b_j)]_{\mathcal{C}}\). The two terms on the right are the \(j\)-th columns of the matrices for \(T\) and \(U\). Thus every column of the matrix on the left is the corresponding column of the matrix sum, proving the equality. \(\square\)

Worked Example: Representing a Sum

Use the same \(\mathcal{B}\) and \(\mathcal{C}\) as before, and define \(U(p)=p(1)(1+x)\). Find the matrix for \(T+U\), then check its action on \(p=2(1+x)-(1-x)+3x^2\).

Apply \(U\) to the domain basis vectors. Since \((1+x)(1)=2\), \(U(1+x)=2+2x\), whose \(\mathcal{C}\)-coordinates are \((4,2,0)^{\top}\). Since \((1-x)(1)=0\), \(U(1-x)=0\), with coordinates \((0,0,0)^{\top}\). Since \(x^2(1)=1\), \(U(x^2)=1+x\), with coordinates \((2,1,0)^{\top}\). Therefore

$$ [U]_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix}4&0&2\\2&0&1\\0&0&0\end{bmatrix}, \qquad [T+U]_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix}7&1&4\\3&1&3\\0&0&0\end{bmatrix}. $$

Applying this sum matrix to \((2,-1,3)^{\top}\) gives \((25,14,0)^{\top}\), corresponding to \(25+14(x-1)=11+14x\). Check: \(p(1)=7\), so \(U(p)=7+7x\), while \(T(p)=4+7x\). Their sum is \(11+14x\), matching the coordinates.

Common Pitfall: Multiplying Matrices with the Wrong Middle Basis

It is possible for two matrices to have compatible sizes and still be incompatible as representations. In the composition example, \([S]_{\mathcal{D}\leftarrow\mathcal{C}}\) accepts \(\mathcal{C}\)-coordinates. It cannot be replaced by the matrix of \(S\) using the standard basis for both input and output. That standard-basis matrix is \(\begin{bmatrix}0&1&0\\0&0&2\\1&0&0\end{bmatrix}\), since \(S(1)=x^2\), \(S(x)=1\), and \(S(x^2)=2x\).

A tempting but incorrect calculation is to multiply this standard-basis matrix by \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\). The resulting third row would be \((3,1,2)\), not the correct \((2,0,0)\). The product is wrong because the columns from \(T\) are \(\mathcal{C}\)-coordinates, not standard-basis coordinates. The correction is to use \([S]_{\mathcal{D}\leftarrow\mathcal{C}}\), which accepts exactly the coordinates that \(T\) produces.

Before multiplying or adding represented maps, check the basis labels as well as the matrix sizes. For composition, the first map’s output basis must match the second map’s input basis. For a sum, both maps must be represented with the same input and output bases. These checks prevent coordinate errors that ordinary matrix arithmetic cannot detect on its own.

Check Your Understanding

Keep track of the input and output basis for each coordinate column.

  1. For the map \(T\) above, what does the second column of \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\) represent?
  2. Use the composition matrix to find \((S\circ T)(1+x)\) in standard polynomial form.
  3. Find the \(\mathcal{C}\)-coordinates of \(U(x^2)\) directly from its polynomial expression.
  4. Why is the standard-basis matrix of \(S\) not the appropriate left factor for \([T]_{\mathcal{C}\leftarrow\mathcal{B}}\)?
  5. State the basis requirement that allows two represented maps to be added entry by entry.

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