Differentiation as a Linear Map
A polynomial is often recorded by its coefficients, in a fixed order. Differentiating it changes those coefficients: the constant term disappears, while the coefficient of each positive power is multiplied by its exponent and shifts to the preceding power. A matrix makes this change precise. The key is to specify the bases in both the domain and codomain, because their order determines how each polynomial is represented by a coordinate vector.
Throughout, let \(n\geq 1\) be an integer, and work over \(\mathbb{R}\). Let \(P_n\) denote the vector space of real polynomials of degree at most \(n\), including the zero polynomial, and let \(P_{n-1}\) denote the polynomials of degree at most \(n-1\). Use the monomial bases in ascending order of powers: \(\mathcal{B}=(1,x,x^2,\dots,x^n)\) for \(P_n\) and \(\mathcal{C}=(1,x,x^2,\dots,x^{n-1})\) for \(P_{n-1}\). Thus, if \(p(x)=a_0+a_1x+\cdots+a_nx^n\), its coordinate vector in \(\mathcal{B}\) is \([p]_{\mathcal{B}}=(a_0,a_1,\dots,a_n)^{\top}\).
The order of the two bases determines the shape. The domain basis has \(n+1\) vectors, so the matrix has \(n+1\) columns. The codomain basis has \(n\) vectors, so it has \(n\) rows. This matrix is rectangular: differentiation lowers the maximum degree by one, and its input and output coefficient vectors have different lengths.
Building the Matrix One Column at a Time
The first column comes from differentiating \(1\), which gives zero. For the next column, \(D(x)=1\), so its coordinate vector in \(\mathcal{C}\) has \(1\) in the first position. In general, for \(j=1,\dots,n\), the derivative of \(x^j\) is \(jx^{j-1}\). In the codomain basis, that polynomial has coefficient \(j\) in position \(j\), with all other coefficients zero. The coefficient of \(x^n\) is therefore sent to \(n\) times the coefficient of \(x^{n-1}\).
Proof. Write the domain basis as \(b_j=x^{j-1}\), where \(1\leq j\leq n+1\). If \(j=1\), then \(D(b_1)=D(1)=0\), so the first column is zero. If \(2\leq j\leq n+1\), then \(D(b_j)=D(x^{j-1})=(j-1)x^{j-2}\). In the codomain basis \((1,x,\dots,x^{n-1})\), the monomial \(x^{j-2}\) is in position \(j-1\). Thus column \(j\) has \(j-1\) in row \(j-1\) and zero in every other row. This gives the stated entries and matrix shape. \(\square\)
The theorem also explains how to use the matrix. If \(p(x)=\sum_{k=0}^{n}a_kx^k\), then its input coordinate vector lists \(a_0,\dots,a_n\). Matrix multiplication returns the output coordinate vector in the order \(1,x,\dots,x^{n-1}\). In particular, the output coefficient of \(x^r\) is \((r+1)a_{r+1}\) for \(r=0,\dots,n-1\).
Worked Example: Differentiating a Cubic by Its Matrix
Find the matrix of \(D:P_3\to P_2\) in the ascending monomial bases, then use it to differentiate \(p(x)=2-x+4x^2+3x^3\).
The domain basis is \((1,x,x^2,x^3)\), and the codomain basis is \((1,x,x^2)\). The derivatives of the domain basis vectors are \(0,1,2x,3x^2\), respectively. Their coordinate vectors give the columns:
The coefficient vector of \(p\), in the domain basis order, is \([p]_{\mathcal{B}}=(2,-1,4,3)^{\top}\). Multiplying gives
The output vector represents \(-1+8x+9x^2\) in the codomain basis. Direct differentiation gives \(p'(x)=0-1+8x+9x^2\), the same result. Substituting the output coefficients back into the polynomial confirms that the matrix output is the derivative.
Using the Coefficient Rule
For any input coefficient vector \((a_0,a_1,\dots,a_n)^{\top}\), the matrix sends the constant coefficient \(a_0\) to no output entry. The coefficient \(a_1\) becomes the constant output coefficient, \(a_2\) becomes twice the coefficient of \(x\), and so on. The output vector has \(n\) entries because \(P_{n-1}\) has the basis \((1,x,\dots,x^{n-1})\). The matrix does not add a coordinate for \(x^n\) in the codomain: the derivative of an input of degree at most \(n\) cannot contain that power.
Worked Example: A Quadratic Input
Use the matrix of \(D:P_2\to P_1\) to differentiate \(q(x)=-3+2x+5x^2\), and check the output directly.
The domain basis is \((1,x,x^2)\) and the codomain basis is \((1,x)\). Since the derivatives of the domain basis vectors are \(0,1,2x\), the matrix is
The coefficient vector of \(q\) is \((-3,2,5)^{\top}\). Matrix multiplication gives
In the codomain basis \((1,x)\), this output is \(2+10x\). Directly, \(q'(x)=0+2+10x=2+10x\), so the coefficient vector and polynomial both agree with the matrix calculation.
Worked Example: A Quartic with a Missing Term
Apply the differentiation matrix to \(r(x)=x-2x^2+3x^4\), viewing \(r\) as an element of \(P_4\). Include the zero coefficient of \(x^3\) in the input vector.
The domain basis is \((1,x,x^2,x^3,x^4)\), and the codomain basis is \((1,x,x^2,x^3)\). The theorem gives
In the specified domain basis, \(r\) has coefficient vector \((0,1,-2,0,3)^{\top}\). Applying the matrix gives
The output vector represents \(1-4x+0x^2+12x^3\). Direct differentiation gives \(r'(x)=1-4x+0x^2+12x^3\), including the zero coefficient of \(x^2\). The check confirms that omitting the input’s zero \(x^3\) coefficient would have used the wrong coordinate vector.
What the Zero Output Means
The matrix has a zero first column because constant polynomials differentiate to zero. In fact, constants are the only polynomials in \(P_n\) that differentiate to zero. This can be proved by comparing the coefficients in the derivative, without making any assumption about the degree of a particular nonzero polynomial.
Proof. Write \(p(x)=a_0+a_1x+\cdots+a_nx^n\). If \(D(p)=0\), then \(a_1+2a_2x+\cdots+na_nx^{n-1}=0\). A polynomial is the zero polynomial exactly when each of its coefficients is zero, so \(ka_k=0\) for every \(k=1,\dots,n\). Since each such \(k\) is a nonzero real number, \(a_k=0\) for every \(k=1,\dots,n\). Therefore \(p(x)=a_0\) is constant. Conversely, if \(p(x)=a_0\) is constant, then \(D(p)=D(a_0)=0\). This proves both directions. \(\square\)
In coordinates, the same fact appears in the matrix equation. If \((a_0,\dots,a_n)^{\top}\) is sent to zero, the output entries are \(a_1,2a_2,\dots,na_n\). Each must be zero, so \(a_1=\cdots=a_n=0\), while \(a_0\) is unrestricted. Thus the zero first column is not an accidental feature of the displayed matrices: it records exactly the freedom to choose any constant term without changing the derivative.
Common Mistakes
Forgetting the exponent multiplier. A tempting but incorrect matrix for \(D:P_3\to P_2\) puts \(1\) in each of the three nonzero positions. Applying that matrix to the coefficient vector of \(x^2\), \((0,0,1,0)^{\top}\), would give \((0,1,0)^{\top}\), suggesting the output \(x\). But direct differentiation gives \(D(x^2)=2x\). The corrected matrix has \(2\), not \(1\), in row 2, column 3, and sends \((0,0,1,0)^{\top}\) to \((0,2,0)^{\top}\), as required.
Reversing the coefficient order. In the ascending monomial basis, the first coordinate is the constant coefficient and the last is the coefficient of \(x^n\). For \(p(x)=2-x+4x^2+3x^3\), the vector is \((2,-1,4,3)^{\top}\), not \((3,4,-1,2)^{\top}\). Using the reversed list with the ascending-order matrix pairs coefficients with the wrong powers and does not represent the stated polynomial.
Using a square matrix. The map from \(P_n\) to \(P_{n-1}\) has \(n+1\) domain basis vectors and \(n\) codomain basis vectors. Its matrix must therefore have \(n+1\) columns and \(n\) rows. A matrix with \(n\) columns would omit one domain basis vector; a matrix with \(n+1\) rows would use a different codomain basis or an incorrectly sized output vector.
To build the matrix reliably, list the domain monomials in the stated order, differentiate each one, and write its output coefficients in the stated codomain order. Then check a calculation in two ways: multiply the matrix by the input coefficient vector and differentiate the corresponding polynomial directly. Both checks depend on keeping the domain and codomain bases distinct.
Check Your Understanding
Use ascending monomial bases unless a question specifies otherwise. When you compute an output vector, translate it back into a polynomial and verify by differentiation.
- Write the matrix of \(D:P_3\to P_2\), identifying the domain and codomain basis orders.
- Use that matrix to differentiate \(1+3x-2x^2+x^3\). Give the output coordinate vector and polynomial.
- For \(D:P_4\to P_3\), state the number of rows and columns and explain what determines each number.
- Prove that a polynomial whose derivative is zero must be constant by comparing coefficients.
- For \(D:P_2\to P_1\), show what the matrix does to the coefficient vector of \(x^2\), and explain why an output of \(x\) would indicate an error.