Tangent Plane: Two Steps and Approximation Error

Before reading this article, you should already understand the geometric meaning of fx(a, b)Δx and fy(a, b)Δy. If not, read the visualization of the sum of estimated height changes first.

This article visualizes how the total error in a tangent-plane linear approximation equals the sum of the errors from each coordinate step. In the visualized example, both errors are positive, so the total error is positive too. In general, the first-step error and second-step error can each be positive, negative, or zero.

If you’re interested, you can download the Python script and tinker with it through vibe coding.

Visualization: the total error is the sum of the two step errors (Drag to rotate)

Surface: z = x² + y² · Start = (0.5, 0.5) · End = (0.8, 0.2) · Δx = 0.3, Δy = −0.3
Step 1: (0.5, 0.5) → (0.8, 0.5) · Step 2: (0.8, 0.5) → (0.8, 0.2)
The surface reaches height 0.68 at the endpoint; the tangent plane predicts 0.5. Each coordinate step contributes 0.09 to the total error of 0.18.

Loading plot…

Proof: the total error is the sum of the two step errors

We start with the total error of the linear approximation at (a, b):

Etotal=[f(a + Δx, b + Δy) − f(a, b)]total real height change−[fx(a, b)Δx + fy(a, b)Δy]total estimated height change

The first bracket is the total real height change; the second is the total estimated height change. We want to prove:

Etotal=Estep 1 + Estep 2

1. Divide the movement into two steps

Instead of moving directly from (a, b) to (a + Δx, b + Δy), change x first, then y:

(a, b) → (a + Δx, b)Step 1: change x
(a + Δx, b) → (a + Δx, b + Δy)Step 2: change y

2. Define the error of each step

Step 1: Change x while keeping y = b. Subtract the estimated height change from the real height change:

Estep 1=[f(a + Δx, b) − f(a, b)]real height change in step 1−fx(a, b)Δxestimated height change in step 1

Step 2: Change y while keeping x = a + Δx:

Estep 2=[f(a + Δx, b + Δy) − f(a + Δx, b)]real height change in step 2−fy(a, b)Δyestimated height change in step 2

Both estimated changes use the partial derivatives at the original point (a, b). This is important because we are proving the error formula for the linear approximation at that point.

3. Add the two step errors

Estep 1 + Estep 2={[f(a + Δx, b) − f(a, b)] − fx(a, b)Δx}+{[f(a + Δx, b + Δy) − f(a + Δx, b)] − fy(a, b)Δy}

Rearrange the terms:

=f(a + Δx, b) − f(a, b)+f(a + Δx, b + Δy) − f(a + Δx, b)−fx(a, b)Δx − fy(a, b)Δy

So we obtain:

Estep 1 + Estep 2=[f(a + Δx, b + Δy) − f(a, b)]total real height change−[fx(a, b)Δx + fy(a, b)Δy]total estimated height change=Etotal

The key insight: The two real height changes add up to the total real height change, and the two estimated height changes add up to the total estimated height change. Consequently, the two signed errors also add up to the total signed error.

Intuition

Imagine making the journey twice: once along the surface and once using the tangent plane. Both journeys start at the same height.

  • After Step 1, their heights differ by the first step error.
  • During Step 2, the difference between their height changes adds the second step error to that existing separation.