Flatland is a world that exists on the two-dimensional plane, where its inhabitants—literal geometrical shapes—live in a highly-structured society organized into classes based on the number of sides of a figure. The narrator and protagonist of Flatland, A Square, writes from prison, intricately detailing the social organization of his country and recounting the revelations he has received from the sacred “Sphere.”

In the first half of his treatise, A Square painstakingly describes the social landscape of Flatland, which is strictly regulated by natural laws as dictated by the Circles, the priests that make up the highest class. While women are simple straight lines, the males are full polygons. Flatland society is organized from the isosceles triangles at the bottom, then the equilateral triangles, square, pentagons, hexagons, higher polygons, and finally, the priestly circles at the top. By indoctrinating the Flatlandians to Attend to your Configuration, the Circles maintain power, limiting the freedom of lower polygons and women through oppressive policies and institutions, and immediately suppressing any rebellion through frequent executions.

In the second part of Flatland, A Square recalls a dream, in which he envisions Lineland, where he meets a line, who he initially mistakes as a woman, but finds out is the Monarch of Lineland. He learns that the world of Lineland is literally limited to an infinitely long line, where only two motions are possible and social interactions depend solely on the faculty of hearing. Although A Square attempts to explain the nature of the second dimension to the Monarch, he fails to find appropriate words, since left and “right” are meaningless in Lineland, and he cannot overcome the ignorance and narrow-mindedness of the Monarch. Aggravated, the Monarch attacks A Square, and he wakes up from his dream.

It is the last day of the 1999th year and A Square is sitting at home with his Wife, thinking about what his Grandson had said earlier that day. As a reward for excelling at his practice in Sight Recognition, A Square gives his Grandson a quick lesson in squaring: he demonstrates that three-to-the-second is nine, with nine squares that make one large square with sides of three units long. After meditating over his grandfathers words, A Square’s Grandson asks about the significance of three-to-the-third in Geometry, but this question is shot down by A Square, and he is sent to bed. As A Square considers the absurdity of his Grandsons question, A Square and his Wife are visited by a mysterious stranger, the Sphere.

As occurs at the beginning of every millennium, the Sphere comes from Spaceland in search of a new apostle who will accept and spread the Gospel of the Third Dimension. Initially, A Square struggles to understand the Spheres teachings and reacts violently against his unwanted visitor. Therefore, the Sphere physically takes A Square to Spaceland where he can sense and feel the solidity of three-dimensional figures.

In Spaceland, the Sphere and A Square are able to look down upon the whole of Flatland, where A Square can see the entirety of his household from above. The Sphere then points his attention to the General Assembly Hall where the Grand Council, including A Squares brother, is meeting on the first day of the 2000th year to organize their millennial search for people professing revelations of other worlds and to scourge them from society.

Newly enlightened and motivated to spread the concept of the third dimension, A Square expresses his desire to descend into the council meeting and enlighten the others. However, the Sphere stops him and enters Flatland himself, proclaiming the presence of a land of Three Dimensions. The Sphere escapes the building before the members of the council attempt to arrest him, but the poor guardsmen and A Squares brother are condemned to eternal imprisonment for being witnesses of the Spheres dangerous revelations.

When the two return to Spaceland, the Sphere resumes his lessons on the three-dimensional inhabitants of his land. Meanwhile, A Squares thirst for knowledge grows, and he asks the Sphere about even higher dimensions. The Sphere claims that there are no extradimensional worlds beyond Spaceland, and begins to feel irritated by A Squares incessant questioning. Frustrated, the Sphere pushes A Square back into Flatland.

Back in Flatland again, A Square has another dream. In this vision, the Sphere accompanies him to the land of Pointland, the Abyss of No Dimensions. They meet the Monarch of Pointland, whose entire universe is himself. In fact, no matter what A Square says to wake the Monarch out of his complacency, the Point takes every word and thought to have originated from himself. When A Square and the Sphere return to Flatland, the Sphere teaches him the moral of the vision of Pointland and tells A Square to enlighten other Flatlandians of higher knowledge. He admits his error in ignoring the extra dimensions and initiates A Square into the deeper mysteries beyond the third dimension.

When he wakes up from his dream, A Square decides to go back to his grandson to teach him of the third dimension, since he had insightfully imagined the meaning of three-to-the-third before. Unfortunately, as A Square begins to introduce the theory of the third dimension to his grandson, the Grand Council publicly broadcasts their proclamation to punish anyone who claims to have received revelations of other worlds. A Square’s grandson, afraid of being imprisoned for considering dangerous ideas, refuses to acknowledge that he meant anything by inquiring about three-to-the-third.

Discouraged by his failure to convert his grandson, A Square begins writing a treatise on the mysteries of the Third Dimensions. Eventually, the overzealous A Square is arrested after he professes his experiences in Spaceland and the ideas of the third dimension at a local town meeting. He expresses that he has been in prison for seven years as he writes Flatland, and the book ends with the hopeless image of the dejected apostle and his failure to spread the Gospel of Three Dimensions.