In the 4th century city of Alexandria, in the Roman Empire, Greek philosopher Hypatia (Rachel Weisz), is a female teacher at the Platonic school, where future leaders are educated. Hypatia is the daughter of Theon (Michael Lonsdale), the director of the Musaeum of Alexandria. Hypatia, her slave Davus (Max Minghella), and her pupils, Orestes (Oscar Isaac) and Synesius (Rupert Evans), are immersed in the changing political and social landscape. She rejects her student Orestes's love, because she prefers to stay an independent scientist. Davus assists Hypatia in her classes and is interested in science, and is also secretly in love with her. Meanwhile, social unrest begins challenging the Roman rule of the city as pagans and Christians come into conflict. The pagans, including Orestes and Hypatia's father, ambush the Christians to quash their rising influence, but find themselves unexpectedly outnumbered. Hypatia's father is gravely injured and Hypatia and the pagans take refuge in the Library of the Serapeum. The Christian siege of the library ends when an envoy of the Roman Emperor declares that the Christians shall be allowed to enter the library. Hypatia and the pagans flee, trying to save the most important scrolls, before the Christians overtake the library and destroy its contents. Davus, torn between his love for Hypatia and the possibility of gaining his freedom by joining the rising tide of Christianity, and annoyed by Hypatia calling him an idiot for not being present when he is needed most to help saving the scrolls, chooses to join the Christian forces. He returns with a sword and starts sexually assaulting her, but quickly regrets this and offers his sword to her to kill him. However, she removes the slave collar around his neck and tells him he is free now.
Several years later, Orestes, now converted to Christianity, is prefect of Alexandria. Hypatia continues to investigate the motions of the Sun, the Moon, the five known "wanderers" (planets) and the stars. Some ridicule Hypatia for thinking that the Earth is a sphere, by arguing that people far from the top would fall off the Earth. When they ask Davus his opinion he avoids conflict by saying that only God knows these things.
Hypatia also investigates the heliocentric model of the solar system proposed by Aristarchus of Samos; by having an object dropped from the mast of a moving ship she demonstrates to Orestes that a possible motion of the Earth would not affect the motion, relative to Earth, of a falling object on Earth. However, due to religious objections against heliocentrism, the Christians have now forbidden Hypatia from teaching at the school. The Christians and the Jews come into conflict, committing violent acts against each other, with the Christians ultimately wresting power from the only other religious group remaining. Davus, remembering how Hypatia forgave him, suggests that perhaps the Christians should forgive the Jews, as Jesus did, but the Christians respond by rebuking him for comparing himself with Jesus.
The leader of the Christians, Cyril (Sami Samir), views Hypatia as having too much influence over Orestes and stages a public ceremony intended to force Orestes to subjugate her. Hypatia's former pupil, Synesius, now the Bishop of Cyrene, comes to her rescue as a religious authority counterweight, but says he cannot help her unless she accepts Christianity; she refuses. Hypatia makes a great discovery, finding that the Earth orbits around the Sun in an elliptic, not circular, orbit with the Sun at one of the foci. Cyril convinces a mob of Christians that Hypatia is a witch and they vow to kill her. Davus tries to run ahead to warn Hypatia, but she is captured by the mob. Before killing her they strip Hypatia naked and beat her until Davus tells the mob to stone her. When everyone was busy collecting the stones, Davus secretly suffocates Hypatia to death. Since she was already dead, she does not feel anything when the crowd begins to stone her.