Take a coffee mug. Take a doughnut. Squint. They are the same shape. Each is a solid lump with one hole running through it; a sufficiently flexible coffee mug could be deformed continuously into a doughnut without tearing or gluing. Topology is the mathematics of what survives such deformations — the shape properties that don't depend on distance, angle, or size, only on which points are close to which others. The discipline emerged in the late nineteenth century from work by Listing, Möbius, Riemann, and especially Henri Poincaré, whose 1895 paper Analysis Situs founded algebraic topology — the project of attaching algebraic invariants to topological spaces, so that two spaces are different if their invariants differ. Topology turned out to be one of the most general organizing frameworks mathematics has produced.
A topological space is a set X equipped with a collection τ of subsets — the open sets — satisfying three axioms: X and the empty set are open; finite intersections of open sets are open; arbitrary unions of open sets are open. From this minimal data, the rest of topology unspools. Continuity of a function f: X → Y is defined entirely topologically: f is continuous iff the preimage of every open set is open. Connectedness: a space is connected if it cannot be split into two disjoint nonempty open sets. Compactness: every open cover has a finite subcover (a generalization of the Heine-Borel theorem). Hausdorff (separation axiom T₂): distinct points have disjoint neighborhoods. Homeomorphism — a continuous bijection with continuous inverse — is the topological notion of sameness; a coffee mug and a doughnut are homeomorphic. Topological invariants — properties preserved by homeomorphism — let us prove that two spaces are not homeomorphic by exhibiting a difference: number of connected components, Euler characteristic (V − E + F for a polyhedron), fundamental group (loops up to deformation), higher homotopy groups, homology groups. Manifolds are spaces that locally look like ℝⁿ — surfaces (2-manifolds), spacetime (a 4-manifold). The Jordan curve theorem (a simple closed curve in the plane divides it into exactly two regions) is intuitively obvious and surprisingly hard to prove rigorously — its difficulty was one of the early signals that topology required serious foundations. Brouwer's fixed-point theorem, the hairy ball theorem (you can't comb a hairy ball flat), and the Poincaré conjecture (proved by Perelman in 2003, securing him a Fields Medal he refused and a million-dollar prize he also refused) are among topology's signature theorems.
Topological data analysis (TDA) — particularly persistent homology — extracts "the shape of data" by tracking which topological features persist as a scale parameter varies; applications in genomics, neuroscience, materials science, and signal processing. Topological insulators in condensed matter physics are exotic materials whose conductivity properties are encoded as topological invariants of the band structure, robust against impurities — the 2016 Nobel Prize in Physics recognized this. Robotics motion planning navigates configuration space topologies. Network analysis studies graph topologies. Knot theory, once an obscure branch of pure math, now applies to DNA tangling and protein folding.