A generalization of calculus of variations which draws the relationship between the stationary points of a smooth real-valued function on a manifold and the global topology of the manifold. For example, if a compact manifold admits a function whose only stationary points are a maximum and a minimum, then the manifold is a sphere. Technically speaking, Morse theory applied to a function g on a manifold W with g(M) = 0 and g(M') = 1 shows that every bordism can be realized as a finite sequence of surgeries. Conversely, a sequence of surgeries gives a bordism.