Explicit vs Implicit Surface
Let’s say that you have a surface given by $z=f(x,y)$.
You want to find the tangent plane to that surface at a given point $p_0 = (x_0, y_0, z_0)$. There are two tangent plane equations to choose from.
The explicit equation
Or the implicit equation
$$ 0 = \nabla f \cdot (p - p_0 ) $$ where $p = (x, y, z)$
What’s the difference?
If you have a scalar function $g(x,y,z)$, you can define a couple things from its scalar field
- A level set of a function $g(x,y,z)$ and a constant $C$ is the set of points in space that share the same value $C$. This is given by $g(x,y,z)=C$, where C is a constant. Different constants result in different level sets.
- The equation $g(x,y,z)=C$ represents an isosurface.
Every point on this surface has a value of C. An isosurface is always a level set, but a level set is not necessarily an isosurface. The set of points in a level set may may not form a surface, or the level set may not even be in 3D, ie: $f(x,y)=C$ - The equation $g(x,y,z)=0$ represents an implicit surface, an isosurface with $C=0$
Gradient as normal
The gradient of a function $g(x,y,z)=C$ at a point is equal to its normal.
Quick proof
Let there be a parametric curve $r$ that lies on the surface of g
Apply multivariable chain rule to the implicit surface $\frac{d}{dt}g(r(t))=0$
$$ \frac{\partial g}{\partial x} \frac{dx}{dt} + \frac{\partial g}{\partial y} \frac{dy}{dt} + \frac{\partial g}{\partial z} \frac{dy}{dt} = 0 $$
$$ \nabla g \cdot r^{\prime}= 0 $$
This tells us that the gradient at a point $\nabla g(x_0, y_0,z_0)$ is orthogonal to the tangent vector $r^{\prime}(x_0,y_0,z_0)$ at that point on a curve that lies on the surface, so $n=\nabla g$
Using the gradient
The implicit surface $g(x,y,z) = 0$ represents the same surface as $z=f(x,y)$ by setting
$$ g(x,y,z)=f(x,y)-z $$
Then the normal $n$ is given by $\nabla g(x,y,z)$
The equation of a plane is $(\begin{bmatrix} x \\ y \\ z \end{bmatrix} -\begin{bmatrix} x_0 \\ y_0 \\ z_0 \end{bmatrix})\cdot n = 0$
Expanding it out, we have
Normal from Cross Product
An alternate method of computing the normal is to use the cross product of the partial derivative tangent vectors.
A small change in $x$ by $dx$ in produces a change in $z$ by $\frac{\partial z}{\partial x}dx$.
In this diagram, the tangent vector on the x-z plane is $\vec{a}=(dx,0,\frac{\partial z}{\partial x}dx)$
The tangent vector on the y-z plane is $\vec{b}=(0,dy,\frac{\partial z}{\partial y}dy)$
We can divide out $\mathrm{d}x$ and $\mathrm{d}y$ to get proportional tangent vectors.
$\vec{a} \propto (1,0,z_x)$ and $\vec{b} \propto (0,1,z_y)$. Crossing them gives the normal.
Example
Find the equation of the tangent plane to the surface $z = f(x,y) = 4-x^2 - y^2$ at the point $(1,2)$
The point $p_0$ in 3d is given by
The implicit surface $g$ is given by
The normal $n$ as a function of position is given by
The normal $n_0$ at point $p_0$ is given by
Finally, the equation of the tangnet plane is given by
References
- https://www.khanacademy.org/math/multivariable-calculus/applications-of-multivariable-derivatives
- https://piazza.com/class_profile/get_resource/ielue3w9x1trv/igpjc2b9y2k1f9
- https://tutorial.math.lamar.edu/classes/calciii/DirectionalDeriv.aspx
- https://tutorial.math.lamar.edu/classes/calciii/gradientvectortangentplane.aspx
- https://sites.millersville.edu/bikenaga/calculus3/tangent-planes/tangent-planes.pdf