Tutorials › Linear Algebra › Basis Changes in Polynomial Spaces

Coordinates and Change of Basis · Tutorial 383 of 1000

Basis Changes in Polynomial Spaces

Express each source polynomial in the target basis to build and verify a transition matrix.

Intermediate 12 min read

What You'll Learn

  • Identify when two ordered polynomial bases span the same space.
  • Compute polynomial coordinates by matching coefficients.
  • Build a transition matrix with source-basis coordinates as its columns.
  • Check a coordinate conversion by reconstructing the polynomial.
  • Relate transition matrices in opposite directions.
  • Recognize and correct a direction error in a basis change.

Polynomial Coordinates and Basis Changes

A polynomial space is a vector space: its elements can be added and multiplied by real scalars, and a polynomial can be described using coordinates relative to any ordered basis of that space. Changing the basis changes the coordinate list, even though the polynomial itself stays the same. The practical task is to express each polynomial in the source basis using the target basis, one at a time. Those coordinate lists become the columns of the transition matrix.

For a nonnegative integer \(d\), let \(P_d(\mathbb{R})\) denote the real polynomials of degree at most \(d\), together with the zero polynomial. Its familiar ordered basis is \((1,x,\dots,x^d)\). A polynomial belongs to \(P_d(\mathbb{R})\) exactly when it has a unique expression \(a_0+a_1x+\cdots+a_dx^d\) with real coefficients. In this tutorial, the polynomial spaces are finite-dimensional, and all scalars are real.

Definition: Let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) and \(\mathcal{C}=(\mathbf{c}_1,\dots,\mathbf{c}_n)\) be ordered bases of the same vector space. The transition matrix from \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates, written \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\), is the matrix whose \(j\)th column is \([\mathbf{b}_j]_{\mathcal{C}}\). Thus, for every vector \(\mathbf{v}\), \([\mathbf{v}]_{\mathcal{C}}=\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\).

For polynomial bases, the coordinate vector \([\mathbf{b}_j]_{\mathcal{C}}\) is found by solving the polynomial identity \(\mathbf{b}_j(x)=a_1\mathbf{c}_1(x)+\cdots+a_n\mathbf{c}_n(x)\). Equating the coefficients of matching powers of \(x\) determines the scalars \(a_1,\dots,a_n\). The order matters: the source basis supplies the columns, and the target basis determines the coordinates recorded in those columns.

Why the Columns Perform the Conversion

Theorem: Let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) and \(\mathcal{C}=(\mathbf{c}_1,\dots,\mathbf{c}_n)\) be ordered bases of the same finite-dimensional real vector space. The matrix with columns \([\mathbf{b}_j]_{\mathcal{C}}\) converts every \(\mathcal{B}\)-coordinate vector into the corresponding \(\mathcal{C}\)-coordinate vector.

Proof. Fix a vector \(\mathbf{v}\) in the space, and write its coordinates in \(\mathcal{B}\) as \([\mathbf{v}]_{\mathcal{B}}=(a_1,\dots,a_n)^{\top}\). By the definition of coordinates, \(\mathbf{v}=a_1\mathbf{b}_1+\cdots+a_n\mathbf{b}_n\). Each source basis vector has a \(\mathcal{C}\)-coordinate vector, so \(\mathbf{b}_j=\sum_{i=1}^n([\mathbf{b}_j]_{\mathcal{C}})_i\mathbf{c}_i\). Substituting these expressions into the formula for \(\mathbf{v}\), the coefficient of \(\mathbf{c}_i\) is \(\sum_{j=1}^n([\mathbf{b}_j]_{\mathcal{C}})_i a_j\). These are exactly the entries of the matrix-vector product \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\). Since coordinates in the basis \(\mathcal{C}\) are unique, that product equals \([\mathbf{v}]_{\mathcal{C}}\). \(\square\)

This result explains both the method and the direction notation. To compute the matrix, express each source vector in the target basis. To use the matrix, multiply it by the coordinate column in the source basis; the result is the coordinate column in the target basis.

Worked Example: Changing Coordinates in \(P_1(\mathbb{R})\)

Let \(\mathcal{B}=(1+x,x)\) and \(\mathcal{C}=(1,x)\). Both are ordered bases of \(P_1(\mathbb{R})\): the first list consists of degree-at-most-one polynomials, and any \(a+bx\) can be written as \(a(1+x)+(b-a)x\). Its representation in \(\mathcal{B}\) is unique because the constant coefficient forces the coefficient on \(1+x\) to be \(a\), after which the coefficient on \(x\) is forced to be \(b-a\). The list \(\mathcal{C}\) is the usual basis, with unique coefficients equal to the constant and linear coefficients.

Find the columns of \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\) by expressing the two source polynomials in \(\mathcal{C}\):

$$ 1+x=1\cdot 1+1\cdot x,\qquad x=0\cdot 1+1\cdot x. $$

Thus the two coordinate columns, in source-basis order, are \((1,1)^{\top}\) and \((0,1)^{\top}\). Therefore

$$ \mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix}1&0\\1&1\end{bmatrix}. $$

For a direct check, take \(3+2x\). Its \(\mathcal{B}\)-coordinates are \((3,-1)^{\top}\), since \(3(1+x)-x=3+2x\). The matrix gives

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

Check: the resulting \(\mathcal{C}\)-coordinates reconstruct \(3\cdot1+2\cdot x=3+2x\), the original polynomial.

Matching Coefficients in a Quadratic Space

In \(P_2(\mathbb{R})\), each polynomial has three coefficients, so each basis has three elements and each transition matrix is \(3\times3\). It is often efficient to write a general linear combination of the target polynomials, expand it in powers of \(x\), and equate coefficients. This solves for one source polynomial's target coordinates. Repeat for every source basis element, keeping the columns in the source order.

Worked Example: From the Monomial Basis to a Nonstandard Basis

Let \(\mathcal{B}=(1,x,x^2)\) and \(\mathcal{C}=(1+x,x+x^2,x^2)\). The list \(\mathcal{C}\) is a basis of \(P_2(\mathbb{R})\): if \(a(1+x)+b(x+x^2)+cx^2=0\), then the constant coefficient gives \(a=0\), the coefficient of \(x\) gives \(a+b=0\), hence \(b=0\), and the coefficient of \(x^2\) gives \(b+c=0\), hence \(c=0\). Three independent polynomials in \(P_2(\mathbb{R})\) form a basis, equivalently the coefficients of any degree-at-most-two polynomial can be solved successively in this triangular system. The monomial list \(\mathcal{B}\) gives each polynomial its coefficients directly.

To find the \(\mathcal{C}\)-coordinates of \(1\), solve \(a(1+x)+b(x+x^2)+cx^2=1\). Matching constant, linear, and quadratic coefficients gives \(a=1\), \(a+b=0\), \(b+c=0\), so \((a,b,c)=(1,-1,1)\). For \(x\), the equations are \(a=0\), \(a+b=1\), \(b+c=0\), giving \((0,1,-1)\). For \(x^2\), they are \(a=0\), \(a+b=0\), \(b+c=1\), giving \((0,0,1)\). The coordinate vectors form the columns:

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

Check: the columns reconstruct the source polynomials in \(\mathcal{C}\): \(1=(1+x)-(x+x^2)+x^2\), \(x=(x+x^2)-x^2\), and \(x^2=x^2\). For an additional conversion check, \(2-x+3x^2\) has \(\mathcal{B}\)-coordinates \((2,-1,3)^{\top}\), and multiplication gives \((2,-3,3)^{\top}\). Reconstructing in \(\mathcal{C}\) gives \(2(1+x)-3(x+x^2)+3x^2=2-x+3x^2\).

Transitions Between Two Nonstandard Bases

Neither basis needs to be the monomial basis. Coefficient matching still works, although the target polynomials may be expressed more conveniently using another variable. For example, setting \(y=x-1\) turns \(1,x-1,(x-1)^2\) into \(1,y,y^2\). Every polynomial of degree at most two has a unique expression in these three polynomials: after substituting \(y=x-1\), it is a polynomial in \(y\) of degree at most two, whose coefficients are unique.

Worked Example: Converting Between Shifted Polynomial Bases

In \(P_2(\mathbb{R})\), let \(\mathcal{B}=(1+x,x,1+x^2)\) and \(\mathcal{C}=(1,x-1,(x-1)^2)\). The target list is a basis by the shifted-power argument above. The source list is a basis as well: a combination \(a(1+x)+bx+c(1+x^2)\) has coefficients \(a+c\), \(a+b\), and \(c\) on \(1,x,x^2\). Given any \(u+vx+wx^2\), these equations have the unique solution \(c=w\), \(a=u-w\), \(b=v-u+w\). Thus both are ordered bases of the same space.

Write each source polynomial using \(\mathcal{C}\). The first satisfies \(1+x=2+(x-1)\), and the second satisfies \(x=1+(x-1)\). For the third, expand in the shifted variable:

$$ 1+x^2=1+\bigl((x-1)+1\bigr)^2 =2+2(x-1)+(x-1)^2. $$

Consequently the source coordinate columns are \((2,1,0)^{\top}\), \((1,1,0)^{\top}\), and \((2,2,1)^{\top}\), respectively. Hence

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

Check: multiplying the matrix by \((a,b,c)^{\top}\) gives \((2a+b+2c,\;a+b+2c,\;c)^{\top}\). The corresponding target polynomial is \((2a+b+2c)+(a+b+2c)(x-1)+c(x-1)^2\). Expanding, its constant coefficient is \(a+c\), its \(x\)-coefficient is \(a+b\), and its \(x^2\)-coefficient is \(c\). It is therefore exactly \(a(1+x)+bx+c(1+x^2)\), as required.

Opposite Directions and a Common Pitfall

Proposition: If \(\mathcal{B}\) and \(\mathcal{C}\) are ordered bases of the same finite-dimensional real vector space, then \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}=\mathbf{I}\) and \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}=\mathbf{I}\).

Proof. Let \(\mathbf{v}\) be any vector in the space. By the conversion theorem, \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}=[\mathbf{v}]_{\mathcal{C}}\), and then \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}[\mathbf{v}]_{\mathcal{C}}=[\mathbf{v}]_{\mathcal{B}}\). Substituting the first equality into the second gives \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}=[\mathbf{v}]_{\mathcal{B}}\). Every column in \(\mathbb{R}^n\) is the coordinate vector of some vector, because \(\mathcal{B}\) is a basis. Thus the first matrix product acts as the identity on every column, so it equals \(\mathbf{I}_n\). Reversing \(\mathcal{B}\) and \(\mathcal{C}\) gives the other product. \(\square\)

A frequent error is to place the target basis vectors in the columns instead of the source basis vectors. In the \(P_1(\mathbb{R})\) example, the columns of \(\begin{bmatrix}1&0\\1&1\end{bmatrix}\) are the \(\mathcal{C}\)-coordinates of the \(\mathcal{B}\)-vectors. Reversing the task gives the opposite matrix: \(1=(1+x)-x\) and \(x=x\), so \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}=\begin{bmatrix}1&0\\-1&1\end{bmatrix}\). A wrong direction calculation would apply this latter matrix to the \(\mathcal{B}\)-coordinate vector \((1,0)^{\top}\) of \(1+x\), producing \((1,-1)^{\top}\). But those are \(\mathcal{B}\)-coordinates, not \(\mathcal{C}\)-coordinates: they reconstruct \((1+x)-x=1\), not \(1+x\). The correction is to use \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\), which sends \((1,0)^{\top}\) to \((1,1)^{\top}\), correctly reconstructing \(1+x\) in \(\mathcal{C}\).

Before calculating, check that both lists are bases of the same space. Equal list lengths alone do not guarantee that a transition matrix exists. For instance, \((1+x,x^2)\) and \((1,x)\) do not span the same space: the first contains a degree-two polynomial, whereas every polynomial in the span of the second has degree at most one. These lists cannot be used as the source and target bases of a transition matrix between their spans.

Check Your Understanding

For each calculation, state the direction of the coordinate conversion and verify your result by reconstructing the polynomial.

  1. In \(P_1(\mathbb{R})\), find \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\) for \(\mathcal{B}=(1-x,x)\) and \(\mathcal{C}=(1,x)\).
  2. In \(P_2(\mathbb{R})\), find the \((1,x,x^2)\)-coordinates of \(1+x+x^2\).
  3. For \(\mathcal{B}=(1,x,x^2)\) and \(\mathcal{C}=(1,x+1,(x+1)^2)\), find \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\) by matching coefficients.
  4. Explain why \((1,x)\) and \((1,x^2)\) are not bases of the same polynomial space.
  5. For two ordered bases of the same finite-dimensional space, explain why converting in one direction and then back gives the original coordinate vector.

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