Skip to main content
\(\require{cancel}\newcommand{\highlight}[1]{{\color{blue}{#1}}} \newcommand{\apex}{A\kern -1pt \lower -2pt\mbox{P}\kern -4pt \lower .7ex\mbox{E}\kern -1pt X} \newcommand{\colorlinecolor}{blue!95!black!30} \newcommand{\bwlinecolor}{black!30} \newcommand{\thelinecolor}{\colorlinecolor} \newcommand{\colornamesuffix}{} \newcommand{\linestyle}{[thick, \thelinecolor]} \newcommand{\bmx}[1]{\left[\hskip -3pt\begin{array}{#1} } \newcommand{\emx}{\end{array}\hskip -3pt\right]} \newcommand{\ds}{\displaystyle} \newcommand{\fp}{f'} \newcommand{\fpp}{f''} \newcommand{\lz}[2]{\frac{d#1}{d#2}} \newcommand{\lzn}[3]{\frac{d^{#1}#2}{d#3^{#1}}} \newcommand{\lzo}[1]{\frac{d}{d#1}} \newcommand{\lzoo}[2]{{\frac{d}{d#1}}{\left(#2\right)}} \newcommand{\lzon}[2]{\frac{d^{#1}}{d#2^{#1}}} \newcommand{\lzoa}[3]{\left.{\frac{d#1}{d#2}}\right|_{#3}} \newcommand{\plz}[2]{\frac{\partial#1}{\partial#2}} \newcommand{\plzoa}[3]{\left.{\frac{\partial#1}{\partial#2}}\right|_{#3}} \newcommand{\inflim}[1][n]{\lim\limits_{#1 \to \infty}} \newcommand{\infser}[1][1]{\sum_{n=#1}^\infty} \newcommand{\Fp}{F\primeskip'} \newcommand{\Fpp}{F\primeskip''} \newcommand{\yp}{y\primeskip'} \newcommand{\gp}{g\primeskip'} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\ddz}{\Delta z} \newcommand{\thet}{\theta} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\vnorm}[1]{\left\lVert\vec #1\right\rVert} \newcommand{\snorm}[1]{\left|\left|\ #1\ \right|\right|} \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \newcommand{\dotp}[2]{\vec #1 \cdot \vec #2} \newcommand{\proj}[2]{\text{proj}_{\,\vec #2}{\,\vec #1}} \newcommand{\crossp}[2]{\vec #1 \times \vec #2} \newcommand{\veci}{\vec i} \newcommand{\vecj}{\vec j} \newcommand{\veck}{\vec k} \newcommand{\vecu}{\vec u} \newcommand{\vecv}{\vec v} \newcommand{\vecw}{\vec w} \newcommand{\vecx}{\vec x} \newcommand{\vecy}{\vec y} \newcommand{\vrp}{\vec r\, '} \newcommand{\vsp}{\vec s\, '} \newcommand{\vrt}{\vec r(t)} \newcommand{\vst}{\vec s(t)} \newcommand{\vvt}{\vec v(t)} \newcommand{\vat}{\vec a(t)} \newcommand{\px}{\partial x} \newcommand{\py}{\partial y} \newcommand{\pz}{\partial z} \newcommand{\pf}{\partial f} \newcommand{\mathN}{\mathbb{N}} \newcommand{\zerooverzero}{\ds \raisebox{8pt}{\text{``\ }}\frac{0}{0}\raisebox{8pt}{\textit{ ''}}} \newcommand{\deriv}[2]{\myds\frac{d}{dx}\left(#1\right)=#2} \newcommand{\myint}[2]{\myds\int #1\ dx= {\ds #2}} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \newcommand{\primeskip}{\hskip.75pt} \newcommand{\plotlinecolor}{blue} \newcommand{\colorone}{blue} \newcommand{\colortwo}{red} \newcommand{\coloronefill}{blue!15!white} \newcommand{\colortwofill}{red!15!white} \newcommand{\abs}[1]{\left\lvert #1\right\rvert} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section12.7Tangent Lines, Normal Lines, and Tangent Planes

Derivatives and tangent lines go hand–in–hand. Given \(y=f(x)\text{,}\) the line tangent to the graph of \(f\) at \(x=x_0\) is the line through \(\big(x_0,f(x_0)\big)\) with slope \(\fp(x_0)\text{;}\) that is, the slope of the tangent line is the instantaneous rate of change of \(f\) at \(x_0\text{.}\)

When dealing with functions of two variables, the graph is no longer a curve but a surface. At a given point on the surface, it seems there are many lines that fit our intuition of being “tangent” to the surface.

<<SVG image is unavailable, or your browser cannot render it>>

Figure12.7.1Showing various lines tangent to a surface.

In Figures 12.7.1 we see lines that are tangent to curves in space. Since each curve lies on a surface, it makes sense to say that the lines are also tangent to the surface. The next definition formally defines what it means to be “tangent to a surface.”

Definition12.7.2Directional Tangent Line

Let \(z=f(x,y)\) be differentiable on an open set \(S\) containing \((x_0,y_0)\) and let \(\vec u = \la u_1, u_2\ra\) be a unit vector.

  1. The line \(\ell_x\) through \(\big(x_0,y_0,f(x_0,y_0)\big)\) parallel to \(\la 1,0,f_x(x_0,y_0)\ra\) is the tangent line to \(f\) in the direction of \(x\) at \((x_0,y_0)\).

  2. The line \(\ell_y\) through \(\big(x_0,y_0,f(x_0,y_0)\big)\) parallel to \(\la 0,1,f_y(x_0,y_0)\ra\) is the tangent line to \(f\) in the direction of \(y\) at \((x_0,y_0)\).

  3. The line \(\ell_{\vec u}\) through \(\big(x_0,y_0,f(x_0,y_0)\big)\) parallel to \(\la u_1,u_2,D_{\vec u\,}f(x_0,y_0)\ra\) is the tangent line to \(f\) in the direction of \(\vec u\) at \((x_0,y_0)\).

It is instructive to consider each of three directions given in the definition in terms of “slope.” The direction of \(\ell_x\) is \(\la 1,0,f_x(x_0,y_0)\ra\text{;}\) that is, the “run” is one unit in the \(x\)-direction and the “rise” is \(f_x(x_0,y_0)\) units in the \(z\)-direction. Note how the slope is just the partial derivative with respect to \(x\text{.}\) A similar statement can be made for \(\ell_y\text{.}\) The direction of \(\ell_{\vec u}\) is \(\la u_1,u_2,D_{\vec u\,}f(x_0,y_0)\ra\text{;}\) the “run” is one unit in the \(\vec u\) direction (where \(\vec u\) is a unit vector) and the “rise” is the directional derivative of \(z\) in that direction.

Definition 12.7.2 leads to the following parametric equations of directional tangent lines:

[me]
Example12.7.3Finding directional tangent lines

Find the lines tangent to the surface \(z=\sin(x) \cos(y)\) at \((\pi/2,\pi/2)\) in the \(x\) and \(y\) directions and also in the direction of \(\vec v = \la -1,1\ra\text{.}\)

Solution
Example12.7.7Finding directional tangent lines

Let \(f(x,y) = 4xy-x^4-y^4\text{.}\) Find the equations of all directional tangent lines to \(f\) at \((1,1)\text{.}\)

Solution

Subsection12.7.1Normal Lines

When dealing with a function \(y=f(x)\) of one variable, we stated that a line through \((c,f(c))\) was tangent to \(f\) if the line had a slope of \(\fp(c)\) and was normal (or, perpendicular, orthogonal) to \(f\) if it had a slope of \(-1/\fp(c)\text{.}\) We extend the concept of normal, or orthogonal, to functions of two variables.

Let \(z=f(x,y)\) be a differentiable function of two variables. By Definition 12.7.2, at \((x_0,y_0)\text{,}\) \(\ell_x(t)\) is a line parallel to the vector \(\vec d_x=\la 1,0,f_x(x_0,y_0)\ra\) and \(\ell_y(t)\) is a line parallel to \(\vec d_y=\la 0,1,f_y(x_0,y_0)\ra\text{.}\) Since lines in these directions through \(\big(x_0,y_0,f(x_0,y_0)\big)\) are tangent to the surface, a line through this point and orthogonal to these directions would be orthogonal, or normal, to the surface. We can use this direction to create a normal line.

The direction of the normal line is orthogonal to \(\vec d_x\) and \(\vec d_y\text{,}\) hence the direction is parallel to \(\vec d_n = \vec d_x\times \vec d_y\text{.}\) It turns out this cross product has a very simple form: \begin{equation*} \vec d_x\times \vec d_y = \la 1,0,f_x\ra \times \la 0,1,f_y\ra = \la -f_x,-f_y,1\ra. \end{equation*}

It is often more convenient to refer to the opposite of this direction, namely \(\la f_x,f_y,-1\ra\text{.}\) This leads to a definition.

Definition12.7.9Normal Line

Let \(z=f(x,y)\) be differentiable on an open set \(S\) containing \((x_0,y_0)\) where \begin{equation*} a = f_x(x_0,y_0) \text{ and } b=f_y(x_0,y_0) \end{equation*} are defined.

  1. A nonzero vector parallel to \(\vec n=\la a,b,-1\ra\) is orthogonal to \(f\) at \(P=\big(x_0,y_0,f(x_0,y_0)\big)\).

  2. The line \(\ell_n\) through \(P\) with direction parallel to \(\vec n\) is the normal line to \(f\) at \(P\).

Thus the parametric equations of the normal line to a surface \(f\) at \(\big(x_0,y_0,f(x_0,y_0)\big)\) is: \begin{equation*} \ell_{n}(t) = \left\{\begin{array}{l} x= x_0+at\\ y = y_0 + bt \\ z = f(x_0,y_0) - t \end{array} \right.. \end{equation*}

Example12.7.10Finding a normal line

Find the equation of the normal line to \(z=-x^2-y^2+2\) at \((0,1)\text{.}\)

Solution

The direction of the normal line has many uses, one of which is the definition of the tangent plane which we define shortly. Another use is in measuring distances from the surface to a point. Given a point \(Q\) in space, it is general geometric concept to define the distance from \(Q\) to the surface as being the length of the shortest line segment \(\overline{PQ}\) over all points \(P\) on the surface. This, in turn, implies that \(\vv{PQ}\) will be orthogonal to the surface at \(P\text{.}\) Therefore we can measure the distance from \(Q\) to the surface \(f\) by finding a point \(P\) on the surface such that \(\vv{PQ}\) is parallel to the normal line to \(f\) at \(P\text{.}\)

Example12.7.12Finding the distance from a point to a surface

Let \(f(x,y) = 2-x^2-y^2\) and let \(Q = (2,2,2)\text{.}\) Find the distance from \(Q\) to the surface defined by \(f\text{.}\)

Solution

We can take the concept of measuring the distance from a point to a surface to find a point \(Q\) a particular distance from a surface at a given point \(P\) on the surface.

Example12.7.13Finding a point a set distance from a surface

Let \(f(x,y) = x-y^2+3\text{.}\) Let \(P = \big(2,1,f(2,1)\big) = (2,1,4)\text{.}\) Find points \(Q\) in space that are 4 units from the surface of \(f\) at \(P\text{.}\) That is, find \(Q\) such that \(\norm{\vv{PQ}}=4\) and \(\vv{PQ}\) is orthogonal to \(f\) at \(P\text{.}\)

Solution

Subsection12.7.2Tangent Planes

We can use the direction of the normal line to define a plane. With \(a=f_x(x_0,y_0)\text{,}\) \(b=f_y(x_0,y_0)\) and \(P = \big(x_0,y_0,f(x_0,y_0)\big)\text{,}\) the vector \(\vec n=\la a,b,-1\ra\) is orthogonal to \(f\) at \(P\text{.}\) The plane through \(P\) with normal vector \(\vec n\) is therefore tangent to \(f\) at \(P\text{.}\)

Definition12.7.15Tangent Plane

Let \(z=f(x,y)\) be differentiable on an open set \(S\) containing \((x_0,y_0)\text{,}\) where \(a = f_x(x_0,y_0)\text{,}\) \(b=f_y(x_0,y_0)\text{,}\) \(\vec n= \la a,b,-1\ra\) and \(P=\big(x_0,y_0,f(x_0,y_0)\big)\text{.}\)

The plane through \(P\) with normal vector \(\vec n\) is the tangent plane to \(f\) at \(P\). The standard form of this plane is \begin{equation*} a(x-x_0) + b(y-y_0) - \big(z-f(x_0,y_0)\big) = 0. \end{equation*}

Example12.7.16Finding tangent planes

Find the equation of the tangent plane to \(z=-x^2-y^2+2\) at \((0,1)\text{.}\)

Solution
Example12.7.18Using the tangent plane to approximate function values

The point \((3,-1,4)\) lies on the surface of an unknown differentiable function \(f\) where \(f_x(3,-1) = 2\) and \(f_y(3,-1) = -1/2\text{.}\) Find the equation of the tangent plane to \(f\) at \(P\text{,}\) and use this to approximate the value of \(f(2.9,-0.8)\text{.}\)

Solution

Subsection12.7.3The Gradient and Normal Lines, Tangent Planes

The methods developed in this section so far give a straightforward method of finding equations of normal lines and tangent planes for surfaces with explicit equations of the form \(z=f(x,y)\text{.}\) However, they do not handle implicit equations well, such as \(x^2+y^2+z^2=1\text{.}\) There is a technique that allows us to find vectors orthogonal to these surfaces based on the gradient.

Definition12.7.19Gradient

Let \(w=F(x,y,z)\) be differentiable on an open ball \(B\) that contains the point \((x_0,y_0,z_0)\text{.}\)

  1. The gradient of \(F\) is \(\nabla F(x,y,z) = \la f_x(x,y,z),f_y(x,y,z),f_z(x,y,z)\ra\text{.}\)

  2. The gradient of \(F\) at \((x_0,y_0,z_0)\) is \begin{equation*} \nabla F(x_0,y_0,z_0) = \la f_x(x_0,y_0,z_0),f_y(x_0,y_0,z_0),f_z(x_0,y_0,z_0)\ra. \end{equation*}

Recall that when \(z=f(x,y)\text{,}\) the gradient \(\nabla f = \la f_x,f_y\ra\) is orthogonal to level curves of \(f\text{.}\) An analogous statement can be made about the gradient \(\nabla F\text{,}\) where \(w= F(x,y,z)\text{.}\) Given a point \((x_0,y_0,z_0)\text{,}\) let \(c = F(x_0,y_0,z_0)\text{.}\) Then \(F(x,y,z) = c\) is a level surface that contains the point \((x_0,y_0,z_0)\text{.}\) The following theorem states that \(\nabla F(x_0,y_0,z_0)\) is orthogonal to this level surface.

The gradient at a point gives a vector orthogonal to the surface at that point. This direction can be used to find tangent planes and normal lines.

Example12.7.21Using the gradient to find a tangent plane

Find the equation of the plane tangent to the ellipsoid \(\ds \frac{x^2}{12} +\frac{y^2}{6}+\frac{z^2}{4}=1\) at \(P = (1,2,1)\text{.}\)

Solution

Tangent lines and planes to surfaces have many uses, including the study of instantaneous rates of changes and making approximations. Normal lines also have many uses. In this section we focused on using them to measure distances from a surface. Another interesting application is in computer graphics, where the effects of light on a surface are determined using normal vectors.

The next section investigates another use of partial derivatives: determining relative extrema. When dealing with functions of the form \(y=f(x)\text{,}\) we found relative extrema by finding \(x\) where \(\fp(x) = 0\text{.}\) We can start finding relative extrema of \(z=f(x,y)\) by setting \(f_x\) and \(f_y\) to 0, but it turns out that there is more to consider.

Subsection12.7.4Exercises

In the following exercises, a function \(z=f(x,y)\text{,}\) a vector \(\vec v\) and a point \(P\) are given. Give the parametric equations of the following directional tangent lines to \(f\) at \(P\text{:}\)

  1. \(\ell_x(t)\)

  2. \(\ell_y(t)\)

  3. \(\ell_{\vec u\,}(t)\text{,}\) where \(\vec u\) is the unit vector in the direction of \(\vec v\text{.}\)

In the following exercises, a function \(z=f(x,y)\) and a point \(P\) are given. Find the equation of the normal line to \(f\) at \(P\text{.}\) Note: these are the same functions as in Exercises 12.7.4.512.7.4.8.

In the following exercises, a function \(z=f(x,y)\) and a point \(P\) are given. Find the two points that are \(2\) units from the surface \(f\) at \(P\text{.}\) Note: these are the same functions as in Exercises 12.7.4.512.7.4.8.

In the following exercises, a function \(z=f(x,y)\) and a point \(P\) are given. Find an equation of the tangent plane to \(f\) at \(P\text{.}\) Note: these are the same functions as in Exercises 12.7.4.512.7.4.8.

In the following exercises, an implicitly defined function of \(x\text{,}\) \(y\) and \(z\) is given along with a point \(P\) that lies on the surface. Use the gradient \(\nabla F\) to:

  1. find the equation of the normal line to the surface at \(P\text{,}\) and

  2. find the equation of the plane tangent to the surface at \(P\text{.}\)