In cinema, mathematicians appear mainly in two types of fiction film. The first is the biopic, which tells the more or less fictionalized story of a real mathematician. Mathematics is then presented through this character, who is by definition always unconventional. Many mathematicians have done equally remarkable, if not more remarkable, research, but led lives that are little known or that filmmakers consider far duller. These narrative constraints mean that the tiny sample of mathematicians whose lives have been brought to the screen tends to shape the stereotype of the brilliant, obsessive and eccentric mathematician.
Biographies that are not always realistic ------------------------------------------
More recently, Srinivasa Ramanujan received a highly successful biographical treatment in The Man Who Knew Infinity. The film depicts the five-year collaboration between the Indian mathematician and Godfrey Harold Hardy at the University of Cambridge during the First World War. It focuses particularly on the young man's difficulties fitting in, caught between the racism of British scientists and Hardy's harsh treatment of him. In this kind of film, the mathematician's distinctive character is emphasized far more than their mathematics. Thus, A Beautiful Mind (Ron Howard, 2002) portrays John Nash's descent into schizophrenia. The Imitation Game (Morten Tyldum, 2015) dwells on the difficulties Turing faced because of his homosexuality, which was then regarded as a pathological condition leading to illegal practices. In The Theory of Everything (James Marsh, 2015), Stephen Hawking's struggle with motor neuron disease is portrayed in the film adaptation of his wife Jane Hawking's book, Travelling to Infinity: My Life with Stephen (Terra Nova, 2015).