The Gaussian curvature of a surface at a point measures how the surface bends in two independent directions.
At any point on a smooth surface, there are special orthogonal directions called principal directions. If you
slice the surface by planes containing the surface normal and each principal direction, you get two normal curvature values
\(\kappa_1\) and \(\kappa_2\), called the principal curvatures. The Gaussian curvature is their product:
\[
K=\kappa_1\kappa_2.
\]
The sign of \(K\) gives an immediate geometric classification. If \(K>0\), both principal curvatures have the same sign and
the surface looks “dome-like” (elliptic point). If \(K<0\), the principal curvatures have opposite signs and the surface is
“saddle-like” (hyperbolic point). If \(K=0\), at least one principal curvature is zero, which is typical for developable surfaces.
Classic examples illustrate these cases. A plane has \(\kappa_1=\kappa_2=0\), so \(K=0\) everywhere. A
sphere of radius \(r\) has \(\kappa_1=\kappa_2=\tfrac{1}{r}\), so \(K=\tfrac{1}{r^2}\) everywhere; curvature is
positive and constant. A cylinder of radius \(r\) bends in the circular direction with \(\kappa_1=\tfrac{1}{r}\)
but is straight along its axis with \(\kappa_2=0\), hence \(K=0\). This explains a famous fact: a cylinder can be “unrolled” into a
plane without stretching, consistent with zero Gaussian curvature.
For a graph surface written as \(z=f(x,y)\), Gaussian curvature can be computed directly from partial derivatives:
\[
K=\frac{f_{xx}f_{yy}-f_{xy}^2}{\left(1+f_x^2+f_y^2\right)^2}.
\]
The numerator contains a determinant-like term that detects “saddle behavior” (it becomes negative when mixed bending dominates),
while the denominator normalizes by the local slope. In practice, if an explicit formula is inconvenient, derivatives can be
approximated numerically using central differences with a small step size \(h\). This calculator applies that idea for custom
surfaces \(z=f(x,y)\) and can also estimate \(\kappa_1,\kappa_2\) by computing the mean curvature
\(H=\tfrac{\kappa_1+\kappa_2}{2}\) and using \(\kappa_{1,2}=H\pm\sqrt{H^2-K}\).
One of the most important conceptual points is that Gaussian curvature is an intrinsic measure of curvature.
Gauss’s “Theorema Egregium” states that \(K\) depends only on distances measured along the surface, not on how the surface is embedded
in 3D space. This is why bending a sheet of paper without stretching does not change its \(K\) (it stays near zero), while stretching
or compressing is required to make it sphere-like (\(K>0\)) or saddle-like (\(K<0\)). In physics, intrinsic curvature is the
key ingredient in how geometry connects to gravity: curvature influences how “straightest paths” (geodesics) behave, which is one way
to tease the geometric intuition behind Einstein’s ideas.