← Module 05 / Calculus & optimization

Lesson 05.3 · §4.3

What linear map describes a nonlinear change nearby?

Match Jacobian rows to outputs and columns to inputs.

In this lesson 4 ideas
  1. Zoom in on a curved map
  2. Use it as a local map
  3. Transfer
  4. Explore the relationship

Source scope: §4.3, PDF pages 27, 28. Numerical examples, experiments, added derivations, and practice are teaching supplements unless identified as source results.

Zoom in on a curved map

Let g(x,y)=(x2,y+xy)Tg(x,y)=(x^2,y+xy)^T. At (1,1)(1,1) the output is (1,2)T(1,2)^T. Increase xx by 0.10.1 and hold yy fixed: the new output is (1.21,2.1)T(1.21,2.1)^T. The first-order prediction will be (1.2,2.1)T(1.2,2.1)^T; the missing 0.010.01 is the quadratic term in (1+0.1)2(1+0.1)^2.

For g:Rn→Rmg:\mathbb R^n\to\mathbb R^m, the Jacobian is an m×nm\times n matrix:

Jg(x)=[∂g1/∂x1⋯∂g1/∂xn⋮⋱⋮∂gm/∂x1⋯∂gm/∂xn],[Jg(x)]ij=∂gi∂xj(x).J_g(x)=\begin{bmatrix} \partial g_1/\partial x_1&\cdots&\partial g_1/\partial x_n\\ \vdots&\ddots&\vdots\\ \partial g_m/\partial x_1&\cdots&\partial g_m/\partial x_n \end{bmatrix},\qquad [J_g(x)]_{ij}=\frac{\partial g_i}{\partial x_j}(x).

A row fixes one output and varies the input coordinate. A column describes how all outputs respond to one input coordinate. This matches the matrix-of-a-map convention: columns are images of input directions.

Use it as a local map

For the example,

Jg(x,y)=[2x0y1+x],Jg(1,1)=[2012].J_g(x,y)=\begin{bmatrix}2x&0\\y&1+x\end{bmatrix},\qquad J_g(1,1)=\begin{bmatrix}2&0\\1&2\end{bmatrix}.

Teaching supplement. When gg is differentiable, g(a+h)=g(a)+Jg(a)h+o(∥h∥)g(a+h)=g(a)+J_g(a)h+o(\|h\|). With a=(1,1)a=(1,1) and h=(s,t)h=(s,t), the true increment is (2s+s2,s+2t+st)(2s+s^2,s+2t+st), while the linear prediction is (2s,s+2t)(2s,s+2t). The error (s2,st)(s^2,st) becomes small relative to ∥h∥\|h\| as h→0h\to0. Having partial derivatives alone is not enough to guarantee differentiability.

For a scalar output (m=1m=1), JfJ_f is a 1×n1\times n row and the source notes

∇f=JfT.\nabla f=J_f^T.

The transpose expresses a convention with consequences: a Jacobian maps input increments forward; the column gradient participates in dot products and later propagates derivatives backward through a composite function.

Transfer

For h(x,y,z)=(x+z,yz)h(x,y,z)=(x+z,yz), the Jacobian is [1010zy]\begin{bmatrix}1&0&1\\0&z&y\end{bmatrix}, a 2×32\times3 matrix. It takes a three-coordinate input increment to a two-coordinate output increment.

Explore the relationship

Explore it yourself

Compare a nonlinear map with its Jacobian

Shrink the input displacement. How does the linear prediction error change?

Preparing interactive controls…

output 1output 20-3-2-11234
Jacobian at the base point
20
12

g(a) = (1, 2); h = (0.2, 0.1); Jg(a)h = (0.4, 0.4).

Actual g(a+h) = (1.44, 2.42); prediction = (1.4, 2.4); error = (0.04, 0.02) = (h₁², h₁h₂).

Red filled point: actual output. Blue hollow point: prediction. The displayed neighborhood grid always spans ±0.4 in each input coordinate; the sliders change the selected displacement within it. At base x = 0, the Jacobian is singular.