Tutorials › Linear Algebra › Differentiation Matrices in Monomial and Shifted Bases

Similarity and Change of Basis for Operators · Tutorial 476 of 1000

Differentiation Matrices in Monomial and Shifted Bases

Learn to represent differentiation in two polynomial bases and check their matrices using an explicit change of coordinates.

Intermediate 9 min read

What You'll Learn

  • Define differentiation as a linear operator on the polynomials of degree at most two.
  • Compute its matrix by expressing the derivative of each basis vector in that basis.
  • Find the transition matrix from monomial coordinates to shifted-basis coordinates.
  • Apply the basis-change formula with the correct coordinate direction.
  • Verify the resulting similarity by multiplying the matrices explicitly.

Differentiation as a Linear Operator

One linear transformation can have different matrices when its input and output are described using different bases. Differentiation on a polynomial space is a useful setting for seeing this distinction: the transformation itself is fixed, but the coordinates of a derivative depend on the chosen basis. We will compute those coordinates in the monomial basis and in a basis shifted from \(x\) to \(x-1\), then check the basis-change formula directly.

Work over \(\mathbb{R}\). Let \(P_2\) denote the vector space of real polynomials of degree at most two, including the zero polynomial. Define \(D:P_2\to P_2\) by \(D(f)=f'\). The derivative of a polynomial of degree at most two has degree at most one, so it still belongs to \(P_2\). Moreover, differentiation is linear: for \(f,g\in P_2\) and \(a,b\in\mathbb{R}\), \(D(af+bg)=aD(f)+bD(g)\).

We use the ordered bases \(\mathcal{B}=(1,x,x^2)\) and \(\mathcal{C}=(1,x-1,(x-1)^2)\). The matrix \([D]_{\mathcal{B}}\) has as its \(j\)th column the \(\mathcal{B}\)-coordinate vector of the derivative of the \(j\)th basis polynomial. The same column rule applies to \([D]_{\mathcal{C}}\). This rule follows from the definition of a matrix of a linear map.

Result (Columns of an operator matrix): Let \(T:V\to V\) be a linear map and let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) be an ordered basis of a finite-dimensional vector space \(V\). The \(j\)th column of \([T]_{\mathcal{B}}\) is \([T(\mathbf{b}_j)]_{\mathcal{B}}\).

Proof. Write an arbitrary \(\mathbf{v}\in V\) as \(\mathbf{v}=c_1\mathbf{b}_1+\cdots+c_n\mathbf{b}_n\), so \([\mathbf{v}]_{\mathcal{B}}=(c_1,\dots,c_n)^{\top}\). By linearity, \(T(\mathbf{v})=c_1T(\mathbf{b}_1)+\cdots+c_nT(\mathbf{b}_n)\). The \(j\)th column \([T(\mathbf{b}_j)]_{\mathcal{B}}\), multiplied by \(c_j\) and summed over \(j\), is therefore exactly \([T(\mathbf{v})]_{\mathcal{B}}\). This is the matrix-vector product \([T]_{\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\), so the columns of the matrix must be the stated coordinate vectors. \(\square\)

The Matrix in the Monomial Basis

Worked Example: Differentiation in \(\mathcal{B}=(1,x,x^2)\)

Differentiate each basis polynomial and express the result in the same basis. First, \(D(1)=0\), whose \(\mathcal{B}\)-coordinate vector is \((0,0,0)^{\top}\). Next, \(D(x)=1\), whose coordinate vector is \((1,0,0)^{\top}\). Finally, \(D(x^2)=2x\), whose coordinate vector is \((0,2,0)^{\top}\). Using these vectors as columns gives

$$ [D]_{\mathcal{B}}= \begin{bmatrix} 0&1&0\\ 0&0&2\\ 0&0&0 \end{bmatrix}. $$

Check the matrix on a general polynomial \(f(x)=a+bx+cx^2\). Its \(\mathcal{B}\)-coordinate vector is \((a,b,c)^{\top}\), so

$$ [D]_{\mathcal{B}} \begin{bmatrix}a\\b\\c\end{bmatrix} = \begin{bmatrix}b\\2c\\0\end{bmatrix}. $$

These are the coordinates of \(b+2cx\), and direct differentiation gives \(f'(x)=b+2cx\). Thus the matrix acts on the coordinates exactly as differentiation acts on the polynomial.

The factor \(2\) in the third column records the coefficient produced by differentiating \(x^2\). It is not an extra scaling convention: it appears because the derivative of the third basis vector is \(2x\). The column method keeps the basis and the output coordinates visible, which matters especially when the basis vectors are not monomials.

The Matrix in the Shifted Basis

Worked Example: Differentiation in \(\mathcal{C}=(1,x-1,(x-1)^2)\)

Differentiate the basis vectors of \(\mathcal{C}\). We have \(D(1)=0\), \(D(x-1)=1\), and \(D((x-1)^2)=2(x-1)\). Their \(\mathcal{C}\)-coordinate vectors, respectively, are \((0,0,0)^{\top}\), \((1,0,0)^{\top}\), and \((0,2,0)^{\top}\). Therefore

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

As an independent check, take \(g(x)=3+2(x-1)-4(x-1)^2\), whose \(\mathcal{C}\)-coordinate vector is \((3,2,-4)^{\top}\). The matrix gives

$$ [D]_{\mathcal{C}} \begin{bmatrix}3\\2\\-4\end{bmatrix} = \begin{bmatrix}2\\-8\\0\end{bmatrix}. $$

These are the \(\mathcal{C}\)-coordinates of \(2-8(x-1)\). Direct differentiation gives \(g'(x)=2-8(x-1)\), so the matrix agrees with the derivative.

The two matrices happen to have the same entries. In both bases, differentiating the first basis vector gives zero, the second gives the first, and the third gives twice the second. Equal entries here do not mean the bases are the same: the entries describe the same operator relative to different coordinate systems. The transition matrix will show precisely how those coordinate systems are related.

Changing Coordinates and Verifying Similarity

Let \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\) be the change-of-basis matrix that converts \(\mathcal{B}\)-coordinates into \(\mathcal{C}\)-coordinates. Its \(j\)th column is the \(\mathcal{C}\)-coordinate vector of the \(j\)th vector in \(\mathcal{B}\). To find those columns, express each monomial using \(x=1+(x-1)\): \(1=1\), \(x=1+(x-1)\), and \(x^2=1+2(x-1)+(x-1)^2\). Hence

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

The reverse change-of-coordinates matrix is its inverse. Solving for the monomials in terms of the shifted basis, or multiplying to check, gives

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

The coordinate direction determines the order of the matrices in the formula. First convert a vector's \(\mathcal{C}\)-coordinates to \(\mathcal{B}\)-coordinates, apply the matrix of \(D\) in \(\mathcal{B}\), and convert the result back to \(\mathcal{C}\)-coordinates.

Basis-change formula: For a linear map \(T:V\to V\) on a finite-dimensional vector space and ordered bases \(\mathcal{B}\) and \(\mathcal{C}\), let \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\) convert \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates. Then \([T]_{\mathcal{C}}=\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[T]_{\mathcal{B}}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}\).

Proof. Take any \(\mathbf{v}\in V\). Its coordinate vectors satisfy \([\mathbf{v}]_{\mathcal{C}}=\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\), so the reverse relation is \([\mathbf{v}]_{\mathcal{B}}=\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}[\mathbf{v}]_{\mathcal{C}}\). Apply \(T\) and express its output in \(\mathcal{C}\)-coordinates. By the definition of an operator matrix, \([T(\mathbf{v})]_{\mathcal{C}}=[T]_{\mathcal{C}}[\mathbf{v}]_{\mathcal{C}}\). Alternatively, convert the input to \(\mathcal{B}\)-coordinates, apply \([T]_{\mathcal{B}}\), and convert the output to \(\mathcal{C}\)-coordinates: \([T(\mathbf{v})]_{\mathcal{C}}=\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}[T]_{\mathcal{B}}\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}[\mathbf{v}]_{\mathcal{C}}\). These two expressions agree for every coordinate vector \([\mathbf{v}]_{\mathcal{C}}\). In particular, they agree when that vector is each standard coordinate vector, which shows that the matrices multiplying it are equal. This is the stated formula. \(\square\)

Worked Example: Checking the Similarity by Multiplication

Apply the formula to the two differentiation matrices. Write \(\mathbf{A}=[D]_{\mathcal{B}}\), and use the transition matrices just computed. First multiply \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\mathbf{A}\). Its columns are \(\mathbf{0}\), the first column of \(\mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\), and twice its second column:

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

Now multiply this result by \(\mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}}\). The first column of the product is zero. The second column is minus the first column plus the second column of the intermediate matrix, giving \((1,0,0)^{\top}\). The third is its first column minus twice its second column plus its third column, giving \((0,2,0)^{\top}\). Thus

$$ \begin{aligned} \mathbf{P}_{\mathcal{C}\leftarrow\mathcal{B}}\mathbf{A} \mathbf{P}_{\mathcal{B}\leftarrow\mathcal{C}} &= \begin{bmatrix}0&1&2\\0&0&2\\0&0&0\end{bmatrix} \begin{bmatrix}1&-1&1\\0&1&-2\\0&0&1\end{bmatrix}\\ &= \begin{bmatrix}0&1&0\\0&0&2\\0&0&0\end{bmatrix} =[D]_{\mathcal{C}}. \end{aligned} $$

Check: The final matrix has columns \((0,0,0)^{\top}\), \((1,0,0)^{\top}\), and \((0,2,0)^{\top}\), exactly the shifted-basis coordinates of \(D(1)\), \(D(x-1)\), and \(D((x-1)^2)\). It is also the direct matrix computed earlier.

This computation verifies similarity: the two matrices represent the same linear map in different bases and are related by the required invertible change of coordinates. In this example, the matrices are equal as well. The equality is a special feature of the chosen bases and operator, not a replacement for the formula. In other basis changes, the entries need not remain equal.

Common Pitfall: Mixing the Polynomial with Its Coordinates

A common error is to differentiate a shifted basis polynomial correctly but then record its coordinates as though the basis were \((1,x,x^2)\). For example, \(D((x-1)^2)=2(x-1)\). A mistaken coordinate vector is \((0,0,2)^{\top}\), which would put the \(2\) in the third column's third entry. That vector represents \(2(x-1)^2\) in \(\mathcal{C}\), not \(2(x-1)\), so it is the wrong coordinate vector. In \(\mathcal{C}\), \(2(x-1)=0\cdot1+2\cdot(x-1)+0\cdot(x-1)^2\), and the correct coordinates are \((0,2,0)^{\top}\).

The distinction is also visible by checking a polynomial. The incorrect third column would send \((0,0,1)^{\top}\) to \((0,0,2)^{\top}\), claiming that the derivative of \((x-1)^2\) is \(2(x-1)^2\). But direct differentiation gives \(2(x-1)\), whose coordinates are \((0,2,0)^{\top}\). When forming an operator matrix, differentiate first and then express the result in the stated output basis.

Check Your Understanding

Use the column rule and keep track of which basis supplies the coordinates in each question.

  1. In the basis \((1,x,x^2)\), what are the coordinates of \(D(4-3x+5x^2)\)? Verify by differentiating the polynomial.
  2. Write \(x^2+x\) in the basis \((1,x-1,(x-1)^2)\), giving its coordinate vector.
  3. Find the \((1,x-1,(x-1)^2)\)-coordinate vector of \(D((x-1)^2)\), and explain why \((0,0,2)^{\top}\) is not correct.
  4. For a vector with \(\mathcal{C}\)-coordinates \((a,b,c)^{\top}\), state which matrix converts it to \(\mathcal{B}\)-coordinates before applying \([D]_{\mathcal{B}}\).
  5. Explain why the matrices in the two worked computations represent the same linear map even though their coordinate systems are different.

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