← Back to calculus 3

Tangent Plane and Linear Approximation

Tangent plane and linear approximation

In one-variable calculus, the tangent line gives the best linear approximation to a curve near a point.

For functions of two variables, the same idea becomes a tangent plane.


1-D tangent line

Let y=f(x)y=f(x) and let x0x_0 be a point in the domain. If ff is differentiable at x0x_0, then the tangent line at the point (x0,f(x0))(x_0,f(x_0)) is

y=f(x0)(xx0)+f(x0).\boxed{y = f'(x_0)(x-x_0) + f(x_0).}

This is the line with slope f(x0)f'(x_0) that passes through (x0,f(x0))(x_0,f(x_0)).

Why this is the best linear approximation

Near x0x_0, the graph of ff behaves almost like a line. The tangent line is the linear function that matches both:

So if xx is close to x0x_0, then

f(x)f(x0)+f(x0)(xx0).f(x) \approx f(x_0) + f'(x_0)(x-x_0).

The right-hand side is the tangent-line formula written as a linear approximation.

1-D tangent line: best linear approximation near x₀

For the graph above, the curve is f(x)=x32x+1f(x)=x^3-2x+1. At x0=1x_0=1 we have

f(1)=0,f(x)=3x22,f(1)=1.f(1)=0, \qquad f'(x)=3x^2-2, \qquad f'(1)=1.

So the tangent line is

y=1(x1)+0=x1.y = 1(x-1)+0 = x-1.

That line is the best local linear model for the curve near x=1x=1.


From tangent line to tangent plane

For a function of two variables, z=f(x,y)z=f(x,y), a tangent line is not enough because the graph is a surface in 3D, not a curve in 2D.

At a point on a surface, we need a plane that best matches the surface near that point. That plane is the tangent plane.

So the one-variable picture

curvetangent line\text{curve} \rightarrow \text{tangent line}

becomes

surfacetangent plane.\text{surface} \rightarrow \text{tangent plane}.

Plane equation and tangent planes

A general plane in 3D can be written as

ax+by+cz+d=0.ax+by+cz+d=0.

This is the same as saying the plane has a normal vector (a,b,c)(a,b,c).

Why we let cc be non-zero

If c0c\neq 0, we can solve for zz:

z=acxbcydc.z = -\frac{a}{c}x - \frac{b}{c}y - \frac{d}{c}.

That form is especially useful for a graph of the form z=f(x,y)z=f(x,y), because the tangent plane can then be written as a function of xx and yy.

If c=0c=0, then the plane is vertical and cannot be written as z=somethingz=\text{something}.

But the graph of a differentiable function z=f(x,y)z=f(x,y) has a tangent plane that is not vertical at the point of tangency, so we assume the tangent plane can be written with c0c\neq 0.

Deriving the tangent plane equation

Let the surface be z=f(x,y)z=f(x,y) and let the point of tangency be (x0,y0,z0)(x_0,y_0,z_0), where

z0=f(x0,y0).z_0=f(x_0,y_0).

The tangent plane must:

That gives the tangent plane

z=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0).\boxed{z = f(x_0,y_0) + f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0).}

This is the multivariable analogue of the tangent line formula.


Example: z = 3x^3 + y^2 at (1,1,4)

Consider

f(x,y)=3x3+y2.f(x,y)=3x^3+y^2.

At (1,1)(1,1),

f(1,1)=3(1)3+(1)2=4.f(1,1)=3(1)^3+(1)^2=4.

The partial derivatives are

fx(x,y)=9x2,fy(x,y)=2y.f_x(x,y)=9x^2, \qquad f_y(x,y)=2y.

So at (1,1)(1,1),

fx(1,1)=9,fy(1,1)=2.f_x(1,1)=9, \qquad f_y(1,1)=2.

Therefore the tangent plane is

z=4+9(x1)+2(y1).\boxed{z = 4 + 9(x-1) + 2(y-1).}

Expanding gives

z=9x+2y7.z = 9x + 2y - 7.

The graph below shows the surface and its tangent plane at the point (1,1,4)(1,1,4).

Surface z = 3x³ + y² with tangent plane at (1,1,4)

Near (1,1,4)(1,1,4), the plane and the surface are very close. If you zoom in enough, the surface looks almost flat, and the tangent plane captures that local flatness.


Examples of tangent planes

Let

f(x,y)=x2+y2.f(x,y)=x^2+y^2.

Then

fx=2x,fy=2y.f_x=2x, \qquad f_y=2y.

At (1,1)(1,1),

f(1,1)=2,fx(1,1)=2,fy(1,1)=2.f(1,1)=2, \qquad f_x(1,1)=2, \qquad f_y(1,1)=2.

So the tangent plane is

z=2+2(x1)+2(y1)=2x+2y2.z = 2 + 2(x-1) + 2(y-1) = 2x + 2y - 2.

Let

f(x,y)=xy.f(x,y)=xy.

Then

fx=y,fy=x.f_x=y, \qquad f_y=x.

At (1,2)(1,2),

f(1,2)=2,fx(1,2)=2,fy(1,2)=1.f(1,2)=2, \qquad f_x(1,2)=2, \qquad f_y(1,2)=1.

So the tangent plane is

z=2+2(x1)+1(y2)=2x+y2.z = 2 + 2(x-1) + 1(y-2) = 2x + y - 2.

Let

f(x,y)=ex+y.f(x,y)=e^{x+y}.

Then

fx=ex+y,fy=ex+y.f_x=e^{x+y}, \qquad f_y=e^{x+y}.

At (0,0)(0,0),

f(0,0)=1,fx(0,0)=1,fy(0,0)=1.f(0,0)=1, \qquad f_x(0,0)=1, \qquad f_y(0,0)=1.

So the tangent plane is

z=1+x+y.z = 1 + x + y.

Let

f(x,y)=9x2y2.f(x,y)=\sqrt{9-x^2-y^2}.

At (1,2)(1,2),

f(1,2)=4=2.f(1,2)=\sqrt{4}=2.

The partial derivatives are

fx(x,y)=x9x2y2,fy(x,y)=y9x2y2.f_x(x,y)=\frac{-x}{\sqrt{9-x^2-y^2}}, \qquad f_y(x,y)=\frac{-y}{\sqrt{9-x^2-y^2}}.

So

fx(1,2)=12,fy(1,2)=1.f_x(1,2)=-\frac12, \qquad f_y(1,2)=-1.

Hence the tangent plane is

z=212(x1)(y2).z = 2 - \frac12(x-1) - (y-2).

Best linear approximation in two variables

The tangent plane is the best linear approximation to the surface near the point.

If (x,y)(x,y) is close to (x0,y0)(x_0,y_0), then

f(x,y)L(x,y),f(x,y) \approx L(x,y),

where

L(x,y)=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0).L(x,y)=f(x_0,y_0)+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0).

This is the linear function whose graph is the tangent plane.

So the tangent plane plays exactly the same role for surfaces that the tangent line plays for curves.


Example: approximate a function value

Let

f(x,y)=xexy.f(x,y)=xe^{xy}.

We want to approximate f(1.1,1.1)f(1.1,1.1) using the tangent plane at (1,1)(1,1).

First compute the value:

f(1,1)=1e1=e.f(1,1)=1\cdot e^1=e.

Now compute the partial derivatives.

fx(x,y)=exy+xyexy=exy(1+xy),f_x(x,y)=e^{xy}+xye^{xy}=e^{xy}(1+xy), fy(x,y)=x2exy.f_y(x,y)=x^2e^{xy}.

At (1,1)(1,1),

fx(1,1)=2e,fy(1,1)=e.f_x(1,1)=2e, \qquad f_y(1,1)=e.

So the linear approximation is

L(x,y)=e+2e(x1)+e(y1).L(x,y)=e+2e(x-1)+e(y-1).

At (1.1,1.1)(1.1,1.1),

L(1.1,1.1)=e+2e(0.1)+e(0.1)=1.3e.L(1.1,1.1)=e+2e(0.1)+e(0.1)=1.3e.

Numerically,

L(1.1,1.1)3.534.L(1.1,1.1)\approx 3.534.

So

f(1.1,1.1)3.534.\boxed{f(1.1,1.1) \approx 3.534.}

If you compare this with the exact value, you will see that the tangent plane gives a very good local estimate.


Differentiability

A function f(x,y)f(x,y) is differentiable at (a,b)(a,b) if, near (a,b)(a,b), it behaves like a linear function.

In practice, the most useful test in this course is:

if the partial derivatives fxf_x and fyf_y exist near (a,b)(a,b) and are continuous at (a,b)(a,b), then ff is differentiable at (a,b)(a,b).

For a differentiable function, the natural linear approximation is the tangent-plane formula

L(x,y)=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb).L(x,y)=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).

A function f(x,y)f(x,y) is differentiable at (a,b)(a,b) if there exists a linear map L(x,y)L(x,y) such that

lim(x,y)(a,b)f(x,y)L(x,y)(xa)2+(yb)2=0.\lim_{(x,y)\to(a,b)} \frac{f(x,y)-L(x,y)}{\sqrt{(x-a)^2+(y-b)^2}} = 0.

For a differentiable function, the linear map is exactly the tangent-plane approximation

L(x,y)=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb).L(x,y)=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).

So differentiability means the error between the surface and its tangent plane becomes small faster than the distance to the point.

Practical meaning

At a differentiable point:

In later sections, differentiability will be the condition that makes the chain rule and other multivariable rules work cleanly.


Summary

y=f(x0)(xx0)+f(x0). y = f'(x_0)(x-x_0)+f(x_0). z=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0). z = f(x_0,y_0)+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0).