Skip to content
What's After the Movie?
Plot summary

Fermat’s Room (2007) Plot Summary & Timeline

Fermat’s Room (2007) movie poster

Fermat’s Room is a 2007 mystery and thriller film directed by Luis Piedrahita and Rodrigo Sopeña, running 1 hour 28 minutes. This page retells the whole story in 749 words (about 3 minutes to read) and covers 12 key events in order, 5 characters, where and when it is set and 4 themes. Looking for the cast, ratings and where to stream it? See the movie page for Fermat’s Room.

to read the plot summary
3 min
key events in the timeline
12
characters profiled
5
themes explained
4
Loading streaming availability…
Fermat’s Room (2007) movie poster
Released
Runtime
1h 28m
Genres
Mystery, Thriller
Original language
Spanish
No spoilers

What Is Fermat’s Room About?

The premise of Fermat’s Room in 339 words, with nothing given away. The full story follows below.

In a secluded setting far from the usual bustle of academia, a select group of the nation’s most brilliant mathematicians receives a cryptic invitation to solve “the greatest enigma.” The summons promises anonymity, demanding that each guest adopt an alias drawn from the pantheon of great thinkers, while forbidding any hint of their true identities. Stripped of phones and other modern comforts, the invitees arrive at a remote riverside location where a lone, enigmatic host—known only as Fermat—greets them with a mixture of solemnity and intrigue, setting the tone for a night that feels part lecture, part ritual.

Among the gathered are Galois, a determined young prodigy; Hilbert, a seasoned and calculating presence; Pascal, a quick‑witted youth whose humor lightens the tension; and Oliva, a stylish, observant woman whose confidence hints at hidden depths. Their introductions unfold in an elegantly appointed parlor, its walls lined with books that whisper of centuries of mathematical triumphs and failures. The atmosphere is a careful balance of intellectual camaraderie and quiet unease, as each guest feels the weight of expectations both self‑imposed and imposed by the mysterious host.

Soon, the true nature of the gathering emerges: the room itself becomes a living puzzle. As challenges are presented, the walls begin to close, turning abstract problem‑solving into a literal race against a tightening space. The pressure is both physical and psychological, compelling the mathematicians to collaborate, argue, and push the limits of their expertise. Their interactions—marked by mutual respect, subtle rivalry, and the occasional flash of brilliance—create a dynamic tapestry that keeps the tension palpable without ever sacrificing the story’s cerebral core.

The film glides between the stark, claustrophobic reality of a shrinking chamber and the ethereal world of theoretical speculation, inviting viewers to contemplate how far the human mind will go when logic meets survival. Its tone remains taut yet thoughtful, a meditation on curiosity, ambition, and the hidden costs of relentless pursuit—all set against a backdrop where every solved equation feels like a breath of fresh air in an increasingly constricted world.

Full plot

What Happens in Fermat’s Room?

The complete story of Fermat’s Room, from the first scene to the last, in 749 words (about 3 minutes). Spoilers throughout. Names in the text link to 1 cast member page.

Spoilers ahead

A mysterious host, going by the name Fermat Federico Luppi, invites a handful of the nation’s top mathematicians to a private gathering. Each participant must solve a puzzle to earn an alias drawn from famous mathematicians or philosophers, and they are strictly forbidden to reveal their true identities. They are instructed to arrive at a precise place and time, alone and without a cell phone, to wrestle with what is described as “the greatest enigma.”

At the appointed hour, four individuals converge at a riverbank: Galois [Alejo Sauras], an earnest young man; Hilbert [Lluís Homar], an older, calculating man; Pascal [Santi Millán], a modest, quick-witted youth; and Oliva [Elena Ballesteros], a stylish and perceptive woman. At dusk, a car on the far side of the river flashes its headlights, signaling the start of a strange journey. A PDA appears in the car, offering GPS coordinates and travel instructions that guide them to an abandoned warehouse. Inside, a back room has been transformed into an elegant parlor, with a large dining table set for five and shelves of books that give the space a timeless, academic air.

An elderly man enters and announces himself as Fermat. The group spends time mingling and discussing academia, mathematics, and the puzzles ahead. Fermat mentions a daughter and leaves in a rush after a troubling phone call he can’t fully interpret, forgetting his coat in the scramble. Fermat’s wallet falls from a pocket, and Pascal notices a photograph of a girl inside.

The PDA presents another puzzle with a one-minute timer. Hilbert, Oliva, and Galois struggle to meet the deadline, while Pascal breezes through the challenge, dismissing it as an old cliché. The walls of the room begin to close in as the time slips away, and the group realizes they are trapped. The device continues to flash new puzzles, and as they work, tensions surface: Oliva and Galois share a past, including Oliva’s betrayal of Galois with Hilbert.

They stack the furniture to block the moving walls, but the furniture breaks as the room tightens around them. Pascal discovers a sales order for four industrial presses, hinting that the pressure of the room is designed to crush them each time a puzzle is missed. The room feels like a trap with no escape, intensifying the sense that every action matters.

As the pressure mounts, the group learns that Oliva and Galois had a romantic history and that Oliva cheated on him with Hilbert. Their attempts to survive intensify, and the mystery surrounding Fermat deepens. There are moments where Pascal suspects Fermat of a ruinous revenge, especially after recognizing the girl in the wallet’s photo as someone he severely injured with his car. The revelation implies a broader vendetta at play, turning the other guests into collateral victims unless they uncover the truth.

Further clues emerge: an invitation addressed to Fermat with different instructions reveals that Fermat is not the true host but another pawn in a larger game. If this is revenge, the killer must be present in the room with them, unseen.

Galois finally confesses that his celebrated claim to have proven Goldbach was a lie, staged to win Oliva back. Hilbert then reveals his true role: the mastermind behind the entire scheme. He confesses a lifelong obsession with proving Goldbach and admits his jealousy toward Galois’s supposed breakthrough, which spurred him to orchestrate this deadly contest. Fermat, instead, was a decoy whose fate would be sealed by a silent poison gas released in his car.

Hilbert announces that he has indeed “proved” Goldbach, and he hands a folder containing his supposed proof to Galois. The tension peaks as Galois acknowledges the brilliance of Hilbert’s work, yet the revelation comes at a harrowing cost. The trio pieces together a chilling realization: the ages of the people named Oliva, Galois, Fermat, and Pascal match the ages of the current guests, while the real Hilbert died at 81. It becomes clear that Hilbert had an escape plan all along and did not intend to die with them. In a last act of defiance, they discover a hidden wall panel and escape, taking with them Hilbert’s supposed proof.

Returning to their cars, Galois grapples with the dilemma of publishing the solution under Hilbert’s name or under his own. Pascal seizes the folder and scatters the pages along the river, delivering a blunt verdict: the world remains the same with or without the proof, and the pursuit itself has proven more corrosive than any final vindication.

Timeline

Fermat’s Room Timeline: Every Key Event in Order

12 key events in the order they happen, from “Invitation to solve the puzzles” to “Escape and the ethical choice about the proof”. 11 events name a place, across 5 locations.

  1. 1

    Invitation to solve the puzzles

    A stranger using the alias Fermat invites several top mathematicians to attend a convention. To accept, each participant must solve a math puzzle to earn their alias. Once solved, they are forbidden to reveal their true identities and are told to arrive alone with no cell phone. The invitation promises a chance to confront 'the greatest enigma'.

    When:Evening

  2. 2

    Convergence at the riverbank

    At dusk, four individuals converge at a riverbank: Galois, Hilbert, Pascal, and Oliva, each under an alias. They receive a PDA with GPS coordinates and travel instructions that direct them to an abandoned warehouse. They are told to arrive alone, with no devices, to solve the puzzles and begin the staged event.

    When:Dusk Where:Riverbank

  3. 3

    Warehouse arrival and parlor setup

    The car from the riverbank guides them to an abandoned warehouse where a back room has been prepared as an elegant parlor for five. An elderly man enters and introduces himself as Fermat. The room is stocked with books and a large dining table, setting a formal, game-like atmosphere for the night.

    When:Evening Where:Abandoned warehouse – back room

  4. 4

    Dinner and Fermat's distress

    The group socializes and discusses academia while dining. Afterward, Fermat receives a phone call about his daughter, whom he claims is in a coma; the news seems dire but its accuracy is unclear. He leaves in a hurry, forgetting his coat, and the wallet with a photo falls to the floor.

    When:Evening Where:Warehouse back room

  5. 5

    Wallet and photo reveal a clue

    Pascal picks up Fermat's wallet and notices a photo of a girl, hinting at a personal motive or a past they don't know. The discovery adds tension as the group's identities begin to feel more precarious. The PDA still displays puzzles that must be solved under pressure.

    When:Evening Where:Warehouse back room

  6. 6

    First puzzle deadline and the moving walls

    The PDA displays a math puzzle with a one-minute time limit. Hilbert, Oliva, and Galois fail to solve it in time, while Pascal quickly provides the solution, dismissing it as an old cliché. The walls of the room begin to contract, revealing a trap and making escape impossible while the puzzle continues to spawn new challenges.

    When:One minute after prompt Where:Back room

  7. 7

    The room becomes a trap with presses

    The group realizes the room is configured with four industrial presses that will compress the space as punishment for missed puzzles. They pile the furniture to resist, but the furniture breaks as the walls continue to close in. Panic and strategic tension rise as they search for a way out.

    When:During the trap Where:Back room

  8. 8

    Past romance and jealousy revealed

    As the pressure mounts, Oliva and Galois's past romance is exposed, and Oliva is revealed to have cheated on Galois with Hilbert. The revelation adds a personal dimension to the competition, intensifying insecurities and distrust among the occupants.

    When:During Where:Back room

  9. 9

    Fermat is a diversion; mastermind in the room

    The group discovers that Fermat is not their host but a distraction, and that the true mastermind must be among them. They conclude that someone in the same room is orchestrating the deadly game. The danger now feels intimate, as there are no external observers or cameras.

    When:During Where:Back room

  10. 10

    Hilbert's reveal and the Goldbach pressure

    Galois admits that his earlier claim about proving Goldbach was a fabrication to win Oliva, while Hilbert declares himself the mastermind behind the trap. He also boasts that he has spent a lifetime chasing Goldbach, and Fermat was merely a diversion to keep him focused on vengeance. The room tenses as accusations sharpen blades of trust and betrayal.

    When:During Where:Back room

  11. 11

    The proof, the strike, and the age clue

    Hilbert proclaims a completed proof of Goldbach and hands a folder to Galois. Galois concedes that Hilbert's approach is brilliant, but in a fit of frustration he strikes Hilbert, rendering him unconscious. A critical age clue reveals that the real Hilbert died at 81, indicating the present occupant is a copy or impersonation, and suggesting there was always a hidden escape plan.

    When:Evening Where:Back room

  12. 12

    Escape and the ethical choice about the proof

    The trio discovers a breakable wall panel and escapes with Hilbert's proof. They question whether releasing the solution under Hilbert's name would let him 'win' or whether releasing it under Galois's name would be ethical but solve their predicament. Pascal grabs the folder and scatters the pages on the river, remarking that the world remains the same with or without the proof.

    When:Night Where:Back room to river

Characters

Who Are the Main Characters in Fermat’s Room?

5 characters, among them Fermat (Federico Luppi), Hilbert (Lluís Homar) and Galois (Alejo Sauras): who each one is and the part they play in the story. Every profile links to the actor’s page.

  • F(

    Fermat (Federico Luppi)

    Played by Federico Luppi

    An elderly man who arrives posing as Fermat, the host of the gathering. He initially seems arbitrary and concerned with his daughter, but is ultimately revealed as a diversion used by the true mastermind. He becomes a pawn in the deadly game and is implied to be killed by a hidden gas release.

    • 🎭 Mystery
    • 🧠 Elderly
    • 🧪 Host
  • H(

    Hilbert (Lluís Homar)

    Played by Lluís Homar

    The mastermind behind the perilous convention, driven by an obsessive desire to prove Goldbach. His jealousy of Galois fuels the elaborate ruse, and he orchestrates the trap as a cruel test of genius and resolve. He reveals a calculated escape plan, indicating he never intended to die with the others.

    • 🧠 Genius
    • 🕵️‍♂️ Mastermind
    • ⚖️ Obsessive
  • G(

    Galois (Alejo Sauras)

    Played by Alejo Sauras

    A young, celebrated figure who gained press attention for a claimed proof. He confesses to lying to win back Oliva, and his competitive streak collides with Hilbert’s scheme. He becomes increasingly conflicted as the truth about the setup and the moral implications of their actions come to light.

    • 🧠 Genius
    • 🏁 Ambitious
    • 🎭 Deceptive
  • P(

    Pascal (Santi Millán)

    Played by Santi Millán

    A self-effacing prodigy who solves the puzzles with ease, dismissing some clichés while exposing the room’s design. He recognizes a photo of a girl linked to a past incident and becomes central in unraveling the truth about the mastermind. In the end, he chooses a morally pragmatic path, scattering the proof to resist manipulation.

    • 🧠 Prodigy
    • 🕯️ Quiet
    • 🧩 Puzzle-solver
  • O(

    Oliva (Elena Ballesteros)

    Played by Elena Ballesteros

    A stylish young woman with a romantic history involving Galois and an entangled past with Hilbert. Her relationships complicate trust, revealing how personal betrayals intersect with the high-stakes intellectual duel. She is central to the dynamics and the revelations about the true nature of the host.

    • 💃 Stylish
    • ❤️ Romantic history
    • 🗝️ Secrets
Setting

Where and When Is Fermat’s Room Set?

Fermat’s Room is set in Riverbank and Abandoned warehouse. Here is why the place matters to the story.

Where

Riverbank, Abandoned warehouse

The story unfolds starting at a quiet riverbank where four mathematicians converge. They are guided by a PDA to an old, abandoned warehouse, and inside a back room is set up as a refined parlor with books and a large dining table for five. The claustrophobic space becomes a trap as puzzles tighten the noose around them.

  • 🏞️ River setting
  • 🏚️ Industrial ruin
Themes

What Are the Themes of Fermat’s Room?

4 ideas the story keeps returning to, among them Genius Rivalry, Puzzle Trap and Ethics of Fame.

  1. 01

    Genius Rivalry

    The film centers on competing intellects and the fear of being outmatched. Hilbert's obsession with proving Goldbach pits him against Galois, who has already gained public attention for a claimed proof. The tension reveals how pride and envy can fuel elaborate schemes and dangerous games.

  2. 02

    Puzzle Trap

    The room itself becomes a deadly puzzle chamber, with each failed solution triggering a new, escalating threat. The characters must balance solving abstract math problems with managing their dwindling escape options as the walls close in. The puzzles test not only intellect but cooperation and desperation.

  3. 03

    Ethics of Fame

    As the stakes rise, the question of who deserves credit—and how it should be presented to the world—drives key choices. The possibility of publishing the Goldbach proof under someone else’s name weighs on Galois and Pascal, culminating in a decision to reject false glory, even at personal cost. The film interrogates integrity versus ambition in the world of math and prestige.

  4. 04

    Love and Betrayal

    Romantic history and betrayals among the participants color the dynamics, with Oliva having complicated ties to both Galois and Hilbert. Secrets about past relationships surface, intensifying mistrust as tensions rise. These personal betrayals intersect with the high-stakes game, shaping who can be trusted when survival hinges on cooperation.

Tone & mood

What Kind of Film Is Fermat’s Room?

Tense in tone, with fast pacing and a moderate story, going by the plot summary.

Tone
Tense
Pacing
Fast
Story
Moderate
Intensity
High
Ending
Bittersweet

A relentlessly tense and claustrophobic thriller where a shrinking room forces brilliant minds into a high-stakes battle of wits, revealing dark secrets and a bitter revenge plot.

  • claustrophobic
  • suspenseful
  • anxious
  • cerebral
  • paranoid
  • grim
  • intellectual puzzle
  • revenge
  • survival
  • mathematical obsession

Content notes: psychological torture, trapped confinement, poison gas, implied death.

Quiz

How well do you remember Fermat’s Room? Test yourself on the story.

Take the quiz
Loading streaming availability…
Read next

Movies Like Fermat’s Room With a Plot Summary

6 films close to Fermat’s Room in story and themes that have a full plot summary here: The Mystery of the Yellow Room (2003) and Sleuth (1972) lead.

All plot summaries

Missing a Movie Plot Summary?

Tell us which film you want explained next: the full story, the timeline, the characters and the ending.

Request a summary
FAQ

Fermat’s Room Plot Questions

5 quick answers about Fermat’s Room, taken from the plot summary, character guide and setting on this page and the film’s credits.

What is Fermat’s Room about?

In a secluded setting far from the usual bustle of academia, a select group of the nation’s most brilliant mathematicians receives a cryptic invitation to solve “the greatest enigma.” The summons promises anonymity, demanding that each guest adopt an alias drawn from the pantheon of great thinkers…

Read the full plot summary

When and where does Fermat’s Room take place?

Fermat’s Room is set in Riverbank and Abandoned warehouse. The story unfolds starting at a quiet riverbank where four mathematicians converge. They are guided by a PDA to an old, abandoned warehouse, and inside a back room is set up as a refined parlor with books and a large…

The setting explained

Who are the main characters in Fermat’s Room?

The story follows Fermat (Federico Luppi) (played by Federico Luppi), Hilbert (Lluís Homar) (played by Lluís Homar), Galois (Alejo Sauras) (played by Alejo Sauras) and Pascal (Santi Millán) (played by Santi Millán); the character guide covers 5 characters in all.

All the characters

What are the main themes of Fermat’s Room?

The summary picks out 4 themes: Genius Rivalry, Puzzle Trap, Ethics of Fame and Love and Betrayal.

The themes explained

Who directed Fermat’s Room?

Fermat’s Room (2007) was directed by Luis Piedrahita and Rodrigo Sopeña and runs 1 hour 28 minutes.

Luis Piedrahita’s films

Coming soon to your phone

The Plot Explained Movie Summary App

From blockbusters to hidden gems: plot summaries, endings explained and timelines on your phone. Save your favorites and never miss a twist again.

Be the first to know when it launches. Your email stays private, always. Learn more about the app