The tangent line to the curve \(y=f(x)\) at the point \(\big(x_0,f(x_0)\big)\) is the straight line that fits the curve best at that point. Finding tangent lines was probably one of the first applications of derivatives that you saw. See, for example, Theorem 2.3.2 in the CLP-1 text. The analog of the tangent line one dimension up is the tangent plane. The tangent plane to a surface \(S\) at a point \((x_0,y_0,z_0)\) is the plane that fits \(S\) best at \((x_0,y_0,z_0)\text{.}\) For example, the tangent plane to the hemisphere
\begin{equation*}
S=\Set{(x,y,z)}{x^2+y^2+(z-1)^2=1,\ 0\le z\le 1}
\end{equation*}
at the origin is the \(xy\)-plane, \(z=0\text{.}\)
We are now going to determine, as our first application of partial derivatives, the tangent plane to a general surface \(S\) at a general point \((x_0,y_0,z_0)\) lying on the surface. We will also determine the line which passes through \((x_0,y_0,z_0)\) and whose direction is perpendicular to \(S\) at \((x_0,y_0,z_0)\text{.}\) It is called the normal line to \(S\) at \((x_0,y_0,z_0)\text{.}\)
For example, the following figure shows the side view of the tangent plane (in black) and normal line (in blue) to the surface \(z=x^2+y^2\) (in red) at the point \((0,1,1)\text{.}\)
Recall, from
1.4.1, that to specify any plane, we need
one point on the plane and
a vector perpendicular to the plane, i.e. a normal vector,
and recall, from
1.5.1, that to specify any line, we need
We already have one point that is on both the tangent plane of interest and the normal line of interest — namely \(\big(x_0,y_0,z_0\big)\text{.}\) Furthermore we can use any (nonzero) vector that is perpendicular to \(S\) at \((x_0,y_0,z_0)\) as both the normal vector to the tangent plane and the direction vector of the normal line.
So our main task is to determine a normal vector to the surface \(S\) at \((x_0,y_0,z_0)\text{.}\) That’s what we do now, first for surfaces of the form \(z=f(x,y)\) and then, more generally, for surfaces of the form \(G(x,y,z)=0\text{.}\)
Subsection 2.5.1 Surfaces of the Form \(z=f(x,y)\)
We construct a vector perpendicular to the surface \(z=f(x,y)\) at \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) by, first, constructing two tangent vectors to the specified surface at the specified point, and, second, taking the cross product of those two tangent vectors. Consider the red curve in the figure below. It is the intersection of our surface \(z=f(x,y)\)
with the plane \(y=y_0\text{.}\) Here is a side view of the red curve.
The vector from the point \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{,}\) on the red curve, to the point \(\big(x_0+h\,,\,y_0\,,\,f(x_0+h,y_0)\big)\text{,}\) also on the red curve, is almost tangent to the red curve, if \(h\) is very small. As \(h\) tends to \(0\text{,}\) that vector, which is
\begin{equation*}
\llt h\,,\, 0\,,\, f(x_0+h,y_0)-f(x_0,y_0) \rgt
\end{equation*}
becomes exactly tangent to the curve. However its length also tends to \(0\text{.}\) If we divide by \(h\text{,}\) and then take the limit \(h\rightarrow 0\text{,}\) we get
\begin{align*}
\lim_{h\rightarrow 0}\frac{1}{h}
\llt h\,,\, 0\,,\, f(x_0+h,y_0)-f(x_0,y_0) \rgt
&=\lim_{h\rightarrow 0}
\llt 1\,,\, 0\,,\, \frac{f(x_0+h,y_0)-f(x_0,y_0)}{h} \rgt
\end{align*}
Since the limit \(\lim_{h\rightarrow 0} \frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\) is the definition of the partial derivative \(f_x(x_0,y_0)\text{,}\) we get that
\begin{align*}
\lim_{h\rightarrow 0}\frac{1}{h}
\llt h\,,\, 0\,,\, f(x_0+h,y_0)-f(x_0,y_0) \rgt
&=\llt 1\,,\, 0\,,\, f_x(x_0,y_0)\rgt
\end{align*}
is a nonzero vector that is exactly tangent to the red curve and hence is also tangent to our surface \(z=f(x,y)\) at the point \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{.}\)
For the second tangent vector, we repeat the process with the blue curve in the figure at the beginning of this subsection. That blue curve is the intersection of our surface \(z=f(x,y)\) with the plane \(x=x_0\text{.}\) Here is a front view of the blue curve.
When \(h\) is very small, the vector
\begin{equation*}
\frac{1}{h} \llt 0\,,\, h\,,\, f(x_0,y_0+h)-f(x_0,y_0) \rgt
\end{equation*}
from the point \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{,}\) on the blue curve, to \(\big(x_0\,,\,y_0+h\,,\,f(x_0,y_0+h)\big)\text{,}\) also on the blue curve, (and lengthened by a factor \(\frac{1}{h}\)) is almost tangent to the blue curve. Taking the limit \(h\rightarrow0\) gives the tangent vector
\begin{align*}
\lim_{h\rightarrow 0}\frac{1}{h}
\llt 0\,,\, h\,,\, f(x_0,y_0+h)-f(x_0,y_0) \rgt
&=\lim_{h\rightarrow 0}
\llt 0\,,\, 1\,,\, \frac{f(x_0,y_0+h)-f(x_0,y_0)}{h} \rgt\\
&=\llt 0\,,\, 1\,,\, f_y(x_0,y_0)\rgt
\end{align*}
to the blue curve at the point \(\big(a\,,\,b\,,\,f(a,b)\big)\text{.}\)
Now that we have two vectors in the tangent plane to the surface \(z=f(x,y)\) at \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{,}\) we can find a normal vector to the tangent plane by taking their cross product. Their cross product is
\begin{align*}
\llt 1\,,\, 0\,,\, f_x(x_0,y_0)\rgt\times\llt 0\,,\, 1\,,\, f_y(x_0,y_0)\rgt
&=\det\left[\begin{matrix}\hi& \hj &\hk \\
1 & 0 & f_x(x_0,y_0) \\
0 & 1 & f_y(x_0,y_0)\end{matrix}\right]\\
&=-f_x(x_0,y_0)\,\hi - f_y(x_0,y_0)\,\hj +\hk
\end{align*}
and we have that the vector
\begin{equation*}
-f_x(x_0,y_0)\,\hi - f_y(x_0,y_0)\,\hj +\hk
\end{equation*}
is perpendicular to the surface \(z=f(x,y)\) at \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{.}\)
The tangent plane to the surface \(z=f(x,y)\) at \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) is the plane through \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) with normal vector \(-f_x(x_0,y_0)\,\hi - f_y(x_0,y_0)\,\hj +\hk\text{.}\) This plane has equation
\begin{equation*}
-f_x(x_0,y_0)\,(x-x_0) - f_y(x_0,y_0)\,(y-y_0) +\big(z-f(x_0,y_0)\big) =0
\end{equation*}
or, after a little rearrangement,
\begin{equation*}
z = f(x_0,y_0) + f_x(x_0,y_0)\,(x-x_0) + f_y(x_0,y_0)\,(y-y_0)
\end{equation*}
Now that we have the normal vector, finding the equation of the normal line to the surface \(z=f(x,y)\) at the point \(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) is straightforward. Writing it in parametric form,
\begin{equation*}
\llt x,y,z \rgt = \llt x_0,y_0,f(x_0,y_0) \rgt
+t\llt -f_x(x_0,y_0)\,,\, - f_y(x_0,y_0)\,,\, 1 \rgt
\end{equation*}
By way of summary
Theorem 2.5.1. Tangent Plane and Normal Line.
The vector
\begin{equation*}
-f_x(x_0,y_0)\,\hi - f_y(x_0,y_0)\,\hj +\hk
\end{equation*}
is normal to the surface
\(z=f(x,y)\) at
\(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\text{.}\)
The equation of the tangent plane to the surface
\(z=f(x,y)\) at the point
\(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) may be written as
\begin{equation*}
z = f(x_0,y_0) + f_x(x_0,y_0)\,(x-x_0) + f_y(x_0,y_0)\,(y-y_0)
\end{equation*}
The parametric equation of the normal line to the surface
\(z=f(x,y)\) at the point
\(\big(x_0\,,\,y_0\,,\,f(x_0,y_0)\big)\) is
\begin{equation*}
\llt x,y,z \rgt = \llt x_0,y_0,f(x_0,y_0) \rgt
+t\llt -f_x(x_0,y_0)\,,\, - f_y(x_0,y_0)\,,\, 1 \rgt
\end{equation*}
or, writing it component by component,
\begin{align*}
x&= x_0 - t\,f_x(x_0,y_0) \qquad
y= y_0 - t\,f_y(x_0,y_0) \qquad
z= f(x_0,y_0) + t
\end{align*}
Example 2.5.2.
As a warm-up example, we’ll find the tangent plane and normal line to the surface
\(z=x^2+y^2\) at the point
\((1,0,1)\text{.}\) To do so, we just apply Theorem
2.5.1 with
\(x_0=1\text{,}\) \(y_0=0\) and
\begin{align*}
f(x,y)&= x^2+y^2 & f(1,0)&=1\\
f_x(x,y)&=2x & f_x(1,0)&=2\\
f_y(x,y)&=2y & f_y(1,0)&=0
\end{align*}
So the tangent plane is
\begin{align*}
z&=f(x_0,y_0) + f_x(x_0,y_0)\,(x-x_0) + f_y(x_0,y_0)\,(y-y_0)\\
& = 1 +2(x-1) +0(y-0)\\
&= -1+2x
\end{align*}
and the normal line is
\begin{align*}
\llt x,y,z \rgt &= \llt x_0,y_0,f(x_0,y_0) \rgt
+t\llt -f_x(x_0,y_0)\,,\, - f_y(x_0,y_0)\,,\, 1 \rgt\\
&= \llt 1,0,1 \rgt
+t\llt -2\,,\, 0\,,\, 1 \rgt\\
&= \llt 1-2t\,,\,0\,,\,1+t \rgt
\end{align*}
That was pretty simple — find the partial derivatives and substitute in the coordinates. Let’s do something a bit more challenging.
Example 2.5.3. Optional.
Find the distance from \((0,3,0)\) to the surface \(z=x^2+y^2\text{.}\)
Solution.
Write \(f(x,y)=x^2+y^2\text{.}\) Let’s denote by \(\big(a,b,f(a,b)\big)\) the point on \(z=f(x,y)\) that is nearest \((0,3,0)\text{.}\) Before we really get into the problem, let’s make a simple sketch and think about what the lines from \((0,3,0)\) to the surface look like and, in particular, the angles between these lines and the surface.
The line from \((0,3,0)\) to \(\big(a,b,f(a,b)\big)\text{,}\) the point on \(z=f(x,y)\) nearest \((0,3,0)\text{,}\) is distinguished from the other lines from \((0,3,0)\) to the surface, by being perpendicular to the surface. We will provide a detailed justification for this claim below.
Let’s first exploit the fact that the vector from
\((0,3,0)\) to
\(\big(a,b,f(a,b)\big)\) must be perpendicular to the surface to determine
\(\big(a,b,f(a,b)\big)\text{,}\) and consequently the distance from
\((0,3,0)\) to the surface. By Theorem
2.5.1.a, with
\(x_0=a\) and
\(y_0=b\text{,}\) the vector
\begin{equation*}
-f_x(a,b)\,\hi - f_y(a,b)\,\hj +\hk
=-2a\,\hi -2b\,\hj +\hk
\tag{$*$}
\end{equation*}
is normal to the surface \(z=f(x,y)\) at \(\big(a,b,f(a,b)\big)\text{.}\) So the vector from \((0,3,0)\) to \(\big(a,b,f(a,b)\big)\text{,}\) namely
\begin{equation*}
a\,\hi + (b-3)\,\hj + f(a,b)\,\hk
=a\,\hi + (b-3)\,\hj + (a^2+b^2)\,\hk
\tag{$**$}
\end{equation*}
must be parallel to \((*)\text{.}\) This does not force the vector \((*)\) to equal \((**)\text{,}\) but it does force the existence of some number \(t\) obeying
\begin{equation*}
a\,\hi + (b-3)\,\hj + (a^2+b^2)\,\hk
=t\big(-2a\,\hi -2b\,\hj +\hk\big)
\end{equation*}
or equivalently
\begin{equation*}
\left\{\begin{aligned}
a&=-2a\,t\\
b-3 &= -2b\,t\\
a^2+b^2 &= t
\end{aligned}\right.
\end{equation*}
We now have a system of three equations in the three unknowns \(a\text{,}\) \(b\) and \(t\text{.}\) If we can solve them, we will have found the point on the surface that we want.
The first equation is \(a(1+2t)=0\) so that either \(a=0\) or \(t=-\frac{1}{2}\text{.}\)
The third equation forces \(t\ge 0\text{,}\) so \(a=0\text{,}\) and the last equation reduces to \(t=b^2\text{.}\)
Substituting this into the middle equation gives
\begin{equation*}
b-3=-2b^3\qquad\text{or equivalently}\qquad
2b^3+b-3 = 0
\end{equation*}
In general, cubic equations are very hard to solve. But, in this case, we can guess one solution, namely \(b=1\text{.}\) So \((b-1)\) must be a factor of \(2b^3+b-3\) and a little division then gives us
\begin{equation*}
0=2b^3+b-3
=(b-1)(2b^2 +2b +3)
\end{equation*}
We can now find the roots of the quadratic factor by using the high school formula
\begin{equation*}
\frac{-2\pm\sqrt{2^2-4(2)(3)}}{4}
\end{equation*}
Since \(2^2-4(2)(3) \lt 0\text{,}\) the factor \(2b^2 +2b +3\) has no real roots. So the only real solution to the cubic equation \(2b^3+b-3 = 0\) is \(b=1\text{.}\)
In summary,
\(a=0\text{,}\) \(b=1\) and
the point on \(z=x^2+y^2\) nearest \((0,3,0)\) is \((0,1,1)\) and
the distance from \((0,3,0)\) to \(z=x^2+y^2\) is the distance from \((0,3,0)\) to \((0,1,1)\text{,}\) which is \(\sqrt{(-2)^2+1^2}=\sqrt{5}\text{.}\)
Finally back to the claim that, because \(\big(a,b,f(a,b)\big)\) is the point on \(z=f(x,y)\) that is nearest \((0,3,0)\text{,}\) the vector from \((0,3,0)\) to \(\big(a,b,f(a,b)\big)\) must be perpendicular to the surface \(z=f(x,y)\) at \(\big(a,b,f(a,b)\big)\text{.}\) Note that the square of the distance from \((0,3,0)\) to a general point \(\big(x,y,f(x,y)\big)\) on \(z=f(x,y)\) is
\begin{equation*}
D(x,y) = x^2 + (y-3)^2 +f(x,y)^2
\end{equation*}
If \(x=a\text{,}\) \(y=b\) minimizes \(D(x,y)\) then, in particular,
restricting our attention to the slice
\(y=b\) of the surface,
\(x=a\) minimizes
\(g(x) = D(x,b) =x^2 + (b-3)^2 +f(x,b)^2\) so that
\begin{align*}
0 &= g'(a) =\pdiff{}{x}\Big[x^2 + (b-3)^2 +f(x,b)^2\Big]\bigg|_{x=a}\\
&=2a +2 f(a,b)\ f_x(a,b)\\
&=2 \llt a\,,\,b-3\,,\, f(a,b)\rgt\cdot\llt 1\,,\,0\,,\, f_x(a,b)\rgt
\end{align*}
and
restricting our attention to the slice
\(x=a\) of the surface,
\(y=b\) minimizes
\(h(y) = D(a,y) =a^2 + (y-3)^2 +f(a,y)^2\) so that
\begin{align*}
0 &= h'(b) =\pdiff{}{y}\Big[a^2 + (y-3)^2 +f(a,y)^2\Big]\bigg|_{y=b}\\
&=2 (b-3) +2 f(a,b)\ f_y(a,b)\\
&=2 \llt a\,,\,b-3\,,\, f(a,b)\rgt\cdot\llt 0\,,\,1\,,\, f_y(a,b)\rgt
\end{align*}
We have expressed the final right hand sides of both of the above bullets as the dot product of the vector \(\llt a\,,\,b-3\,,\, f(a,b)\rgt\) with something because
\(\llt a\,,\,b-3\,,\, f(a,b)\rgt\) is the vector from \((0,3,0)\) to the point \((a\,,\,b\,,\, f(a,b)\big)\) on the surface and
the vanishing of the dot product of two vectors implies that the two vectors are perpendicular.
Thus, that
\begin{align*}
\llt a\,,\,b-3\,,\, f(a,b)\rgt\cdot\llt 1\,,\,0\,,\, f_x(a,b)\rgt
&=\llt a\,,\,b-3\,,\, f(a,b)\rgt\cdot\llt 0\,,\,1\,,\, f_y(a,b)\rgt\\
&=0
\end{align*}
tells us that the vector \(\llt a\,,\,b-3\,,\, f(a,b)\rgt\) from \((0,3,0)\) to \(\big(a,b,f(a,b)\big)\) is perpendicular to both \(\llt 1\,,\,0\,,\, f_x(a,b)\rgt\) and \(\llt 0\,,\,1\,,\, f_y(a,b)\rgt\) and hence is parallel to their cross product \(\llt 1\,,\, 0\,,\, f_x(a,b)\rgt\times\llt 0\,,\, 1\,,\, f_y(a,b)\rgt\text{,}\) which we already know is a normal vector to the surface \(z=f(x,y)\) at \(\big(a,b,f(a,b)\big)\text{.}\)
This shows that the point on the surface that minimises the distance to \((0,3,0)\) is joined to \((0,3,0)\) by a line that is parallel to the normal vector — just as we required.
Subsection 2.5.2 Surfaces of the Form \(G(x,y,z)=0\)
We now use a little trickery to construct a vector perpendicular to the surface \(G(x,y,z)=0\) at the point \(\big(x_0\,,\,y_0\,,\,z_0\big)\text{.}\) Imagine that you are walking on the surface and that at time \(0\) you are at the point \(\big(x_0\,,\,y_0\,,\,z_0\big)\text{.}\) Let \(\vr(t)
=\big(x(t)\,,\,y(t)\,,\,z(t)\big)\) denote your position at time \(t\text{.}\)
Because you are walking along the surface, we know that \(\vr(t)\) always lies on the surface and so
\begin{equation*}
G\big( x(t)\,,\,y(t)\,,\,z(t)\big)=0
\end{equation*}
for all \(t\text{.}\) Differentiating this equation with respect to \(t\) gives, by the chain rule,
\begin{align*}
\pdiff{G}{x}\big( x(t)\,,\,y(t)\,,\,z(t)\big)\ x'(t)
&+\pdiff{G}{y}\big( x(t)\,,\,y(t)\,,\,z(t)\big)\ y'(t)\\
&+\pdiff{G}{z}\big( x(t)\,,\,y(t)\,,\,z(t)\big)\ z'(t) = 0
\end{align*}
Then setting \(t=0\) gives
\begin{equation*}
\pdiff{G}{x}\big( x_0\,,\,y_0\,,\,z_0\big)\ x'(0)
+\pdiff{G}{y}\big( x_0\,,\,y_0\,,\,z_0\big)\ y'(0)
+\pdiff{G}{z}\big( x_0\,,\,y_0\,,\,z_0\big)\ z'(0) = 0
\end{equation*}
Expressing this as a dot product allows us to turn this into a statement about vectors.
\begin{equation*}
\llt \pdiff{G}{x}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{y}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{z}\big( x_0\,,\,y_0\,,\,z_0\big)\rgt \cdot \vr'(0) = 0
\tag{$*$}
\end{equation*}
The first vector in this dot product is sufficiently important that it is given its own name.
Definition 2.5.4. Gradient.
The gradient of the function \(G(x,y,z)\) at the point \(\big( x_0\,,\,y_0\,,\,z_0\big)\) is
\begin{equation*}
\llt \pdiff{G}{x}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{y}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{z}\big( x_0\,,\,y_0\,,\,z_0\big)\rgt
\end{equation*}
It is denoted \(\vnabla G(x_0,y_0,z_0)\text{.}\)
So \((*)\) tells us that the gradient \(\vnabla G(x_0,y_0,z_0)\text{,}\) is perpendicular to the vector \(\vr'(0)\text{.}\)
Now if \(t\) is very close to zero, the vector \(\vr(t)-\vr(0)\text{,}\) from \(\vr(0)\) to \(\vr(t)\text{,}\) is almost tangent to the path that we are walking on. The limit
\begin{equation*}
\vr'(0)=\lim_{t\rightarrow 0}\frac{\vr(t)-\vr(0)}{t}
\end{equation*}
is thus exactly tangent to our path, and consequently to the surface \(G(x,y,z)=0\) at \((x_0,y_0,z_0)\text{.}\) This is true for all paths on the surface that pass through \((x_0,y_0,z_0)\) at time \(t=0\text{,}\) which tells us that \(\vnabla G(x_0,y_0,z_0)\) is perpendicular to the surface at \((x_0,y_0,z_0)\text{.}\) We have just found a normal vector!
The above argument goes through unchanged for surfaces of the form \(G(x,y,z)=K\text{,}\) for any constant \(K\text{.}\) So we have
Theorem 2.5.5. Tangent Plane and Normal Line.
Let \(K\) be a constant and \((x_0,y_0,z_0)\) be a point on the surface \(G(x,y,z)=K\text{.}\) Assume that the gradient
\begin{equation*}
\vnabla G(x_0,y_0,z_0)
= \llt \pdiff{G}{x}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{y}\big( x_0\,,\,y_0\,,\,z_0\big)\,,\,
\pdiff{G}{z}\big( x_0\,,\,y_0\,,\,z_0\big)\rgt
\end{equation*}
of \(G\) at \((x_0,y_0,z_0)\) is nonzero.
The vector \(\vnabla G(x_0,y_0,z_0)\) is normal to the surface \(G(x,y,z)=K\) at \((x_0,y_0,z_0)\text{.}\)
The equation of the tangent plane to the surface
\(G(x,y,z)=K\) at
\((x_0,y_0,z_0)\) is
\begin{equation*}
\vnabla G(x_0,y_0,z_0)\cdot\llt x-x_0\,,\,y-y_0\,,\,z-z_0\rgt =0
\end{equation*}
The parametric equation of the normal line to the surface
\(G(x,y,z)=K\) at
\((x_0,y_0,z_0)\) is
\begin{equation*}
\llt x,y,z \rgt = \llt x_0,y_0,z_0 \rgt
+t\,\vnabla G(x_0,y_0,z_0)
\end{equation*}
Here are a couple of routine examples.
Example 2.5.7.
Find the tangent plane and the normal line to the surface
\begin{equation*}
z= x^2+5xy-2y^2
\end{equation*}
at the point \((1,2,3)\text{.}\)
Solution.
As a preliminary check, note that
\begin{equation*}
1^2+5\times 1\times 2-2(2)^2=3
\end{equation*}
which verifies that the point \((1,2,3)\) is indeed on the surface. This is a good reality check and also increases our confidence that the question is asking what we think that it is asking. Rewrite the equation of the surface as \(G(x,y,z)=x^2+5xy-2y^2-z=0\text{.}\) Then the gradient
\begin{gather*}
\vnabla G(x,y,z) = (2x+5y)\,\hi +(5x-4y)\,\hj-\hk
\end{gather*}
so that, by Theorem
2.5.5,
\begin{equation*}
\vn = \vnabla G(1,2,3) = 12\,\hi -3\,\hj-\hk
\end{equation*}
is a normal vector to the surface at \((1,2,3)\text{.}\) Equipped with the normal, it is easy to work out an equation for the tangent plane.
\begin{equation*}
\vn\cdot\llt x-1\,,\,y-2\,,\,z-3 \rgt
=\llt 12\,,\,-3\,,\, -1\rgt\cdot\llt x-1\,,\,y-2\,,\,z-3 \rgt
=0
\end{equation*}
or
\begin{equation*}
12x -3y -z = 3
\end{equation*}
We can quickly check that the point \((1,2,3)\) does indeed lie on the plane:
\begin{equation*}
12\times 1 -3\times 2 -3 = 3
\end{equation*}
The normal line is
\begin{equation*}
\llt x-1\,,\,y-2\,,\,z-3 \rgt
=t\,\vn = t\llt 12\,,\,-3\,,\, -1\rgt
\end{equation*}
or
\begin{equation*}
\frac{x-1}{12} = \frac{y-2}{-3} = \frac{z-3}{-1}\quad
{\color{gray}{\Big(=t\Big)}}
\end{equation*}
Another warm-up example. This time the surface is a hyperboloid of one sheet.
Example 2.5.8.
Find the tangent plane and the normal line to the surface
\begin{equation*}
x^2+y^2-z^2 = 4
\end{equation*}
at the point \((2,-3,3)\text{.}\)
Solution.
As a preliminary check, note that the point \((2,-3,3)\) is indeed on the surface:
\begin{equation*}
2^2+(-3)^2-(3)^2=4
\end{equation*}
The equation of the surface is \(G(x,y,z)=x^2+y^2-z^2=4\text{.}\) Then the gradient of \(G\) is
\begin{gather*}
\vnabla G(x,y,z) = 2x\,\hi +2y\,\hj-2z\,\hk
\end{gather*}
so that, at \((2,-3,3)\text{,}\)
\begin{equation*}
\vnabla G(2,-3,3) = 4\,\hi -6\,\hj-6\,\hk
\end{equation*}
and so, by Theorem
2.5.5,
\begin{equation*}
\vn = \frac{1}{2}\big(4\,\hi -6\,\hj-6\,\hk\big)=2\,\hi-3\,\hj-3\,\hk
\end{equation*}
is a normal vector to the surface at \((2,-3,3)\text{.}\) The tangent plane is
\begin{equation*}
\vn\cdot\llt x-2\,,\,y+3\,,\,z-3 \rgt
=\llt 2\,,\,-3\,,\, -3\rgt\cdot\llt x-2\,,\,y+3\,,\,z-3 \rgt
=0
\end{equation*}
or
\begin{equation*}
2x -3y -3z = 4
\end{equation*}
Again, as a check, we can verify that our point \((2,-3,3)\) is indeed on the plane:
\begin{equation*}
2\times 2 - 3\times(-3) -3\times 3 = 4
\end{equation*}
The normal line is
\begin{equation*}
\llt x-2\,,\,y+3\,,\,z-3 \rgt
=t\,\vn = t\llt 2\,,\,-3\,,\, -3\rgt
\end{equation*}
or
\begin{equation*}
\frac{x-2}{2} = \frac{y+3}{-3} = \frac{z-3}{-3}\quad
{\color{gray}{\Big(=t\Big)}}
\end{equation*}
Now we’ll move on to some more involved examples.
Example 2.5.10.
Suppose that we wish to find the highest and lowest points on the surface \(G(x,y,z) = x^2-2x +y^2-4y + z^2-6z = 2\text{.}\) That is, we wish to find the points on the surface with the maximum value of \(z\) and with the minimum value of \(z\text{.}\)
Completing three squares,
\begin{align*}
G(x,y,z) &= x^2-2x +y^2-4y + z^2-6z\\
&=(x-1)^2 +(y-2)^2 +(z-3)^2 - 14.
\end{align*}
So the surface \(G(x,y,z)=2\) is a sphere, whose highest point is the north pole and whose lowest point is the south pole. But let’s pretend that \(G(x,y,z)=2\) is some complicated surface that we can’t easily picture.
We’ll find its highest and lowest points by exploiting the fact that the tangent plane to \(G=2\) is horizontal at the highest and lowest points. Equivalently, the normal vector to \(G=2\) is vertical at the highest and lowest points. To see that this is the case, look at the figure below. If the tangent plane at \((x_0,y_0,z_0)\) is not horizontal, then the tangent plane contains points near \((x_0,y_0,z_0)\) with \(z\) bigger than \(z_0\) and points near \((x_0,y_0,z_0)\) with \(z\) smaller than \(z_0\text{.}\) Near \((x_0,y_0,z_0)\text{,}\) the tangent plane is a good approximation to the surface. So the surface also contains such points.
The gradient is
\begin{equation*}
\vnabla G(x,y,z) = (2x-2)\,\hi + (2y-4)\,\hj + (2z-6)\,\hk
\end{equation*}
It is vertical when the \(\hi\) and \(\hj\) components are both zero. This happens when \(2x-2=0\) and \(2y-4=0\text{,}\) i.e. when \(x=1\) and \(y=2\text{.}\) So the normal vector to the surface \(G=2\) at the point \((x,y,z)\) is vertical when \(x=1\text{,}\) \(y=2\) and (don’t forget that \((x,y,z)\) has to be on \(G=2\))
\begin{align*}
&G(1,2,z) = 1^2-2\times 1 +2^2-4\times 2 + z^2-6z = 2\\
\iff & z^2-6z-7=0\\
\iff & (z-7)(z+1)=0\\
\iff & z=7,\ -1
\end{align*}
The highest point is \((1,2,7)\) and the lowest point is \((1,2,-1)\text{,}\) as expected.
We could have short-cut the last example by using that the surface was a sphere. Here is an example in the same spirit for which we don’t have an easy short-cut.
Example 2.5.11.
In the last example, we found the points on a specified surface having the largest and smallest values of \(z\text{.}\) We’ll now ramp up the level of difficulty a bit and find the points on the surface \(x^2+ 2y^2 +3z^2 = 72\) that have the largest and smallest values of \(x+y+3z\text{.}\)
To develop a strategy for tackling this problem, consider the following sketch.
The red ellipse in the sketch is intended to represent (schematically) our surface
\begin{equation*}
x^2+ 2y^2 +3z^2 = 72
\end{equation*}
which is an ellipsoid. The middle diagonal (black) line is intended to represent (schematically) the plane \(x+y+3z=C\) for some more or less randomly chosen value of the constant C. At each point on that plane, the function, \(x+y+3z\text{,}\) (that we are trying to maximize and minimize) takes the value \(C\text{.}\) In particular, for the \(C\) chosen in the figure, \(x+y+3z=C\) does intersect our surface, indicating that \(x+y+3z\) does indeed take the value \(C\) somewhere on our surface.
To maximize \(x+y+3z\text{,}\) imagine slowly increasing the value of \(C\text{.}\) As we do so, the plane \(x+y+3z=C\) moves to the right. We want to stop increasing \(C\) at the biggest value of \(C\) for which the plane \(x+y+3z=C\) intersects our surface \(x^2+ 2y^2 +3z^2 = 72\text{.}\) For that value of \(C\) the plane \(x+y+3z=C\text{,}\) which is represented by the right hand blue line in the sketch, is tangent to our surface.
Similarly, to minimize
\(x+y+3z\text{,}\) imagine slowly decreasing the value of
\(C\text{.}\) As we do so, the plane
\(x+y+3z=C\) moves to the left. We want to stop decreasing
\(C\) at the smallest value of
\(C\) for which the plane
\(x+y+3z=C\) intersects our surface
\(x^2+ 2y^2 +3z^2 = 72\text{.}\) For that value of
\(C\) the plane
\(x+y+3z=C\text{,}\) which is represented by the left hand blue line in the sketch, is again tangent to our surface. The previous Example
2.5.10 was similar, except that the plane was
\(z=C\text{.}\)
We are now ready to compute. We need to find the points \((a,b,c)\) (in the sketch, they are the black dot points of tangency) for which
\((a,b,c)\) is on the surface and
the normal vector to the surface \(x^2+ 2y^2 +3z^2 = 72\) at \((a,b,c)\) is parallel to \(\llt 1,1,3\rgt\text{,}\) which is a normal vector to the plane \(x+y+3z=C\)
Since the gradient of \(x^2+ 2y^2 +3z^2\) is \(\llt 2x\,,\,4y\,,\,6z\rgt=2\llt x\,,\,2y\,,\,3z\rgt\text{,}\) these two conditions are, in equations,
\begin{align*}
a^2+ 2b^2 +3c^2 &= 72\\
\llt a\,,\,2b\,,\,3c\rgt &=t \llt 1,1,3\rgt\qquad
\text{for some number } t
\end{align*}
The second equation says that \(a=t\text{,}\) \(b=\frac{t}{2}\) and \(c=t\text{.}\) Substituting this into the first equation gives
\begin{align*}
t^2+ \frac{1}{2}t^2 +3t^2 &= 72
\iff \frac{9}{2}t^2=72
\iff t^2 = 16
\iff t=\pm 4
\end{align*}
So
the point on the surface \(x^2+ 2y^2 +3z^2 = 72\) at which \(x+y+3z\) takes its maximum value is \((a,b,c) = \big(t,\frac{t}{2},t\big)\Big|_{t=4}=(4,2,4)\) and
\(x+y+3z\) takes the value \(4+2+3\times 4 =18\) there.
The point on the surface \(x^2+ 2y^2 +3z^2 = 72\) at which \(x+y+3z\) takes its minimum value is \((a,b,c)
=\big(t,\frac{t}{2},t\big)\Big|_{t=-4}= (-4,-2,-4)\) and
\(x+y+3z\) takes the value \(-4-2+3\times (-4) =-18\) there.
Example 2.5.12.
Find the distance from the point \((1,1,1)\) to the plane \(x+2y+3z=20\text{.}\)
Solution 1.
First note that the point \((1,1,1)\) is not itself on the plane \(x+2y+3z=20\) because
\begin{equation*}
1+2\times 1 +3\times 1 =6\ne 20
\end{equation*}
Denote by \((a,b,c)\) the point on the plane \(x+2y+3z=20\) that is nearest \((1,1,1)\text{.}\) Then the vector from \((1,1,1)\) to \((a,b,c)\text{,}\) namely \(\llt a-1\,,\,b-1\,,\,c-1\rgt\text{,}\) must be perpendicular to the plane. As the gradient of \(x+2y+3z\text{,}\) namely \(\llt 1\,,\,2\,,\,3\rgt\text{,}\) is a normal vector to the plane, \(\llt a-1\,,\,b-1\,,\,c-1\rgt\) must be parallel to \(\llt 1\,,\,2\,,\,3\rgt\text{.}\) So there must be some number \(t\) so that
\begin{gather*}
\llt a-1\,,\,b-1\,,\,c-1\rgt = t \llt 1\,,\,2\,,\,3\rgt
\end{gather*}
or
\begin{gather*}
a = t+1,\ b=2t+1,\ c=3t+1
\end{gather*}
As \((a,b,c)\) must be on the plane, we know that \(a+2b+3c=20\) and so
\begin{gather*}
(t+1) +2(2t+1) +3(3t+1)=20
\implies 14t = 14
\implies t=1
\end{gather*}
The distance from \((1,1,1)\) to the plane \(x+2y+3z=20\) is the length of the vector \(\llt a-1\,,\,b-1\,,\,c-1\rgt = t \llt 1\,,\,2\,,\,3\rgt
= \llt 1\,,\,2\,,\,3\rgt\) which is \(\sqrt{14}\text{.}\)
Solution 2.
Denote by \(P=(a,b,c)\) the point on the plane \(x+2y+3z=20\) that is nearest the point \(Q=(1,1,1)\text{.}\) Pick any other point on the plane and call it \(R\text{.}\) For example \((x,y,z) = (20,0,0)\) obeys \(x+2y+3z=20\) and so \(R=(20,0,0)\) is a point on the plane.
The triangle \(PQR\) is right angled. Denote by \(\theta\) the angle between the hypotenuse \(QR\) and the side \(QP\text{.}\) The distance from \(Q=(1,1,1)\) to the plane is the length of the line segment \(QP\text{,}\) which is
\begin{align*}
\text{distance} &= |QP| = |QR|\cos\theta
\end{align*}
Now, the dot product between the vector from \(Q\) to \(R\text{,}\) which is \(\llt 19,-1,-1\rgt\text{,}\) with the vector \(\llt 1,2,3\rgt\text{,}\) which is normal to the plane and hence parallel to the side \(QP\) is
\begin{align*}
\llt 19,-1,-1\rgt\cdot \llt 1,2,3\rgt &=14\\
&= |\llt 19,-1,-1\rgt|\ |\llt 1,2,3\rgt|\ \cos\theta\\
&= |QR|\ \sqrt{14}\ \cos\theta
\end{align*}
so that, finally,
\begin{gather*}
\text{distance} = |QR|\cos\theta =\frac{14}{\sqrt{14}}=\sqrt{14}
\end{gather*}
Example 2.5.13.
Let \(F(x,y,z)=0\) and \(G(x,y,z)=0\) be two surfaces. These two surfaces intersect along a curve. Find a tangent vector to this curve at the point \((x_0,y_0,z_0)\text{.}\)
Solution.
Call the tangent vector \(\vT\text{.}\) Then \(\vT\) has to be
tangent to the surface \(F(x,y,z)=0\) at \((x_0,y_0,z_0)\) and
tangent to the surface \(G(x,y,z)=0\) at \((x_0,y_0,z_0)\text{.}\)
Consequently \(\vT\) has to be
perpendicular to the vector \(\vnabla F(x_0,y_0,z_0)\text{,}\) which is normal to \(F(x,y,z)=0\) at \((x_0,y_0,z_0)\text{,}\) and at the same time has to be
perpendicular to the vector \(\vnabla G(x_0,y_0,z_0)\text{,}\) which is normal to \(G(x,y,z)=0\) at \((x_0,y_0,z_0)\text{.}\)
Recall that an easy way to construct a vector that is perpendicular to two other vectors is to take their cross product. So we take
\begin{align*}
\vT &= \vnabla F(x_0,y_0,z_0)\times \vnabla G(x_0,y_0,z_0)
=\det\left[\begin{matrix}
\hi & \hj & \hk \\
F_x & F_y & F_z \\
G_x & G_y & G_z \end{matrix}\right]\\
& =\big(F_yG_z-F_z G_y\big)\,\hi + \big(F_zG_x-F_x G_z\big)\,\hj
+\big(F_xG_y-F_y G_x\big)\,\hk
\end{align*}
where all partial derivatives are evaluated at \((x,y,z)=(x_0,y_0,z_0)\text{.}\)
Let’s put Example
2.5.13 into action.
Example 2.5.14.
Consider the curve that is the intersection of the surfaces
\begin{equation*}
x^2+y^2+z^2=5\qquad\text{and}\qquad
x^2+y^2=4z
\end{equation*}
Find a tangent vector to this curve at the point \(\big(\sqrt{3}\,,\,1\,,\,1\big)\text{.}\)
Solution.
As a preliminary check, we verify that the point \(\big(\sqrt{3}\,,\,1\,,\,1\big)\) really is on the curve. To do so, we check that \(\big(\sqrt{3}\,,\,1\,,\,1\big)\) satisfies both equations:
\begin{equation*}
\big(\sqrt{3}\big)^2+1^2+1^2=5\qquad
\big(\sqrt{3}\big)^2+1^2=4\times 1
\end{equation*}
We’ll find the specified tangent vector by using the strategy of Example
2.5.13.
Write \(F(x,y,z) = x^2+y^2+z^2\) and \(G(x,y,z) = x^2+y^2-4z\text{.}\) Then
the vector
\begin{equation*}
\vnabla F(\sqrt{3},1,1)
=\llt 2x\,,\,2y\,,\,2z \rgt\Big|_{(x,y,z)=(\sqrt{3},1,1)}
= 2\llt \sqrt{3}\,,\,1\,,\,1 \rgt
\end{equation*}
is normal to the surface
\(F(x,y,z)=5\) at
\(\big(\sqrt{3}\,,\,1\,,\,1\big)\text{,}\) and
the vector
\begin{equation*}
\vnabla G(\sqrt{3},1,1)
=\llt 2x\,,\,2y\,,\,-4 \rgt\Big|_{(x,y,z)=(\sqrt{3},1,1)}
= 2\llt \sqrt{3}\,,\,1\,,\,-2 \rgt
\end{equation*}
is normal to the surface
\(G(x,y,z)=0\) at
\(\big(\sqrt{3}\,,\,1\,,\,1\big)\text{.}\)
So a tangent vector is
\begin{align*}
&\llt \sqrt{3}\,,\,1\,,\,1 \rgt\times \llt \sqrt{3}\,,\,1\,,\,-2 \rgt
=\det\left[\begin{matrix}
\hi & \hj & \hk \\
\sqrt{3} & 1 & 1 \\
\sqrt{3} & 1 & -2 \end{matrix}\right]\\
&\hskip0.5in =\big(-2-1\big)\,\hi + \big(\sqrt{3}+2\sqrt{3}\big)\,\hj
+\big(\sqrt{3}-\sqrt{3}\big)\,\hk\\
&\hskip0.5in= -3\,\hi + 3\sqrt{3}\,\hj
\end{align*}
There is an easy common factor of \(3\) in both components. So we can create a slightly neater tangent vector by dividing the length of \(-3\,\hi + 3\sqrt{3}\,\hj\) by \(3\text{,}\) giving \(\llt -1\,,\,\sqrt{3}\,,\,0\rgt\text{.}\)
Example 2.5.15. (Optional) computer graphics hidden-surface elimination.
When you look at a solid three dimensional object, you do not see all of the surface of the object — parts of the surface are hidden from your view by other parts of the object. For example, the following sketch shows, schematically, a ray of light leaving your eye and hitting the surface of the object at the light dot. The object is solid, so the light cannot penetrate any further. But, if it could, it would follow the dotted line, hitting the surface of the object three more times. Your eye can see the light dot, but cannot see the other three dark dots.
Recreating this effect in computer generated graphics is called “hidden-surface elimination”. In general, implementing hidden-surface elimination can be quite complicated. Often a technique called “ray tracing” is used. However, it is easy if you know about vectors and gradients, and you are only looking at a single convex body. By definition, a solid is convex if, whenever two points are in the solid, then the line segment joining the two points is also contained in the solid.
So suppose that we are looking at a convex solid, that the equation of the surface of the solid is \(G(x,y,z)=0\text{,}\) and that our eye is at \((x_e,y_e,z_e)\text{.}\)
First consider a light ray that leaves our eye and then just barely nicks the solid at the point \((x,y,z)\text{,}\) as in the figure on the left below. The light ray is a tangent line to the surface at \((x,y,z)\text{.}\) So the direction vector of the light ray, \(\llt x-x_e,y-y_e,z-z_e \rgt\text{,}\) is tangent to the surface at \((x,y,z)\) and consequently is perpendicular to the normal vector, \(\vn=\vnabla G(x,y,z)\text{,}\) of the surface at \((x,y,z)\text{.}\) Thus
\begin{equation*}
\llt x-x_e,y-y_e,z-z_e \rgt\cdot \vnabla G(x,y,z)=0
\end{equation*}
Now consider a light ray that leaves our eye and then passes through the solid, as in the figure on the right above. Call the point at which the light ray first enters the solid \((x,y,z)\) and the point at which the light ray leaves the solid \((x',y,'z')\text{.}\)
Let \(\vv\) be a vector that has the same direction as, i.e. is a positive multiple of, the vector \(\llt x-x_e, y-y_e, z-z_e\rgt\text{.}\)
Let \(\vn\) be an outward pointing normal to the solid at \((x,y,z)\text{.}\) It will be either \(\vnabla G(x,y,z)\) or \(-\vnabla G(x,y,z)\text{.}\)
Let \(\vn'\) be an outward pointing normal to the solid at \((x',y',z')\text{.}\) It will be either \(\vnabla G(x',y',z')\) or \(-\vnabla G(x',y',z')\text{.}\)
Then
at the point \((x,y,z)\) where the ray enters the solid, which is a visible point, the direction vector \(\vv\) points into the solid. The angle \(\theta\) between \(\vv\) and the outward pointing normal \(\vn\) is greater than \(90^\circ\text{,}\) so that the dot product \(\vv\cdot\vn=|\vv|\,|\vn|\,\cos\theta \lt 0\text{.}\) But
at the point \((x',y',z')\) where the ray leaves the solid, which is a hidden point, the direction vector \(\vv\) points out of the solid. The angle \(\theta\) between \(\vv\) and the outward pointing normal \(\vn'\) is less than \(90^\circ\text{,}\) so that the dot product \(\vv\cdot\vn'=|\vv|\,|\vn'|\,\cos\theta\gt 0\text{.}\)
Our conclusion is that, if we are looking in the direction \(\vv\text{,}\) and if the outward pointing normal to the surface of the solid at \((x,y,z)\) is \(\vnabla G(x,y,z)\) then the point \((x,y,z)\) is hidden if and only if \(\vv\cdot\vnabla G(x,y,z)\gt 0\text{.}\)
This method was used by the computer graphics program that created the shaded figures in Examples
1.7.1 and
1.7.2, which are reproduced here.
Tangent planes, in addition to being geometric objects, provide a simple but powerful tool for approximating functions of two variables near a specified point. We saw something very similar in the CLP-1 text where we approximated functions of one variable by their tangent lines. This brings us to our next topic — approximating functions.