%%
%%
%% Administrivia/ZeroContexExample are not allowed, and have been commented-out.
%%
%% Please don't uncomment anything without adding context.
%%
%%

[[quoteright:250:https://static.tvtropes.org/pmwiki/pub/images/Fermats-Room_5049.jpg]]

''Fermat's Room'' (also known as ''La Habitacion de Fermat'') is a 2007 Spanish suspense film.

Four mathematicians receive a mysterious letter in the mail, and are given an offer: if they can identify the pattern of the numbers in the letter, they will be invited to work on the greatest mathematical enigma of all time. The letters are signed only, "Fermat." The four accept, and are given aliases - Hilbert, Galois, Pascal, and Oliva. Upon arrival, they realize they are trapped, and the only way to prevent the walls from closing in is to solve a never-ending sequence of brain teasers. Along the way, the characters' secrets come out as they speculate on their host's true motives.

----
!!This film provides examples of:

* ThreePlusFiveMakeFour: A variant with two hourglasses: one of four minutes and one of seven minutes, the goal is to time nine minutes.
* TheAlcoholic: Pascal is almost constantly drinking, [[spoiler: to try and forget that he ran over Fermat's daughter.]]
* AttentionWhore: Galois is only a mathematician because of the fame he can get when he discovers something new, like the proof of Goldbach's conjecture.
* {{Character Tic|s}}: Hilbert has a habit of adding grammatical accents when other people write on the chalkboard.
* BatmanGambit: The success of the scheme relied on every character and detail to work as planned.
%% * TheChessmaster: [[spoiler:Hilbert]].
* CheatersNeverProsper: Had Galois never lied about his [[spoiler: proof of Goldbach's Conjecture]], nothing would have happened.
* ClosedCircle: By the time the characters realize the walls are moving, the door has been rendered unopenable.
%% * EurekaMoment: The characters have several of these while pondering over the puzzles.
* DrivenByEnvy: This is why [[spoiler: Hilbert sets up other people to be killed so he could claim the proof of Goldbach's Conjecture himself.]]
%% * EvilGloating: [[spoiler:Done by Hilbert]].
* FairPlayWhodunnit: Every hint the characters get, the viewers get too (though we don't know anybody's secret to start with).
%% * FoxChickenGrainPuzzle: [[DiscussedTrope Discussed]] when they cross the river.
* HopeSpot: As the people in the room try to contact Fermat, it's revealed that his safety belt has been boobytrapped. But the viewers know he's still alive, because he never actually used his seatbelt. Then he's stopped by the police, who make him wear it...
* HoistByHisOwnPetard: [[spoiler: Hilbert set up the entire death trap while planning to secretly escape through a breakable wall. He ends up being discovered to be the real mastermind and is left to die from his own trap.]]
%% * KnightsAndKnaves: One of the riddles. One has to wonder how there are four adult mathematicians in a room and yet no one knows the answer to even this riddle yet.
* MadeOfIndestructium: The furniture is mercilessly crushed by the hydraulic pumps, but the walls don't even bend a little.
* MeaningfulName: Everybody's alias is a mathematician's name. Mathematicians who died at the same age as the characters are now. Except [[spoiler:Hilbert, who lived past eighty.]]
* MistakenForSpecialGuest: Part of TheReveal. [[spoiler:Fermat]] was assumed to be the host of the game, while in fact he was merely another pawn in the scheme.
* PoorCommunicationKills: Had anyone actually asked Fermat [[spoiler: whether he was the host]], had anyone listened to Pascal when he noticed the walls moving, or had Fermat picked up his phone when the others tried to call him, at least two lives could have been saved.
* ProperlyParanoid: Galois checked who the mysterious host was before going to the gathering. [[IdiotBall Too bad he forgot the name.]]
%% * RaceAgainstTheClock
%% * RedHerring:
%% ** Everybody's supposed motives to kill any of the others in the room (except the one of the true culprit, of course).
%% ** [[spoiler: Pascal's running over Fermat's daughter, and Fermat's supposed revenge. For that matter, everything involving Fermat.]]
%% ** [[spoiler: Galois and Olivia's failed relationship, though their relationship was the reason why Olivia was there.]]
%% * RiddleMeThis: duh.
%% * SealedRoomInTheMiddleOfNowhere: The heroes aren't exactly left to starve, but considering the hoops the characters had to jump through to ''get'' there...
* SmartPeoplePlayChess: We first get to see Hilbert when he's playing chess with his psychiatrist.
%% * VillainExitStageLeft: The villain planned to exit via lift. [[spoiler:Didn't happen.]]
%% * TheWallsAreClosingIn: Drives the plot.

----