Back to the on-screen lesson ·

Tangent planes and linear approximation

The plane through a point of a surface that matches both of its slopes: its equation, the normal vector $\langle f_x, f_y, -1 \rangle$, the linear estimates and error budgets it produces, and why two partial derivatives are not yet differentiability.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to write the tangent plane to a surface at a point, give a normal vector to it, use the linearisation to estimate a nearby value, use differentials to say which measurement error costs the most, and say what differentiability asks for beyond the existence of two partial derivatives.

2. What you already have

Partial derivatives from the last lesson, and the equation of a plane from a point and a normal vector from unit 1. This lesson is the two of them joined: the partials supply the slopes, and the plane through the point with those slopes is the best flat approximation the surface has.

3. The words this lesson will use

The tangent plane at a point of a surface is the plane that touches it there and matches both of its slopes. A normal vector is perpendicular to that plane, and so to the surface. The linearisation $L(x, y)$ is the function whose graph is the tangent plane. The differential $dz = f_x\,dx + f_y\,dy$ is the change the plane predicts for small steps $dx$ and $dy$. A function is differentiable at a point when that prediction is accurate to better than first order in every direction.

4. The plane that matches both slopes

Let $f$ have partial derivatives at $(a, b)$. The tangent plane to $z = f(x, y)$ at that point is

$$z = f(a, b) + f_x(a, b)\,(x - a) + f_y(a, b)\,(y - b).$$

Read it as three instructions: start at the height the surface has, then add the $x$ slope times how far you moved in $x$, then the $y$ slope times how far you moved in $y$. Setting $y = b$ leaves the tangent line to the trace in the $xz$ plane, and setting $x = a$ leaves the tangent line to the other trace — so the plane is exactly the one containing both tangent lines.

The normal vector. Writing the surface as $F(x, y, z) = f(x, y) - z = 0$ and taking partial derivatives gives

$$\mathbf{n} = \langle f_x(a, b),\; f_y(a, b),\; -1 \rangle,$$

perpendicular to the tangent plane and so to the surface. Any non-zero multiple is equally a normal; the one with $-1$ in the last slot is the one that reproduces the equation above directly.

Linear approximation. The same formula used as an estimate is the linearisation

$$L(x, y) = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b), \qquad f(x, y) \approx L(x, y),$$

and in differential form, with $\Delta x$ and $\Delta y$ small,

$$\Delta z \approx f_x(a, b)\,\Delta x + f_y(a, b)\,\Delta y.$$

This is the workhorse of error estimation: if a rectangle's sides are measured with errors $\Delta x$ and $\Delta y$, the area's error is about $y\,\Delta x + x\,\Delta y$, and each term names which measurement is responsible for how much of it.

How good is the approximation? For $f(x, y) = px^2$, stepping $\Delta x$ from $x = a$ makes the true change $2pa\,\Delta x + p(\Delta x)^2$ while the plane predicts only the first term. The error is the quadratic part, so it shrinks like the square of the step: halve the step and the error falls to a quarter. That is the general pattern, and it is what tangent means.

Differentiability. $f$ is differentiable at $(a, b)$ when

$$f(x, y) = L(x, y) + \varepsilon_1\,\Delta x + \varepsilon_2\,\Delta y, \qquad \varepsilon_1, \varepsilon_2 \to 0 \text{ as } (\Delta x, \Delta y) \to (0, 0).$$

That is strictly more than having two partial derivatives, which only describe the surface along two lines. The usable test: if $f_x$ and $f_y$ exist and are continuous near $(a, b)$, then $f$ is differentiable there — and that covers every polynomial, and every rational, exponential, logarithmic and trigonometric combination away from where it breaks.

Another way: picture

Rest a stiff card on a bowl so that it touches at one point. The card is the tangent plane. Near the touching point the card and the bowl are hard to tell apart; a hand's breadth away the gap is obvious, and the gap grows like the square of how far you have gone. A pin pushed through the card at right angles is the normal vector.

Another way: steps

To write the tangent plane at $(a, b)$:

  1. Compute $f(a, b)$ — the height.
  2. Compute $f_x$ and $f_y$ as functions, then substitute the point. In that order: substituting first destroys the variable you meant to differentiate.
  3. Write $z = f(a,b) + f_x(a,b)(x - a) + f_y(a,b)(y - b)$.
  4. For a normal vector, read off $\langle f_x, f_y, -1 \rangle$.
  5. To estimate a nearby value, put the nearby point into that formula rather than into $f$.

5. Differentials as an error budget

A cylindrical tank is measured as radius $r$ and height $h$, each to within a small error. Its volume is $V = \pi r^2 h$, so

$$dV = 2\pi r h\,dr + \pi r^2\,dh.$$

Two things make this more useful than a single error figure. First, it is itemised: the first term is what the radius error costs and the second is what the height error costs, so if the total is too large the formula says which instrument to improve. Second, it is linear, so the costs simply add and a fifty per cent tighter tolerance on $r$ halves that term exactly.

For a tank with $r = 2$ and $h = 10$, $dV = 40\pi\,dr + 4\pi\,dh$: the radius is worth ten times as much as the height, millimetre for millimetre. Nobody would guess that from the volume formula, and it is the kind of conclusion the linear approximation exists to produce.

The caution is the one above: this is a first-order statement. It is reliable while the errors are small compared with the measurements themselves, and it understates the truth by the quadratic terms it dropped.

6. Where this goes wrong

Substituting before differentiating. Putting $x = a$ into $f$ and then differentiating gives zero, because there is no longer an $x$ to differentiate. Differentiate the general formula first, substitute afterwards.

Forgetting to subtract the base point. The plane is $f_x \cdot (x - a)$, not $f_x \cdot x$. Leaving off the $-a$ moves the plane so it no longer touches the surface anywhere near the point.

Reading two partials as differentiability. They describe the surface along two lines. A surface can be perfectly well behaved along both axes and torn everywhere else, and the transfer question at the end of this lesson is exactly that case.

Trusting the estimate far from the point. The error grows quadratically, so a step ten times as large is a hundred times as wrong. A third coordinate is not a third term bolted onto a two-dimensional formula. The cross product exists only in space, a plane is fixed by a direction rather than by a slope, and a curve in space can bend without ever leaving a surface. Checking a new formula against the plane is worth doing; assuming the plane's formula still governs is how most of the errors in this course begin.

7. Seeing it in three dimensions

The bowl z = x² + y² with its tangent plane at the point (0.6, −0.6, 0.72). The plane z = 0.72 + 1.2(x − 0.6) − 1.2(y + 0.6) contains the two tangent lines to the traces: one rising with slope f_x = 1.2 in the x-direction, one falling with slope f_y = −1.2 in the y-direction. The normal ⟨1.2, −1.2, −1⟩ is at right angles to the plane. Near the point the plane and the bowl are hard to tell apart; further away the bowl curves up above it.
The bowl z = x² + y² with its tangent plane at the point (0.6, −0.6, 0.72). The plane z = 0.72 + 1.2(x − 0.6) − 1.2(y + 0.6) contains the two tangent lines to the traces: one rising with slope f_x = 1.2 in the x-direction, one falling with slope f_y = −1.2 in the y-direction. The normal ⟨1.2, −1.2, −1⟩ is at right angles to the plane. Near the point the plane and the bowl are hard to tell apart; further away the bowl curves up above it.

The bowl is $z = x^2 + y^2$ and the point is $(0.6, -0.6)$, where $f = 0.72$, $f_x = 2x = 1.2$ and $f_y = 2y = -1.2$. So the tangent plane is $z = 0.72 + 1.2(x - 0.6) - 1.2(y + 0.6)$. The two short lines through the point are the tangent lines to the two traces: one rises with slope $1.2$ in the $x$-direction, the other falls with slope $-1.2$ in the $y$-direction, and the plane is the one containing both. The normal $\langle f_x, f_y, -1 \rangle = \langle 1.2, -1.2, -1 \rangle$ is square to it. Turn the figure until the plane is edge on: near the point it hugs the bowl, and further out the bowl curves away above it, which is why the linear approximation is good only nearby.

8. Two partial derivatives are not a tangent plane

It is tempting to reason that a surface has a slope in the $x$ direction and a slope in the $y$ direction, so there is exactly one plane with both slopes, so that plane must be the tangent plane. The first two steps are right and the third does not follow. The plane exists as soon as the two numbers do; whether it approximates the surface is a separate question, and it is about the directions in between.

The standard counterexample is $f(x, y) = xy/(x^2 + y^2)$ with $f(0, 0) = 0$. It is identically zero along both axes, so both partial derivatives at the origin are zero and the candidate plane is $z = 0$. Along $y = x$, however, the function is constantly $\tfrac12$: the surface never approaches the plane at all in that direction, and is not even continuous at the origin.

So differentiable is a stronger word than has partial derivatives, and the practical test is the one worth remembering: partial derivatives that are continuous in a neighbourhood of the point are enough, and every function built from the usual formulas satisfies it wherever it is defined.

9. A tangent plane and the estimate it gives

  1. For $f(x, y) = x^2 + 3y^2$ at $(2, 1)$: the height is $f(2, 1) = 4 + 3 = 7$.

    Start with the value at the point.

  2. $f_x = 2x$ so $f_x(2, 1) = 4$; $f_y = 6y$ so $f_y(2, 1) = 6$. The plane is $z = 7 + 4(x - 2) + 6(y - 1)$.

    Two slopes, each attached to its own displacement.

  3. Estimating $f(2.1, 0.9)$: $7 + 4(0.1) + 6(-0.9 + 1 - 1)$ — carefully, $\Delta y = -0.1$, so the estimate is $7 + 0.4 - 0.6 = 6.8$. The true value is $4.41 + 2.43 = 6.84$, so the estimate is out by $0.04$, which is the quadratic part $\Delta x^2 + 3\Delta y^2 = 0.01 + 0.03$ exactly.

    The error is the quadratic term, to the digit.

10. A normal vector and what it is for

  1. For $z = x^2 + y^2$ at $(1, 2)$: $f_x = 2x = 2$ and $f_y = 2y = 4$, so $\mathbf{n} = \langle 2, 4, -1 \rangle$.

    The partials are the first two entries.

  2. The point on the surface is $(1, 2, 5)$, so the plane through it with that normal is $2(x - 1) + 4(y - 2) - (z - 5) = 0$.

    A point and a normal determine a plane, as in unit 1.

  3. Rearranging gives $z = 5 + 2(x - 1) + 4(y - 2)$ — the tangent plane formula again. The normal is worth having on its own, though: it is what tells a light ray how to reflect off the surface, and it is the vector the surface integrals of unit 5 are built from.

    Two routes, one plane, and a vector that will be needed later.

11. Your turn: estimate the diagonal of a rectangle whose sides shift slightly

  1. Let $f(x, y) = \sqrt{x^2 + y^2}$ at $(3, 4)$, where $f = 5$. Then $f_x = x/\sqrt{x^2 + y^2} = 3/5$ and $f_y = 4/5$.

    Height first, then the two slopes.

  2. So $f(3.1, 3.9) \approx 5 + \tfrac35(0.1) + \tfrac45(-0.1) = 5 + 0.06 - 0.08 = 4.98$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    The two slopes are the components of the unit vector from the origin towards $(3, 4)$ — which is no accident: the diagonal grows fastest when the sides grow along the direction they already point in. That observation is the gradient of lesson 18 arriving early.

12. Guided practice

For $f(x, y) = 6x^2 + 2y^2$, fill in the three numbers the tangent plane at $(3, 5)$ is built from.

Value
The height $f(3, 5)$
The slope $f_x(3, 5)$
The slope $f_y(3, 5)$

13. Guided practice

Write a normal vector to the surface $z = 3x^2 + 4y^2$ at the point above $(3, 3)$, as one row $\langle n_1, n_2, n_3 \rangle$ whose last entry is $-1$.

This task has no paper form; do it on a device.

14. Practice

For $f(x, y) = 2x^2 + 5y^2$, use the tangent plane at $(5, 5)$ to estimate $f(8, 5)$.

Answer:

15. Practice

For $f(x, y) = 3x^2 + 6y^2$, by how much does the tangent-plane estimate of $f(6, 5)$ fall short of the true value?

Answer:

16. Practice

For $f(x, y) = 2x^2 + 2y^2$, fill in the three numbers the tangent plane at $(4, 3)$ is built from.

Value
The height $f(4, 3)$
The slope $f_x(4, 3)$
The slope $f_y(4, 3)$

17. Somewhere new

Let $f(x, y) = \dfrac{6xy}{x^2 + y^2}$ away from the origin and $f(0, 0) = 0$. Both partial derivatives at the origin exist and are $0$, yet $f$ is not continuous there. What follows?

18. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

19. Test question

Write a normal vector to the surface $z = 6x^2 + 6y^2$ at the point above $(4, 3)$, as one row $\langle n_1, n_2, n_3 \rangle$ whose last entry is $-1$.

This task has no paper form; do it on a device.

20. What you can do now

You can build a tangent plane from a height and two slopes, read a normal vector off it, and say how fast its estimate decays as you step away. Next: the chain rule, which says what happens to these derivatives when the variables themselves depend on something else.

Working for the steps left to you

11. Your turn: estimate the diagonal of a rectangle whose sides shift slightly, step 3