Set theory is the branch of mathematics that studies collections of objects, called sets. Though it begins with an idea as simple as grouping things together, it grew into the foundation on which almost all of modern mathematics is built.

A set is just a collection of distinct things, whether numbers, points, letters, or even other sets. We can speak of the set of all even numbers, or the set of planets in the Solar System. From this plain notion of gathering objects together, an entire mathematical universe can be constructed.

An early "tree" of categories, an ancestor of the modern theory of sets and classes.
An early "tree" of categories, an ancestor of the modern theory of sets and classes.

Set theory is often called the common language of mathematics, because the numbers, functions, and structures of nearly every field can all be defined in terms of sets. A whole number, a geometric point, even the operations of arithmetic, can be built up from sets, giving mathematics a single, unified foundation.

The theory was created in the 1870s by the German mathematician Georg Cantor. His most startling discovery was that infinity comes in different sizes. He showed that the infinity of the whole numbers is genuinely smaller than the infinity of points on a line, an idea so bold it shocked his contemporaries.

Cantor found a way to compare infinite collections by trying to pair their members one to one. The whole numbers and the fractions can be so paired, he showed, but the points on a line cannot; there are simply too many. Some infinities, astonishingly, are larger than others, and there is no largest of all.

Bertrand Russell, who exposed a famous paradox that reshaped the foundations of set theory.
Bertrand Russell, who exposed a famous paradox that reshaped the foundations of set theory.

Early set theory ran into trouble. Bertrand Russell asked about the set of all sets that do not contain themselves: does it contain itself? Either answer leads to a contradiction. Such paradoxes showed that the naive idea of forming any set whatsoever was dangerously flawed and needed careful repair.

To resolve the paradoxes, mathematicians built careful systems of axioms, precise rules that say exactly which sets may be formed and how. The resulting framework, refined over decades, provides a secure foundation for mathematics, allowing the free use of sets while shutting the door on contradiction.

Set theory also raises questions that turn out to be undecidable: they can be neither proved nor disproved from the standard axioms. The most famous, the continuum hypothesis, asks whether any infinity sits between the whole numbers and the points on a line. Such results reveal surprising limits to mathematical certainty.

Set theory underpins logic, the definition of numbers, and the structures of every mathematical field, usually quietly, in the background. From the simple act of gathering objects together grew a theory that supports the entire edifice of modern mathematics and continues to probe the very nature of infinity.