If a surface $S$ representing the equation $z=f(x,y)$ is “smooth” near the point $P=\left(x_0,y_0,z_0\right)$, where $z_0=f(x_0,y_0)$, then it will have a tangent plane (see Fig. 1). In this section, we will derive the equation of this plane.
Later in this chapter, we will learn under which conditions the surface is smooth.
We recall that the slope of the curve formed by the intersection of $S$ and the plane $y=y_0$ at $P$ is $f_x(x_0,y_0)$. Let’s call the tangent line to the curve of of $f(x,y_0)$ at the point $P$, $L_1$.
If $f_x(x_0,y_0)\neq 0$, we can rewrite the decription of $L_1$ in the regular format as: The tangent plane to the surface $S$ at the point $P$ is defined to be the plane that contains both lines $L_1$ and $L_2$. Equivalently, we can say the tangent plane contains both direction vectors $\vec{v}_1$ and $\vec{v}_2$. Therefore, the cross product of $\vec{v}_1$ and $\vec{v}_2$ is normal to the tangent plane and to the surface $S$ at the point $P$: Because the equation of a plane passing through $(x_0,y_0,z_0)$ with normal $\vec{n}=(n_1,n_2,n_3)$ is: Read more about the derivation of the equation of the tangent plane
Read less
The equation of $L_1$ is
$$z-z_0=f_x(x_0,y_0)\times(x-x_0)\quad\text{and}\quad y=y_0.$$
$$L_1:\quad\frac{x-x_0}{1}= \frac{z-z_0}{f_x(x_0,y_0)},\quad\text{and}\quad y=y_0.$$
Similarly $L_2$ that is the tangent line to the intersection of $S$ and the plane $x=x_0$ at the point $P$ is described by:
$$L_2:\quad \frac{y-y_0}{1}=\frac{z-z_0}{f_y(x_0,y_0)}\quad\text{and}\quad x=x_0.$$
The direction vectors of the lines $L_1$ and $L_2$ are
\begin{align*}
\vec{v}_1=\left(1,0,f_x(x_0,y_0)\right),\quad \text{and}\quad \vec{v}_2=\left(0,1,f_y(x_0,y_0)\right),
\end{align*}
respectively.
$$\vec{n}=\vec{v}_2\times\vec{v}_1=\begin{vmatrix}
\hat{i} & \hat{j} & \hat{k}\\
0 & 1 & f_y(x_0,y_0)\\
1 & 0 & f_x(x_0,y_0)
\end{vmatrix}=f_x(x_0,y_0)\hat{i}+f_y(x_0,y_0)\hat{j}-\hat{k}$$
$$n_1(x-x_0)+n_2 (y-y_0)+n_3(z-z_0)=0,$$
the equation of the tangent plane reads:
$$f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)-(z-z_0)=0$$
or it can be rewritten as:
$$z=z_0+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)$$
\[z=z_0+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0),\label{TangentPlane-0} \tag{*}\]
where $z_0=f(x_0,y_0)$.
$$z=z_0.$$
\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large \frac{x-x_0}{f_x(x_0,y_0)}=\frac{y-y_0}{f_y(x_0,y_0)}=\frac{z-z_0}{-1}.}\]
If either $f_x(x_0,y_0)=0$ or $f_y(x_0,y_0)=0$, the above equation needs to be modified.