2

This answer https://math.stackexchange.com/a/1003377/823264 says that we can form a matrix from a derivative given some set of functions. Given the set ${1,,^2}$ and $D = \frac{d}{dx}$ it implies that $D(1) = 0$, $D(x) = 1$, and $D(x^2)$ = $2x$

So far so good, but how do we explicitly get the matrix components $D_{nm}$ given this information? The answer just jumps into “here’s the matrix” instead of saying how. It says the columns are the images of the vectors but I don’t see how that yields each matrix component.

What’s the formula for computing $D_{nm}$ matrix entry?

Obama2020
  • 185
  • 3
    Have you learned or looked up how you write the matrix representation of a linear transformation from $V$ to $V$ once you have a basis for $V$? – Ted Shifrin Nov 03 '22 at 00:52
  • @TedShifrin Yes. However, in quantum mechanics I learned that we have to integrate over the complex conjugate of the function and itself to get the matrix element (given an orthonormal basis). It seems that the method being used here is different since it requires no integration. – Obama2020 Nov 03 '22 at 07:30

2 Answers2

4

A little background:

  • Suppose that $T: V\to W$ is a linear transformation from $n$-dimensional vector space $V$ to $m$-dimensional vector space $W$ over a field $\mathbf{F}$ (e.g., $\mathbf{R}$ or $\mathbf{C}$). Consider $\beta_{V}=\{v_{1},v_{2},\ldots,v_{n}\}$ be a basis for the vector space $V$ and $\beta_{W}=\{w_{1},w_{2},\ldots,w_{m}\}$ be a basis for the vector space $W$, the matrix representation for $T$ is defined by $$[T]_{\beta_{V}\to \beta_{W}}:=\begin{bmatrix} \uparrow & \uparrow & \cdots &\uparrow &\uparrow\\ [T(v_{1})]_{\beta_{W}} & [T(v_{2})]_{\beta_{W}}&\cdots & [T(v_{n-1})]_{\beta_W} & [T(v_{n})]_{\beta_W}\\ \downarrow & \downarrow &\cdots &\downarrow & \downarrow\end{bmatrix}\in \mathbf{F}^{m\times n},$$ where $[T(v_{i})]_{\beta_W}$ is the coordinates of vector $T(v_{i})$ respect to basis $\beta_{W}$, i.e., $$[T(v_{i})]_{\beta_W}=\begin{bmatrix}\alpha_{1}\\ \alpha_{2}\\\vdots\\\alpha_{m} \end{bmatrix} \quad \text{iff}\quad T(v_{i})=\alpha_{1}w_{1}+\alpha_{2}w_{2}+\cdots+\alpha_{m}w_{m}$$

Now, the function $D: \mathcal{D}\to \mathcal{F}$, where $\mathcal{D}$ is the vector space consisting of all differentiable functions and $\mathcal{F}$ is the vector space of functions over the real line, definided by $D(f):=f'$ is a linear transformation, you can check that by definition of linear transformation.


In your example, consider $V=P_{2}(\mathbf{R})$ and $W=P_{2}(\mathbf{R})$ and field $\mathbf{F}=\mathbf{R}$. Also, consider the standar basis $\beta_{V}=\{1,x,x^{2}\}$ for $V$ and $\beta_{W}=\{1,x,x^{2}\}$ for $W$. Consider the differential operator $D: V\to W$ defined by $D(f)=f'$ for all $f\in V$, then $$D(1)=0,\quad D(x)=1,\quad D(x^{2})=2x^{2},$$ then the matrix representation respect to standar basis for $D$ is given by $$[D]_{\beta_{V}\to \beta_{W}}=\begin{bmatrix}\uparrow & \uparrow & \uparrow\\ [D(1)]_{\beta_{W}}& [D(x)]_{\beta_{W}}&[D(x^{2})]_{\beta_{W}}\\ \downarrow&\downarrow &\downarrow \end{bmatrix}\in \mathbf{R}^{3\times 3}.$$ Since $$D(1)=0+0x+0x^{2}, \quad [D(1)]_{\beta_{W}}=\begin{bmatrix} 0\\0\\0\end{bmatrix},$$ $$D(x)=1+0x+0x^{2},\quad [D(x)]_{\beta_{W}}=\begin{bmatrix}1\\0\\0\end{bmatrix},$$ $$D(x^{2})=0+2x+0x^{2},\quad [D(x^{2})]_{\beta_{W}}=\begin{bmatrix}0\\2\\0\end{bmatrix}$$ Therefore, $$\color{blue}{[D]=\begin{bmatrix}0&1&0\\0&0&2\\0&0&0\end{bmatrix}\in \mathbf{R}^{3\times 3}},$$ as desired.

A. P.
  • 5,978
  • Does the basis have to be orthonormal? Or it doesn’t matter? (Because if we require orthonormality then we’d have to define the inner product of the functions). – Obama2020 Nov 03 '22 at 07:33
  • Only we need to be basis for $V$ and $W$ vector spaces. We do not impose orthonormality. See the hypothesis in the definition given. – A. P. Nov 03 '22 at 08:54
0

Using the observation that $\frac{\mathrm{d}}{\mathrm{d}x}x^n=nx^{n-1}$, and taking $D$ to be the derivative operator over the vector space $P_n(\mathbb{R})$ of polynomials in $\mathbb{R}$ of order less than or equal to $n$, using the canonical basis $\beta = \{x^0, x^1, x^2, \dots, x^n\}$, we can see that $D$ can be expressed as a $(n+1) \times (n+1)$ matrix

$$D = \begin{bmatrix}d_{00} & d_{01} &\cdots & d_{0n}\\ d_{10} &d_{11} & \cdots &d_{1n}\\ \vdots & \vdots & \ddots & \vdots\\ d_{n0} & d_{n1} & \cdots &d_{nn} \end{bmatrix}$$

Where

$$d_{ij} = j\delta_{i(j-1)}$$

Where $\delta_{ij}$ is the Kronecker delta. This formula comes directly from $\frac{\mathrm{d}}{\mathrm{d}x}x^n=nx^{n-1}$. Can you see how?

This gives us the matrix

$$D = \begin{bmatrix}0 & 1 &0 &0 &\cdots & 0\\ 0 &0 &2 &0 &\cdots &0\\ 0 &0 &0 &3 &\cdots &0\\ \vdots & \vdots &\vdots &\vdots &\ddots & \vdots\\ 0 & 0& 0 &0 &\cdots &n\\ 0 &0 &0 &0 &\cdots &0 \end{bmatrix}$$

Which, applied to any polynomial, is indeed the derivative operator.

This can be generalized to an infinite-dimensional operator $D$ over $\mathbb{R}[x]$, the vector space of all formal power series in $x$ with coefficients in $\mathbb{R}$.

Lemmon
  • 1,234
  • 2
    How is it possible that this is more easy to understand to OP than the $n=2$ case? – azif00 Nov 03 '22 at 01:38
  • It may not be easier, but I was looking for a generalization alongside the explanation. For $n = 2$ this is exactly the OP's case. I would argue that user1027216's answer is even better, being more comprehensive, despite being more mathematically advanced again. OP wanted a formula for $d_{ij}$, and I provided one. – Lemmon Nov 03 '22 at 01:43
  • I think you’re not recognizing what the OP was actually lacking/needing. – Ted Shifrin Nov 03 '22 at 10:37
  • @TedShifrin For future reference, would you have any tips for making an answer more accessible/better explanatory? – Lemmon Nov 03 '22 at 10:41
  • 1
    In general, one of the important aspects of teaching is interpreting (and even anticipating) what the difficulty a student (or questioner) is having. My comment already made that clear, I think (although the OP didn't respond until quite a while later). But I would suggest that if a person is having trouble with a specific example, doing the general case and not explaining the key issue isn't likely to help. – Ted Shifrin Nov 03 '22 at 15:54
  • @TedShifrin thank you very much for the explanation. I'll try to keep that in mind going forwards. – Lemmon Nov 03 '22 at 23:16