Homology & Cohomology

The Mayer-Vietoris Sequence: Homology by Cutting and Pasting

Cut a space into two overlapping pieces, compute the homology of each piece and of their intersection, and the Mayer-Vietoris sequence hands you the homology of the whole — the topological analogue of inclusion-exclusion. It is the single most-used computational engine in algebraic topology: it is how you actually calculate that the n-sphere Sⁿ has Hₙ ≅ ℤ and nothing in between, without ever building an explicit chain complex for the whole space.

Precisely, for a space X = A ∪ B where the interiors of A and B cover X, there is a long exact sequence ⋯ → Hₙ(A∩B) → Hₙ(A) ⊕ Hₙ(B) → Hₙ(X) → Hₙ₋₁(A∩B) → ⋯ that runs forever in both directions, linking the homology of the pieces to the homology of the union through a connecting map ∂.

  • FieldAlgebraic topology (homology theory)
  • Named afterWalther Mayer (1929) and Leopold Vietoris (1930)
  • Key hypothesisint(A) ∪ int(B) = X (an excisive couple)
  • StatementLong exact sequence ⋯→Hₙ(A∩B)→Hₙ(A)⊕Hₙ(B)→Hₙ(X)→Hₙ₋₁(A∩B)→⋯
  • Proof techniqueShort exact sequence of chain complexes + snake lemma; excision
  • Generalizes toCohomology, generalized (co)homology theories, sheaf cohomology

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The precise statement

Let X be a topological space and let A, B ⊆ X be subspaces whose interiors cover X, i.e. int(A) ∪ int(B) = X. (Such a pair is called an excisive couple.) Then there is a long exact sequence of singular homology groups, natural in the pair, running to infinity in both directions:

  • ⋯ → Hₙ(A∩B) —(i*, j*)→ Hₙ(A) ⊕ Hₙ(B) —(k* − l*)→ Hₙ(X) —∂→ Hₙ₋₁(A∩B) → ⋯

Here i, j are the inclusions of A∩B into A and B, and k, l the inclusions of A and B into X. The map ∂ is the connecting homomorphism, which lowers degree by one. Exactness means the image of each map equals the kernel of the next — so the sequence encodes exactly how homology classes of X are built from, and constrained by, the pieces. There is also a reduced version (using H̃) which is more convenient when A∩B is nonempty, and a relative version. Coefficients may lie in any abelian group.

The picture: inclusion-exclusion for holes

Think of homology as counting holes: H₀ counts connected components, H₁ counts independent loops, Hₙ counts n-dimensional voids. If X = A ∪ B, a hole in X is either a hole already visible inside A, or inside B, or a new hole created by gluing — one that only closes up when you paste the pieces along A∩B.

The sequence is the topologist's inclusion-exclusion. The middle map (a,b) ↦ k*a − l*b says: a class on A and a class on B assemble into a class on X, but they might be counted twice if they already agree on the overlap A∩B — that redundancy is exactly the image of Hₙ(A∩B). Meanwhile the connecting map ∂ detects holes that neither piece sees: a cycle in X that must be cut along A∩B, whose two halves individually fail to be cycles. The circle S¹ = two arcs is the archetype: each arc is contractible, but their two-point overlap has an extra H₀ class that ∂ promotes into the loop H₁(S¹) ≅ ℤ.

The key idea of the proof

The whole theorem is a short exact sequence of chain complexes fed through the snake lemma. Write C•(A) + C•(B) for the subcomplex of C•(X) generated by singular simplices lying entirely in A or entirely in B. There is an obvious short exact sequence of chain complexes:

  • 0 → C•(A∩B) —(i,j)→ C•(A) ⊕ C•(B) —(k−l)→ C•(A) + C•(B) → 0

The left map is injective, the right is surjective, and the composite is zero — pure algebra, exact on the nose. The only topological input is the deep fact that the inclusion C•(A) + C•(B) ↪ C•(X) is a quasi-isomorphism: it induces isomorphisms on homology. This is proved by barycentric subdivision — repeatedly chopping any singular simplex until each piece is small enough to sit inside int(A) or int(B), the same subdivision engine that proves the excision theorem. Precisely here is where the interior-cover hypothesis is consumed. The snake lemma then converts the short exact sequence of complexes into the long exact sequence in homology, and manufactures ∂ automatically.

Worked example: the homology of Sⁿ

Cover the n-sphere by two open sets: A = Sⁿ minus the south pole, B = Sⁿ minus the north pole. Each is homeomorphic to ℝⁿ, hence contractible: H̃*(A) = H̃*(B) = 0. Their intersection A∩B is Sⁿ minus two points, which deformation-retracts onto the equatorial Sⁿ⁻¹. Feeding this into the reduced Mayer-Vietoris sequence, every ⊕-term vanishes, so the sequence breaks into isomorphisms:

  • H̃ₖ(Sⁿ) ≅ H̃ₖ₋₁(Sⁿ⁻¹) for all k, coming from ∂.

This is a dimension-shifting recursion. Starting from the base case H̃*(S⁰) = ℤ in degree 0 (two points), induction gives the celebrated answer: H̃ₖ(Sⁿ) ≅ ℤ if k = n, and 0 otherwise. So Sⁿ has exactly one nontrivial reduced homology group, in the top dimension. From this single computation flow the invariance of dimension (ℝᵐ ≅ ℝⁿ ⟹ m = n), the Brouwer fixed-point theorem, the hairy-ball theorem, and the nontriviality of πₙ(Sⁿ).

Why the hypothesis matters — and what breaks

The condition int(A) ∪ int(B) = X is not decorative. It is exactly what powers barycentric subdivision: only when every point of X lies in an open piece can you guarantee each sufficiently-subdivided simplex lands inside a single piece. Drop it and exactness fails.

Counterexample: let X = S¹, and cut it into two closed arcs A, B meeting at two points, but shrink them so they only touch at those points — i.e. take A, B to be closed semicircles whose interiors (as subspaces) do not cover the two junction points. Then C•(A) + C•(B) is not quasi-isomorphic to C•(X): a singular 1-simplex crossing a junction lives in neither piece and cannot be subdivided into pieces that do. The 'sequence' one writes down is then not exact — the loop class of H₁(S¹) is lost. In practice one always thickens A and B slightly (using homotopy invariance) so their interiors cover, which is why textbooks state Mayer-Vietoris for open covers or CW-pairs. The theorem is the homology partner of the van Kampen theorem for the fundamental group, and the dual Mayer-Vietoris for cohomology reverses all arrows.

Applications and significance

Mayer-Vietoris is the workhorse for every homology computation built by decomposition:

  • Spheres, tori, surfaces: the genus-g surface, connected sums, and lens spaces are all computed by cutting along circles and applying the sequence inductively.
  • Connected sums and surgery: M # N is glued from M and N minus disks along Sⁿ⁻¹; Mayer-Vietoris reads off its homology directly.
  • CW complexes and cellular homology: attaching a cell is a pushout that the sequence tracks, underlying the entire cellular chain complex machinery.
  • Betti numbers and the Euler characteristic: exactness forces χ(A∪B) = χ(A) + χ(B) − χ(A∩B), a topological inclusion-exclusion.

Conceptually it is one instance of a universal pattern: any homology theory that satisfies excision — including generalized theories like K-theory and bordism, and sheaf cohomology via its Čech incarnation — admits a Mayer-Vietoris sequence. It is the algebraic-topological embodiment of the local-to-global principle, the idea that global invariants are assembled from overlapping local data.

The two maps in the sequence, plus how Mayer-Vietoris compares to its sibling tools.
Object / ToolDirection & roleFormula or hypothesis
Map (i*, j*) : Hₙ(A∩B) → Hₙ(A) ⊕ Hₙ(B)Includes the intersection into each piecex ↦ (i*x, j*x), from inclusions i: A∩B ↪ A, j: A∩B ↪ B
Map k* − l* : Hₙ(A) ⊕ Hₙ(B) → Hₙ(X)Glues classes from the pieces, with a sign(a, b) ↦ k*a − l*b, so classes agreeing on A∩B survive
Connecting map ∂ : Hₙ(X) → Hₙ₋₁(A∩B)Drops degree by one; the 'boundary of the overlap'Cut a cycle into an A-part and B-part; ∂ = boundary of either part
Excision theoremThe engine that makes Mayer-Vietoris exactHₙ(X, A) ≅ Hₙ(X∖U, A∖U) when cl(U) ⊂ int(A)
Long exact sequence of a pair (X, A)Sibling: relates absolute and relative homology⋯→Hₙ(A)→Hₙ(X)→Hₙ(X,A)→Hₙ₋₁(A)→⋯

Frequently asked questions

What is the exact hypothesis needed for Mayer-Vietoris?

You need X = A ∪ B with int(A) ∪ int(B) = X — the interiors, not just the sets, must cover. This makes (A, B) an excisive couple. Equivalently, for CW complexes it suffices that A and B are subcomplexes with A ∪ B = X, since one can thicken to open neighborhoods that deformation-retract back.

What exactly is the connecting map ∂?

Given a homology class [z] in Hₙ(X), represent it by a cycle z that (after subdivision) splits as z = zₐ + z_b with zₐ a chain in A and z_b a chain in B. Then ∂zₐ = −∂z_b is a cycle lying in A∩B, and ∂[z] := [∂zₐ] in Hₙ₋₁(A∩B). It measures the failure of the two halves to be cycles on their own.

Why does the interior-cover condition matter — what breaks without it?

It is exactly what lets barycentric subdivision push every simplex into a single piece, making the inclusion C•(A)+C•(B) ↪ C•(X) a quasi-isomorphism. Without it, simplices straddling the boundary belong to neither piece and cannot be subdivided into ones that do, so the crucial quasi-isomorphism fails and the sequence is no longer exact. A circle cut into two closed arcs meeting only at points illustrates the loss of the H₁ class.

How is Mayer-Vietoris related to the van Kampen theorem?

They are the same idea for different invariants: van Kampen computes the fundamental group π₁(A∪B) as an amalgamated free product π₁(A) *_{π₁(A∩B)} π₁(B), while Mayer-Vietoris computes homology via a long exact sequence. Homology is abelian, so its gluing is a linear exact sequence rather than a nonabelian pushout. Both require the pieces and their intersection to be nicely connected.

Is there a reduced version, and why prefer it?

Yes. Replacing H by reduced homology H̃ gives a long exact sequence that stays exact all the way down to degree 0 whenever A∩B is nonempty. This is what makes computations like Sⁿ clean: the two contractible hemispheres contribute zero, so the sequence collapses to the isomorphism H̃ₖ(Sⁿ) ≅ H̃ₖ₋₁(Sⁿ⁻¹). Without reduction, an annoying ℤ in degree 0 clutters the recursion.

Does Mayer-Vietoris hold for cohomology and generalized theories?

Yes. Dualizing gives a long exact sequence ⋯ → Hⁿ(X) → Hⁿ(A) ⊕ Hⁿ(B) → Hⁿ(A∩B) → Hⁿ⁺¹(X) → ⋯ with arrows reversed and degree raised by ∂. More generally, any (co)homology theory satisfying the excision (or the equivalent additivity/exactness) axioms — K-theory, bordism, sheaf cohomology via Čech — has a Mayer-Vietoris sequence. It is a formal consequence of excision, not special to singular homology.