I hesitated for a long time to ask such an elementary-seeming question on Math Overflow, but when I asked and bountied it on [Math SE](https://math.stackexchange.com/q/2888221/268333), I found that a few experts seem to disagree on the answer, and I didn't get enough responses to indicate a statistically significant consensus.


A cursory online search gives that about half the sources include the requirement of orientability in the Gauss-Bonnet theorem, and half don't. (I listed eight on the "no" side in the SE question; a Google search yields many more on the "yes" side.)


Ted Shifrin claims that



> 
> It is absolutely a necessity, as to define the [global] integral $\iint\_M K dA$ requires an orientation.... (The far abstracted version of Gauss-Bonnet refers to the Euler class of the tangent bundle of an oriented 2n-dimensional Riemannian manifold. Orientability is needed there, too, to define the Pfaffian of the curvature matrix.)
> 
> 
> 


Sunghyuk Park, on the other hand, gives an [answer](https://math.stackexchange.com/a/2914426/268333) claiming that with any non-orientable surface you can consider its orientable double cover, and for that double cover all three terms (the Gaussian curvature surface integral, the boundary geodesic curvature line integral, and the Euler characteristic term) all double, so that the theorem remains true. Ted Shifrin concedes that the theorem might hold for closed non-orientable surfaces, but claims that the boundary line integrals actually cancel out instead of doubling.


So what's the deal? Does the Gauss-Bonnet theorem hold for (a) any compact non-orientable surface, (b) only closed non-orientable surfaces, or (c) no (nontrivial) generic class of non-orientable compact surfaces?



Does the Gauss-Bonnet theorem apply to non-orientable surfaces?
The answer is already given in the comments (by Ryan Budney and Mizar). But I think it makes sense to clear this confusing point. The classical Gauss-Bonnet formula is [e.g. <https://en.wikipedia.org/wiki/Gauss%E2%80%93Bonnet_theorem> ]
$$\int\_M K dA+\int\_{\partial M} k\_g ds=2\pi \chi(M).$$ 
In this formula nothing requires orientation of $M$! $dA$ is the area element, $ds$ is the line element on the boundary, $K$ is the Gauss curvature and $k\_g$ is the geodesic curvature of the boundary. Note that while the sign of the geodesic curvature generally depends on a choice of a normal to the curve, in this particular situation this choice is predetermined (it is the inner normal). There is a way to prove this equality without introducing any orientation, but even if you only have a proof for the oriented case the doubling arguments (mentioned in the comments) trivially extends it to non-orientable surfaces.


The orientability mess comes from not too faithful to the original generalizations of this formula to higher dimensions. If I am not mistaken, the first generalization [The Gauss-Bonnet Theorem for Riemannian Polyhedra Carl B. Allendoerfer and Andre Weil, Transactions of the American Mathematical Society Vol. 53, No. 1 (Jan., 1943), pp. 101-129] does not really presuppose orientability, but it is difficult to spot this as it is almost perfectly obscured by the notation. But the subsequent development follows the lines of Chern [A Simple Intrinsic Proof of the Gauss-Bonnet Formula for Closed Riemannian Manifolds
Shiing-Shen Chern Annals of Mathematics Second Series, Vol. 45, No. 4 (Oct., 1944), pp. 747-752]; in this approach what is integrated is a differential form (rather then a density) which, of course, requires orientation. 


In the Chern method, what is actually computed is not the Euler characteristic of the manifold but the Euler class of its tangent bundle. Which is the same thing except the Euler class only makes sense for orientable vector bundles, hence the restriction. This restriction is convenient but *not necessary* for the Gauss-Bonnet formula (regardless of dimension). 


