Can taking a derivative be a matrix? Watch a table of numbers turn a cubic curve into its slope curve.
Differentiation is a matrix
The coefficients of a cubic, times one fixed matrix, give the coefficients of its derivative.
p(x) = 2 − 3x + x^2 + 4x^3, written as its coefficients (2, −3, 1, 4).
Describe this picture
Two panels (stacked on a phone). On the left, a grid of cells, the matrix , times the column of coefficients of the cubic . Row by row, the row of in use lights up and the output column fills: . On the right, the curve from to , and then the curve that those numbers describe. At five points, , a short line shows the slope of and a dot on the second curve shows the same value. The clip runs for about 10 s. One control after the clip: four sliders, one per coefficient, from to 5; the product and both curves redraw.
Linear maps beyond arrows
On A gallery of linear maps a map was linear when it kept adding and scaling. Nothing in that test needs arrows. Take “differentiate”: the derivative of a sum is the sum of the derivatives, and the derivative of times a function is times its derivative. So differentiation is a linear map on functions. I’ll write a map with braces, , as the gallery page does and as signal processing writes a system. The test is
Other linear maps: integrating, turning, projecting, delaying a signal by one sample. Not linear: adding 1, since would be 1, not 0.
Columns are images
Polynomials of degree at most 3 are a vector space with the basis , as on Vector spaces and subspaces. Each polynomial’s coordinates in that basis are its four coefficients, constant first: has the coordinates . To find the matrix of differentiation, do what A matrix moves the plane did with the unit arrows: see where each basis vector goes, and write its coordinates as a column.
- : column .
- : column .
- : column .
- : column .
For : , which is . The table of numbers does calculus.
Drag the coefficients in the picture and watch the output. Its last entry is always 0, since differentiating lowers the degree, and the constant term never reaches the output at all.
Kernel and range
The null space of a map is also called its kernel, and its column space its range. For :
- the kernel is the constants, , since only constants have derivative 0: dimension 1;
- the range is the polynomials of degree at most 2: dimension 3, the rank.
And , the number of inputs, as on The four fundamental subspaces: rank plus the dimension of the kernel equals the number of columns.
Composing maps multiplies matrices. Differentiating twice is :
and , which is . Four derivatives kill every cubic: is the zero matrix.
Undoing, up to a constant. Integration from degree 2 to degree 3, starting at 0, sends , , . Its matrix is :
Integrate then differentiate and you are back where you started: , restricted to degree 2, is the identity. The other order loses the constant: you get .
One map, many matrices
A map’s matrix depends on the basis. Use the basis instead, with . By Change of basis, the same map becomes
every entry above the diagonal is 1. Each basis polynomial is sent to the one before it, and the matrix is the Jordan block for the eigenvalue 0, from Similar matrices and the Jordan form. In this basis has coordinates , and the output means : the same .
The picture below makes the same point with arrows.
One map, two matrices
Projection onto the line y = x, written on two grids.
Three arrows, twice: on the usual grid (left) and on the grid of (1, 1) and (1, −1) (right).
Describe this picture
Two panels with the same three arrows, , and , and the line (stacked on a phone). On the left they sit on the usual grid, with the matrix in the corner. On the right they sit on the grid of and , with axes marked and , and the matrix . Over 3 s the arrows are projected onto the line, the same in both panels, to , and ; dashed drops from the old tips then meet the line at a right angle. The clip runs for about 7 s. There is no control.
The projection is one map. On the usual grid its table is full of halves; on a grid along and across the line it is , keep one coordinate, drop the other. A matrix is a map written in one basis, not the map itself.
In signal processing · realisations of a filter
Filter structures, in the signal processing course, builds one filter in many ways. Each is a state-space matrix in a different basis for the stored values, so all of them have the same transfer function: one map, many matrices. Signal samples count from , while vector entries count from 1.
Worked example
1. Differentiate. .
2. Twice. , and applied to , coordinates , gives , that is .
3. Kernel and range. Kernel: constants, dimension 1. Range: degree at most 2, dimension 3. Total 4.
4. A scaled basis. has ones above the diagonal: entry is 1, entry is , entry is .
5. A projection in two bases. in the usual basis, in the basis , . This is the projection matrix of Projections.
Try these before you read the answers.
- Is linear? No: it sends 0 to 1.
- The matrix of “double every polynomial”, in any basis? .
- Which matrix undoes on polynomials of degree at most 2, up to a constant? The integration matrix.
Where you’ll meet this
Numerical solvers. Programs that solve differential equations with polynomials or smooth series store differentiation as a matrix, then solve the equation as a linear system.
Filters. A filter acting on a block of samples is a matrix, as on A matrix moves the plane, and its different structures are that map in different bases.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Linear map | functions, signals, arrows alike | |
| Its matrix | column = coordinates of | depends on the basis |
| Differentiation | , entries above the diagonal | on the basis |
| Composition | has matrix | differentiates twice |
| Kernel and range | and | rank kernel dimension number of inputs |
| New basis | the same map, another table |