blog

Linear Algebra and Its Applications, Part 2: Derivatives

I mentioned in my introduction post that this series would probably end up being about the applications of Linear Algebra to other fields of math or something. Well it’s the first post, and we already stopped talking about real life applications! Whoops.

Consider the vector space with basis

{B}=1,x,x2,...,xn\mathscr\{B\} = \\{ 1, x, x^2, ... , x^n \\}

over R.\mathbb{R}. This is known as the vector space of polynomials with real coefficients of degree n or less, denoted by R[x]\mathbb{R}[x] (some texts may use P_n)P\_n). If it looks familiar, it probably showed up as a frequent example in your Linear Algebra problem sets (and is of extreme importance over an arbitrary field in Galois Theory)!

Note: while in Algebra the PID F[x]\mathbb{F}[x] for F\mathbb{F} a field contains infinite degree polynomials, in this case we will assume R[x]\mathbb{R}[x] to have finite degree polynomials with maximum degree nn.

We can write an arbitrary element of any vector space as a linear combination of the elements of its basis set. In this case, an element of R[x]\mathbb{R}[x] looks like a polynomial. A linear combination of the elements of B\mathscr{B} is of the form

a+a_1x+a_2x2+...a_nxn.a + a\_1x + a\_2x^2 + ... a\_nx^n.

We can use f(x)f(x) and g(x)g(x) to denote such linear combinations with shorthand _i=0na_ixi\sum\_{i=0}^{n} a\_ix^i for a_iRa\_i \in \mathbb{R}. Note that xx isn’t actually a variable: we haven’t defined a way to evaluate xx and it doesn’t change based off the input. (If you’re wondering how we evaluate polynomials in the traditional sense, we use something called the evaluation homomorphism).

We can use this vector space to do some cool things, like take ideas from Calculus and express them in the language of Linear Algebra! Remember the derivative from Calculus: in this case it’s a map ddx:R[x]R[x]\frac{d}{dx} : \mathbb{R}[x] \to \mathbb{R}[x] such that {d}{dx}(a+a_1x+...+a_nxn)=a_1+2a_2x+...+na_nx{n1}.\frac\{d\}\{dx\}\left(a+a\_1x+...+a\_nx^n\right)=a\_1+2a\_2x+...+na\_nx^\{n-1\}. In summation notation, it’s saying that {d}{dx}_{i=0}{n}a_ixi=_{i=0}{n1}(i+1)a_{i+1}x{i}.\frac\{d\}\{dx\}\sum\_\{i=0\}^\{n\} a\_ix^i = \sum\_\{i=0\}^\{n-1\} (i+1)a\_\{i+1\}x^\{i\}. Using the standard notations for derivatives, we can write ddxf(x)=f(x)\frac{d}{dx}f(x)=f'(x) for f(x)R[x].f(x)\in\mathbb{R}[x].

We can show that the map ddx:R[x]R[x]\frac{d}{dx} : \mathbb{R}[x] \to \mathbb{R}[x] is linear. Recall that the conditions for a map T:VVT: V \to V to be linear are that

{1:}T(v_1+v_2)=T(v_1)+T(v_2)\text\{1:\}\,\,T(v\_1+v\_2)=T(v\_1)+T(v\_2) {2:}T(αv)=αT(v)\text\{2:\}\,\,T(\alpha v) = \alpha T(v)

for a vector space VV over a field F,v_iV,αF.\mathbb{F}, v\_i \in V, \alpha \in \mathbb{F}. We know that

{d}{dx}(f(x)+g(x))={d}{dx}f(x)+{d}{dx}g(x)\frac\{d\}\{dx\}\left(f(x) + g(x)\right) = \frac\{d\}\{dx\}f(x) + \frac\{d\}\{dx\}g(x)

for f(x),g(x)R[x],f(x), g(x) \in \mathbb{R}[x], satisfying the first condition. Next,

{d}{dx}(cf(x))=c{d}{dx}f(x)\frac\{d\}\{dx\}\left( c f(x) \right) = c \frac\{d\}\{dx\}f(x)

for cR,f(x)R[x],c \in \mathbb{R}, f(x) \in \mathbb{R}[x], so ddx\frac{d}{dx} is linear.

Furthermore, if a map from a vector space onto itself is linear, we can say it’s a linear transformation. We can represent such transformations with a matrix. To find the matrix representation of a linear transformation, examine the column vectors that arise from the image of the basis set under such linear transformation. We denote this matrix as [T]_B[T]\_B for a vector space TT with basis set BB, so for the derivative operator we would denote the image of B\mathscr{B} under ddx\frac{d}{dx} as [ddx]_B[\frac{d}{dx}]\_{\mathscr{B}}.

To find the first column vector, examine the image of 11 under ddx\frac{d}{dx}: clearly it vanishes since constants don’t change. So [1]_ddx=[00][1]\_{\frac{d}{dx}}= \Bigg[\begin{smallmatrix} 0 \\ \vdots \\ 0 \\ \end{smallmatrix}\Bigg] Similarly, we have

\begin\{bmatrix\} 1 \\ 0 \\ \vdots \\ 0 \\ \end\{bmatrix\}, \,[x^2]\_\{\frac\{d\}\{dx\}\} = \begin\{bmatrix\} 0 \\ 2 \\ 0 \\ \vdots \\ 0 \\ \end\{bmatrix\}, \,[x^3]\_\{\frac\{d\}\{dx\}\} = \begin\{bmatrix\} 0 \\ 0 \\ 3 \\ 0 \\ \vdots \\ 0 \\ \end\{bmatrix\},

and so on. Intuitively, this is because ddxx=1,ddxx2=2x,ddxx3=3x2,\frac{d}{dx}x=1, \frac{d}{dx}x^2 = 2x, \frac{d}{dx}x^3=3x^2, etc, and we represent those values with the vectors above if we write them as a linear transformation of the elements of B\mathscr{B} (e.g. 2x=01+2x+0x2+2x=0\cdot 1+2x+0x^2 + \cdots, 3x2=01+0x+3x2+0x3+).3x^2=0\cdot 1+0x+3x^2+0x^3+ \cdots).

If we combine all these column vectors, we can find a matrix representation of the derivative! Here it is in all its glory:

[{d}{dx}]_{{B}}=(0100000200000300000n000000),[\frac\{d\}\{dx\}]\_\{\mathscr\{B\}\} = \begin{pmatrix} 0 & 1 & 0 & 0 & \cdots & 0 \\ 0 & 0 & 2 & 0 & \cdots & 0 \\ 0 & 0 & 0 & 3 & \cdots & 0 \\ 0 & 0 & 0 & 0 & \ddots & \vdots \\ \vdots & \vdots & \vdots & \vdots & \ddots & n \\ 0 & 0 & 0 & 0 & 0 & 0 \\ \end{pmatrix},

where dim(R[x])=n+1\dim (\mathbb{R}[x]) = n+1 (or R[x]\mathbb{R}[x] having polynomials of a maximum degree nn). You can multiply this matrix by some polynomial vectors in your free time to see if this really works.

Furthermore, the derivative matrix has an interesting algebraic property in that it’s nilpotent. A nilpotent matrix is defined as one that eventually vanishes when multiplied by itself, that is, there exists some kZk \in \mathbb{Z} such that

Ak=0,A^k = 0,

where AA is a matrix and 00 denotes the zero matrix.

I won’t offer a proof, but this is an intuitive result: recall from Analysis that no polynomial of finite degree is infinitely differentiable. So an arbitrary polynomial of degree nn will vanish if differentiated n+1n+1 times, or in other words, multiplied by the matrix ddxn+1\frac{d}{dx}^{n+1} (in Liebniz notation this would be denoted as dn+1dxn+1\frac{d^{n+1}}{dx^{n+1}}). So clearly dn+1dxn+1\frac{d^{n+1}}{dx^{n+1}} corresponds to the zero matrix, and k=n+1.k=n+1.