In this section, we consider the problem of finding the tangent plane to a surface, which is analogous to finding the equation of a tangent line to a curve when the curve is defined by the graph of a function of one variable, \( y=f(x)\). The slope of the tangent line at the point \( x=a\) is given by \( m=f′(a)\); what is the slope of a tangent plane? We learned about the equation of a plane in Equations of Lines and Planes in Space; in this section, we see how it can be applied to the problem at hand.

Tangent Planes

Intuitively, it seems clear that, in a plane, only one line can be tangent to a curve at a point. However, in three-dimensional space, many lines can be tangent to a given point. If these lines lie in the same plane, they determine the tangent plane at that point. A more intuitive way to think of a tangent plane is to assume the surface is smooth at that point (no corners). Then, a tangent line to the surface at that point in any direction does not have any abrupt changes in slope because the direction changes smoothly. Therefore, in a small-enough neighborhood around the point, a tangent plane touches the surface at that point only.

Definition: tangent lines

Let \( P_0=(x_0,y_0,z_0)\) be a point on a surface \( S\), and let \( C\) be any curve passing through \( P_0\) and lying entirely in \( S\). If the tangent lines to all such curves \( C\) at \( P_0\) lie in the same plane, then this plane is called the tangent planeto \( S\) at \( P_0\) (Figure \(\PageIndex{1}\)).

Figure \(\PageIndex{1}\):The tangent plane to a surface \( S\) at a point \( P_0\) contains all the tangent lines to curves in \(S\) that pass through \( P_0\).

For a tangent plane to a surface to exist at a point on that surface, it is sufficient for the function that defines the surface to be differentiable at that point. We define the term tangent plane here and then explore the idea intuitively.

Definition: tangent planes

Let \( S\) be a surface defined by a differentiable function \( z=f(x,y),\) and let \( P_0=(x_0,y_0)\) be a point in the domain of \( f\). Then, the equation of the tangent plane to \( S\) at \( P_0\) is given by

To see why this formula is correct, let’s first find two tangent lines to the surface \( S\). The equation of the tangent line to the curve that is represented by the intersection of \( S\) with the vertical trace given by \( x=x_0\) is \( z=f(x_0,y_0)+f_y(x_0,y_0)(y−y_0)\). Similarly, the equation of the tangent line to the curve that is represented by the intersection of \( S\) with the vertical trace given by \( y=y_0\) is \( z=f(x_0,y_0)+f_x(x_0,y_0)(x−x_0)\). A parallel vector to the first tangent line is \( \vecs a=\,\hat{\mathbf j}+f_y(x_0,y_0)\,\hat{\mathbf k}\); a parallel vector to the second tangent line is \(\vecs b=\hat{\mathbf i}+f_x(x_0,y_0)\,\hat{\mathbf k}\). We can take the cross product of these two vectors:

This vector is perpendicular to both lines and is therefore perpendicular to the tangent plane. We can use this vector as a normal vector to the tangent plane, along with the point \( P_0=(x_0,y_0,f(x_0,y_0))\) in the equation for a plane:

Figure \(\PageIndex{3}\): Graph of a function that does not have a tangent plane at the origin. Dynamic figure powered by CalcPlot3D.

If either \( x=0\) or \( y=0\), then \( f(x,y)=0,\) so the value of the function does not change on either the \(x\)- or \(y\)-axis. Therefore, \( f_x(x,0)=f_y(0,y)=0\), so as either \( x\) or \( y\) approach zero, these partial derivatives stay equal to zero. Substituting them into Equation gives \( z=0\) as the equation of the tangent line. However, if we approach the origin from a different direction, we get a different story. For example, suppose we approach the origin along the line \( y=x\). If we put \( y=x\) into the original function, it becomes

When \( x>0,\) the slope of this curve is equal to \( \sqrt{2}/2\); when \( x<0\), the slope of this curve is equal to \( −(\sqrt{2}/2).\) This presents a problem. In the definition of tangent plane, we presumed that all tangent lines through point \( P\) (in this case, the origin) lay in the same plane. This is clearly not the case here. When we study differentiable functions, we will see that this function is not differentiable at the origin.

Linear Approximations

The diagram for the linear approximation of a function of one variable appears in the following graph.

Figure \(\PageIndex{4}\): Linear approximation of a function in one variable.

The tangent line can be used as an approximation to the function \( f(x)\) for values of \( x\) reasonably close to \( x=a\). When working with a function of two variables, the tangent line is replaced by a tangent plane, but the approximation idea is much the same.

Definition: Linear Approximation

Given a function \( z=f(x,y)\) with continuous partial derivatives that exist at the point \( (x_0,y_0)\), the linear approximation of \(f\) at the point \( (x_0,y_0)\) is given by the equation

Notice that this equation also represents the tangent plane to the surface defined by \( z=f(x,y)\) at the point \( (x_0,y_0)\). The idea behind using a linear approximation is that, if there is a point \( (x_0,y_0)\) at which the precise value of \( f(x,y)\) is known, then for values of \( (x,y)\) reasonably close to \( (x_0,y_0)\), the linear approximation (i.e., tangent plane) yields a value that is also reasonably close to the exact value of \( f(x,y)\) (Figure). Furthermore the plane that is used to find the linear approximation is also the tangent plane to the surface at the point \( (x_0,y_0).\)

Figure \(\PageIndex{5}\): Using a tangent plane for linear approximation at a point.

Example \( \PageIndex{3}\): Using a Tangent Plane Approximation

Given the function \( f(x,y)=\sqrt{41−4x^2−y^2}\), approximate \( f(2.1,2.9)\) using point \( (2,3)\) for \( (x_0,y_0).\) What is the approximate value of \( f(2.1,2.9)\) to four decimal places?

Solution

To apply Equation \ref{approx}, we first must calculate \( f(x_0,y_0), f_x(x_0,y_0),\) and \( f_y(x_0,y_0)\) using \( x_0=2\) and \( y_0=3:\)

Differentiability

When working with a function \( y=f(x)\) of one variable, the function is said to be differentiable at a point \( x=a\) if \( f′(a)\) exists. Furthermore, if a function of one variable is differentiable at a point, the graph is “smooth” at that point (i.e., no corners exist) and a tangent line is well-defined at that point.

The idea behind differentiability of a function of two variables is connected to the idea of smoothness at that point. In this case, a surface is considered to be smooth at point \( P\) if a tangent plane to the surface exists at that point. If a function is differentiable at a point, then a tangent plane to the surface exists at that point. Recall the formula (Equation \ref{tanplane}) for a tangent plane at a point \( (x_0,y_0)\) is given by

\[z=f(x_0,y_0)+f_x(x_0,y_0)(x−x_0)+f_y(x_0,y_0)(y−y_0) \nonumber\]

For a tangent plane to exist at the point \( (x_0,y_0),\) the partial derivatives must therefore exist at that point. However, this is not a sufficient condition for smoothness, as was illustrated in Figure. In that case, the partial derivatives existed at the origin, but the function also had a corner on the graph at the origin.

Definition: differentiable Functions

A function \( f(x,y)\) is differentiable at a point \( P(x_0,y_0)\) if, for all points \( (x,y)\) in a \( δ\) disk around \( P\), we can write

The last term in Equation \ref{diff1} is to as the error term and it represents how closely the tangent plane comes to the surface in a small neighborhood (\( δ\) disk) of point \( P\). For the function \( f\) to be differentiable at \( P\), the function must be smooth—that is, the graph of \( f\) must be close to the tangent plane for points near \( P\).

Example \( \PageIndex{4}\): Demonstrating Differentiability

Show that the function \( f(x,y)=2x^2−4y\) is differentiable at point \( (2,−3).\)

Solution

First, we calculate \( f(x_0,y_0),f_x(x_0,y_0),\) and \( f_y(x_0,y_0)\) using \( x_0=2\) and \( y_0=−3,\) then we use Equation \ref{diff1}:

is not differentiable at the origin (Figure \(\PageIndex{3}\)). We can see this by calculating the partial derivatives. This function appeared earlier in the section, where we showed that \( f_x(0,0)=f_y(0,0)=0\). Substituting this information into Equations \ref{diff1} and \ref{diff2} using \( x_0=0\) and \( y_0=0\), we get

Depending on the path taken toward the origin, this limit takes different values. Therefore, the limit does not exist and the function \( f\) is not differentiable at the origin as shown in the following figure.

Figure \(\PageIndex{6}\): This function \( f(x,y)\) (Equation \ref{oddfunction}) is not differentiable at the origin.

Differentiability and continuity for functions of two or more variables are connected, the same as for functions of one variable. In fact, with some adjustments of notation, the basic theorem is the same.

THEOREM: Differentiability Implies Continuity

Let \( z=f(x,y)\) be a function of two variables with \( (x_0,y_0)\) in the domain of \( f\). If \( f(x,y)\) is differentiable at \( (x_0,y_0)\), then \( f(x,y)\) is continuous at \( (x_0,y_0).\)

Note shows that if a function is differentiable at a point, then it is continuous there. However, if a function is continuous at a point, then it is not necessarily differentiable at that point. For example, the function discussed above (Equation \ref{oddfunction})

is continuous at the origin, but it is not differentiable at the origin. This observation is also similar to the situation in single-variable calculus.

We can further explores the connection between continuity and differentiability at a point. This next theorem says that if the function and its partial derivatives are continuous at a point, the function is differentiable.

Theorem: Continuity of First Partials Implies Differentiability

Let \( z=f(x,y)\) be a function of two variables with \( (x_0,y_0)\) in the domain of \( f\). If \(f(x,y)\), \(f_x(x,y)\), and \(f_y(x,y)\) all exist in a neighborhood of \((x_0,y_0)\) and are continuous at \((x_0,y_0)\), then \(f(x,y)\) is differentiable there.

Recall that earlier we showed that the function in Equation \ref{oddfunction} was not differentiable at the origin. Let’s calculate the partial derivatives \( f_x\) and \( f_y\):

\[ \dfrac{∂f}{∂x}=\dfrac{y^3}{(x^2+y^2)^{3/2}}\]

and

\[\dfrac{∂f}{∂y}=\dfrac{x^3}{(x^2+y^2)^{3/2}}.\]

The contrapositive of the preceding theorem states that if a function is not differentiable, then at least one of the hypotheses must be false. Let’s explore the condition that \( f_x(0,0)\) must be continuous. For this to be true, it must be true that

If \( y>0\), then this expression equals \( 1/(k^2+1)^{3/2}\); if \( y<0\), then it equals \( −(1/(k^2+1)^{3/2})\). In either case, the value depends on \( k\), so the limit fails to exist.

Differentials

In Linear Approximations and Differentials we first studied the concept of differentials. The differential of \( y\), written \( dy\), is defined as \( f′(x)dx\). The differential is used to approximate \( Δy=f(x+Δx)−f(x)\), where \( Δx=dx\). Extending this idea to the linear approximation of a function of two variables at the point \( (x_0,y_0)\) yields the formula for the total differential for a function of two variables.

Definition: Total Differential

Let \( z=f(x,y)\) be a function of two variables with \( (x_0,y_0)\) in the domain of \( f\), and let \( Δx\) and \( Δy\) be chosen so that \( (x_0+Δx,y_0+Δy)\) is also in the domain of \( f\). If \( f\) is differentiable at the point \( (x_0,y_0)\), then the differentials \( dx\) and \( dy\) are defined as

\[dx=Δx\]

and

\[dy=Δy.\]

The differential \( dz\), also called the total differential of \( z=f(x,y)\) at \( (x_0,y_0)\), is defined as

\[dz=f_x(x_0,y_0)dx+f_y(x_0,y_0)dy. \label{total}\]

Notice that the symbol \( ∂\) is not used to denote the total differential; rather, \( d\) appears in front of \( z\). Now, let’s define \( Δz=f(x+Δx,y+Δy)−f(x,y).\) We use \( dz\) to approximate \( Δz\), so

\[Δz≈dz=f_x(x_0,y_0)dx+f_y(x_0,y_0)dy.\]

Therefore, the differential is used to approximate the change in the function \( z=f(x_0,y_0)\) at the point \( (x_0,y_0)\) for given values of \( Δx\) and \( Δy\). Since \( Δz=f(x+Δx,y+Δy)−f(x,y)\), this can be used further to approximate \( f(x+Δx,y+Δy):\)

One such application of this idea is to determine error propagation. For example, if we are manufacturing a gadget and are off by a certain amount in measuring a given quantity, the differential can be used to estimate the error in the total volume of the gadget.

Example \( \PageIndex{5}\): Approximation by Differentials

Find the differential \( dz\) of the function \( f(x,y)=3x^2−2xy+y^2\) and use it to approximate \( Δz\) at point \( (2,−3).\) Use \( Δx=0.1\) and \( Δy=−0.05.\) What is the exact value of \( Δz\)?

Solution

First, we must calculate \( f(x_0,y_0),f_x(x_0,y_0),\) and \( f_y(x_0,y_0)\) using \( x_0=2\) and \( y_0=−3:\)

If a function of three variables is differentiable at a point \( (x_0,y_0,z_0)\), then it is continuous there. Furthermore, continuity of first partial derivatives at that point guarantees differentiability.

Key Concepts

The analog of a tangent line to a curve is a tangent plane to a surface for functions of two variables.

Tangent planes can be used to approximate values of functions near known values.

A function is differentiable at a point if it is ”smooth” at that point (i.e., no corners or discontinuities exist at that point).

The total differential can be used to approximate the change in a function \( z=f(x_0,y_0)\) at the point \( (x_0,y_0)\) for given values of \( Δx\) and \( Δy\).

Glossary

a function \( f(x,y)\) is differentiable at \( (x_0,y_0)\) if \( f(x,y)\) can be expressed in the form \( f(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)+E(x,y),\)

where the error term \( E(x,y)\) satisfies \( \lim_{(x,y)→(x_0,y_0)}\dfrac{E(x,y)}{\sqrt{(x−x_0)^2+(y−y_0)^2}}=0\)

linear approximation

given a function \( f(x,y)\) and a tangent plane to the function at a point \( (x_0,y_0)\), we can approximate \( f(x,y)\) for points near \( (x_0,y_0)\) using the tangent plane formula

tangent plane

given a function \( f(x,y)\) that is differentiable at a point \( (x_0,y_0)\), the equation of the tangent plane to the surface \( z=f(x,y)\) is given by \( z=f(x_0,y_0)+f_x(x_0,y_0)(x−x_0)+f_y(x_0,y_0)(y−y_0)\)

total differential

the total differential of the function \( f(x,y)\) at \( (x_0,y_0)\) is given by the formula \( dz=f_x(x_0,y_0)dx+fy(x_0,y_0)dy\)

Contributors

Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax is licensed with a CC-BY-SA-NC 4.0 license. Download for free at http://cnx.org.

Recommended articles

The LibreTexts libraries are Powered by MindTouch®and are supported by the Department of Education Open Textbook Pilot Project, the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions Program, and Merlot. We also acknowledge previous National Science Foundation support under grant numbers 1246120, 1525057, and 1413739. Unless otherwise noted, LibreTexts content is licensed by CC BY-NC-SA 3.0. Have questions or comments? For more information contact us at info@libretexts.org or check out our status page at https://status.libretexts.org.