If you're a fan of both the cerebral challenge of mathematics and the thrilling twists of detective stories, this curated list is for you. These films not only entertain with their intricate plots but also showcase how numbers can be the key to solving mysteries. From classic whodunits to modern thrillers, these movies blend logic, puzzles, and crime in a way that will keep you on the edge of your seat.

Cube (1997)
Description: Six strangers wake up in a mysterious cube-shaped room, where they must use their mathematical skills to navigate through deadly traps.
Fact: The film was made on a very low budget but has since become a cult classic for its unique premise and philosophical undertones.


Pi (1998)
Description: A paranoid mathematician searches for a key number that will unlock the universal patterns found in nature, leading him into a dangerous world of conspiracy.
Fact: The film was shot in black and white, and its director, Darren Aronofsky, used a handheld camera to give it a documentary feel.


The Number 23 (2007)
Description: A man becomes obsessed with a book that seems to parallel his own life, leading him to uncover a mystery involving the number 23.
Fact: The film explores numerology and the psychological impact of numbers, with Jim Carrey delivering a rare dramatic performance.


The Oxford Murders (2008)
Description: This film follows an American student at Oxford who teams up with a professor to solve a series of murders linked by mathematical symbols. It's a perfect blend of academic intrigue and detective work.
Fact: The film was based on a novel by Argentine author Guillermo Martínez, and it features a cameo by John Hurt as the mathematician.


The Oxford Murders (2008)
Description: This film follows an American student at Oxford who teams up with a professor to solve a series of murders linked by mathematical symbols. It's a perfect blend of academic intrigue and detective work.
Fact: The film was based on a novel by Argentine author Guillermo Martínez, and it features a cameo by John Hurt as the mathematician.


The Man Who Knew Infinity (2015)
Description: This biographical drama about Srinivasa Ramanujan involves elements of mathematical discovery and the mystery of his genius.
Fact: The film was shot in Cambridge, where Ramanujan studied, and features Dev Patel as the Indian mathematical prodigy.


The Code (2009)
Description: A young mathematician is recruited by the NSA to help crack a code that could prevent a terrorist attack, blending espionage with mathematical puzzles.
Fact: The film was released under several titles, including "Code Name: The Cleaner" in some regions.


The Imitation Game (2014)
Description: While not strictly a detective film, this biographical drama about Alan Turing's efforts to crack the Enigma code during WWII involves plenty of mathematical detective work.
Fact: Benedict Cumberbatch's portrayal of Turing earned him an Academy Award nomination for Best Actor.


Fermat's Room (2007)
Description: Four mathematicians are invited to solve a puzzle, only to find themselves trapped in a room that's shrinking. The film is a thrilling race against time and logic.
Fact: The film's title refers to Pierre de Fermat, a famous mathematician known for Fermat's Last Theorem.


The Bank (2001)
Description: A mathematician takes on a corrupt bank with a complex mathematical model, turning the tables in a financial thriller.
Fact: The film was inspired by real-life financial scandals and features David Wenham in the lead role.
