Gauss-Bonnet theorem (source code)

= Gauss-Bonnet theorem
{c}
{wiki=Gauss–Bonnet_theorem}

For a compact oriented <Riemannian surface> $D$ with piecewise smooth boundary,
$$
\int_DK\,dA+\int_{\partial D}k_g\,ds+\sum_j\varepsilon_j=2\pi\chi(D).
$$
Here $K$ is <Gaussian curvature>, $dA$ the <area element of a surface>, $k_g$ signed <geodesic curvature>, and $\chi(D)$ the <Euler characteristic>. Traverse each boundary component with the surface on the left. The signed exterior angle at a convex corner of <interior> angle $\alpha_j$ is $\varepsilon_j=\pi-\alpha_j$. Empty boundaries contribute no boundary or corner terms.<Introduction to Differential Geometry by Mark Powell>[Part VI, §§7.1 and 7.4]{ref}

On a <disk> in the <Euclidean plane>, zero <interior> <Gaussian curvature> leaves total boundary turning $2\pi$. On the unit <sphere>, $K=1$ and $\chi=2$, giving <area> $4\pi$. A <geodesic triangle> has no smooth boundary term, giving the <spherical excess formula> or hyperbolic angle defect.

For a closed surface, a local <metric> quantity integrates to a <topological invariant>. A proof triangulates the surface and applies the local turning formula to each triangle. Shared-edge contributions cancel and the angle sums leave $2\pi(V-E+F)$. Thus changing the <Riemannian metric> cannot change total <Gaussian curvature>.<Introduction to Differential Geometry by Mark Powell>[Part VI, §§7.4–7.5]{ref}