The book opens in Flatland, a two-dimensional universe where social status is strictly determined by geometric form. Women are mere straight lines without brainpower, soldiers and workmen are isosceles triangles with dangerously sharp vertices, and the ruling class consists of polygons and circular priests. Citizens recognize one another through touch, hearing, or the subtle use of fog to judge comparative dimness and clarity.
The narrator, a respectable square, details the rigid laws and violent history of his world, including the suppression of a chromatic revolution where lower-class rebels attempted to introduce color as a universal equalizer. Despite strict social stratification and the constant danger posed by the sharp angles of women and lower classes, society maintains a precarious order enforced by the circular hierarchy.
Everything changes when the square is visited first in a dream by the monarch of Lineland—a one-dimensional world—and then in reality by a sphere from Spaceland. The sphere struggles to explain the concept of a third dimension, finally dragging the square out of his plane to witness the true nature of space.
Elevated to Spaceland, the square perceives the interior of every house and the depths of the earth, realizing the limitations of his own universe. Inspired by this revelation, he attempts to convince the sphere that a fourth dimension must logically exist, citing mathematical progression and analogy, though the sphere dismisses the idea as inconceivable.
Returning to Flatland, the square tries to evangelize the gospel of three dimensions to his grandson and peers, resulting in his immediate arrest by the circular council. Condemned to perpetual imprisonment for sedition, he spends his remaining years reflecting on the truths he witnessed while struggling against doubt and the mental weakness of confinement.
The narrative concludes with editorial commentary noting the parallel between Flatland's rejection of the third dimension and Spaceland's skepticism toward a fourth. The work serves as both a biting satire of Victorian social rigidity and an imaginative exploration of multi-dimensional mathematics.