We develop a theory for the existence of perfect matchings in hypergraphs
under quite general conditions. Informally speaking, the obstructions to
perfect matchings are geometric, and are of two distinct types: 'space
barriers' from convex geometry, and 'divisibility barriers' from arithmetic
lattice-based constructions. To formulate precise results, we introduce the
setting of simplicial complexes with minimum degree sequences, which is a
generalisation of the usual minimum degree condition. We determine the
essentially best possible minimum degree sequence for finding an almost perfect
matching. Furthermore, our main result establishes the stability property:
under the same degree assumption, if there is no perfect matching then there
must be a space or divisibility barrier. This allows the use of the stability
method in proving exact results. Besides recovering previous results, we apply
our theory to the solution of two open problems on hypergraph packings: the
minimum degree threshold for packing tetrahedra in 3-graphs, and Fischer's
conjecture on a multipartite form of the Hajnal-Szemer\'edi Theorem. Here we
prove the exact result for tetrahedra and the asymptotic result for Fischer's
conjecture; since the exact result for the latter is technical we defer it to a
subsequent paper.Comment: Accepted for publication in Memoirs of the American Mathematical
Society. 101 pages. v2: minor changes including some additional diagrams and
passages of expository tex