Quotes • Headscratchers • Playing With • Useful Notes • Analysis • Image Links • Haiku • Laconic 

Imagination does not breed insanity. Exactly what does breed insanity is reason. Poets do not go mad; but chessplayers do. Mathematicians go mad, and cashiers; but creative artists very seldom. I am not, as will be seen, in any sense attacking logic: I only say that this danger does lie in logic, not in imagination.
—G. K. Chesterton, Orthodoxy

SINE! COSINE! TANGENT!
—Sho Minamimoto, The World Ends With You

Clearly, many writers (and viewers) fear and dread mathematics. On rare occasion, a character is found who possesses a defining trait of having delved deeply into the study of profound mathematical knowledge. These characters are, as a rule, insane. It is not necessarily clear whether advanced number theory is itself destructive to sanity (as with some forms of Formulaic Magic), or whether the insane are drawn to maths; nonetheless, the correlation seems to exist.
Bunny Ears Lawyer mentions some Real Life examples of mathematicians who were a bit unhinged, so it's not completely unfounded in reality.
Many Mad Mathematicians will have a Room Full of Crazy with math equations.
See also Mad Scientist.
Contents
Anime and Manga
 While he's not crazy in the usual sense, Daichi/Bastion Misawa of YuGiOh! GX does snap a bit more... strangely... during the White Society arc in season 2. The way he snaps out of it ain't pretty. His going insane was canonically because people weren't worshiping him as the brightest guy around anymore, but the snap back (which involved stripping, and then racing around in his birthday suit) was indeed, induced by math. As a side note, before the FreakOut he was the proud owner of a Room Full of Crazy that he regularly repainted just so he could cover the walls with formulas all over again.
 Moriakisensei from Soredemo Machi wa Mawatteiru looks like your average Stern Teacher at first, but he takes Mathematics way too seriously.
Comic Books
 In The DCU, the sentient Green Lantern mathematical progression Dkrtzy RRR was discovered by mad mathematician Timph Rye, who sought to prove that willpower could be derived formulaically. Dkrtzy RRR is itself of suspect mental stability; its tendency to corrode the minds of its enemies from the inside is... controversial among the ranks of the Corps.
 The Mad Thinker is a big brain mathemagician as well. He once managed to calculate how long it would take the Fantastic Four to invade an enemy fortress, take out the enemies, and escape, and had planted a bomb to go off exactly as they had left the building blowing up their mutual enemy but not the Four. How on Earth did he do that? 10 minutes to go in, factoring in the Human Torch's average temperature of 2000 celcius... carry the 2... divide by 5... leave 2 minutes for electric signals...
 *grabs black marker and crosses through entire sum* AARGH.
Film
 A Beautiful Mind. The whole movie, as well as the real person (John Nash) on whom it was based. As noted elsewhere, while the movie depicted his bout with schizophrenia, he wasn't exactly 'normal' before or after either.
 π (Pi). Max Cohen lives like a hermit, plagued by migraines and social anxiety as he dives into the mathematical heart of the universe. The closer he gets to the ultimate answer, the more insane he becomes. The only way he can achieve peace is to physically burrow out his mathematical ability by trepanning himself with a power drill.
 Proof. Entire movie (and, earlier, stage play) about a woman obsessed with the idea that she inherited both her father's mental illness and math abilities.
 John Givings from Revolutionary Road. After a mental breakdown, he's placed in the care of his parents. At first, he praises and admires the Wheelers for their desire to have something more out of life, rather than a conformist suburban existence. After they've abandoned these plans, he calls them out on their hypocrisy.
Literature
 Sigismund Arbuthnot the mad maths master, in the Molesworth stories.
 Sir Austin Cardynge in the Lensman books, who in this respect can outthink even the superman Second Stage Lensmen (but not Arisians). We are told that he can actually think in the symbology of higher mathematics.
 In the Sherlock Holmes canon, Professor Moriarty is described as having a background in mathematics, although that doesn't really figure into his criminal career.
 That didn't stop him from needing his Mook's help to perform long division, with decimals.
 Apparently they forgot about logarithms.
 A Game of Shadows conflates his legitimate research with his criminal career, especially if you read any of the articles on the actual (nonevil) mathematicians the filmmakers consulted with in order to design his personal financial code. [1]
 That didn't stop him from needing his Mook's help to perform long division, with decimals.
 John Givings from Revolutionary Road (see above).
 Malvolio Bent from the Discworld book Making Money. A man who could see the answer to an equation just by looking at it. Considers making a mistake to be the worst of sins one could ever do. Absolutely abhors all things he considers silly, which includes most things. Once strangled a professional assassin to death with a humorous pink elephant made of balloons when his tenuous hold on reality went byebye and he embraced his clown heritage.
 This could actually be considered a subversion, as his madness is caused not so much by his math skills as by his repression of his clown heritage.
 A more harmless example is the Talkative Loon Bursar of Unseen University. Mad as a spoon (in recent years, he's gotten better, mostly because the university staff hit upon the idea of using medication to have him hallucinate he was sane, the same way most people do), but can be calmed by asking him a complicated mathematical question, which he can figure out in about a second.
 Or rather, asking him the mathematical question can be used as an effective gauge of his health; it won't necessarily calm him down, but, if you consider that he's a bursar as well as being The Bursar, making sure he can actually do his job is pretty much the only thing you can really ask of him. Unfortunately, in The Science of Discworld he discovered advanced mathematics, and as of Unseen Academicals it's up to Ponder Stibbons to make sure things add up because the Bursar now "regards the decimal point as a nuisance".
 In Dragaera, the Dragaerans of the House of the Athyra who study pure logic and philosophy tend to become cold and evil, driven to pursue their studies at the expense of anything and anyone.
 The math monks of Anathem probably aren't mad, but their very sequestered lifestyle gets them pretty close. Of course, many in the outside world believe they actually are Mad Mathematicians.
 In the past, several Centenarian "math monks" actually did go mad, resulting in the coining of the slang term "to go Hundred", meaning "to go mad".
 H.P. Lovecraft was never outright against mathematics, but it did seem to have some unfortunate consequences for his characters, namely in "Dreams in the WitchHouse". Basically, a brilliant young mathematician went mad after moving into a 'haunted house' and discovering vast, untold of geometries outside of human comprehension.
Live Action TV
 The client in the Burn Notice episode "Signals and Codes" is a cryptanalytic genius who's uncovered a conspiracy to sell government secrets, but he believes it's a conspiracy by evil aliens against good aliens who send him messages on beams of light. He's a schizophrenic who's been in and out of psych wards for years. He eventually gets a job and meds.
 Winifred Burkel in Angel was a gifted young physicist who got trapped in Another Dimension (more specifically, a demonruled, medievallevel Crapsack World where humans are treated like cattle) for five years. She quickly recovered and became one of the main characters after returning with the heroes to Los Angeles, but when they first met her she'd taken to scribbling equations on cave walls...
Angel: Fred here might be able to help us with that. She knows a lot about portals. 
 In the sitcom Committed, this is a Defied Trope for Nate, who comes from a family of geniuses who tend to eventually go insane. Though he studied physics at Yale, he works in a used record store in an effort to avoid his relatives' fate. It's only partially successful.
 Averted in Eureka. Most of the characters can write out and understand chalkboardlength mathematical formulas, and most of them are sane. Though, this is Eureka we're talking about.
 The Doctor from Doctor Who, to some extent. According to The DW Wiki, the Time Lords used rather scary mathematics to grow TARDISes, among other things. The Doctor is no exception to this.
"Any number that reduces to one when you take the sum of the square of its digits and continue iterating it until it yields 1 is a happy number, any number that doesn't, isn't. A happy prime is both happy and prime. Now *type it in*! I dunno, talk about dumbing down. Don't they teach recreational mathematics anymore?" 
 Excess math would certainly account for The Doctor's eccentric nature, not that he needs another excuse.
 Averted by Numb3rs  Charlie has his problems but overall he is a pretty sane, steady, and approachable guy. Larry, on the other hand...
 The unsub in the Criminal Minds episode "Derailed" had to take a few years off from his groundbreaking work on Mtheory to be involuntarily committed due to his violent schizophrenia.
Music
 Doctor Steel is a mad scientist who sings about the Fibonacci Sequence.
 Jonathan Coulton is apparently of the opinion that now and again, a great mathematician will come along and actually decrease the madness of the field by solving or figuring out something that had been flummoxing his compatriots, if the first verse of the song Mandlebrot Set is anything to go by.
"Pathological monsters!" cried the terrified mathematician 
Video Games
 The World Ends With You has Sho Minamimoto, who could easily be the best example of this trope. How many others are worthy of being quoted at the top AND bottom of this page? (You zetta sons of digits.)
 The game Pi R Squared has the Excuse Plot that you're a mathematician who's gone inside his own mind to try and collect various mathematical formulas and avoid going insane.
 The Bioshock DLC Minerva's Den has Reed Wahl, the coinventor of the supercomputer known as The Thinker whose splicing induced madness manifested in a delusion of the existence of a 'predictive equation' that would allow him to see the future, the "discovery" of which depended on The Thinker. The titular Minerva's Den is covered in numbers and algebraic symbols in paint, chalk and blood from dozens of corpses, all presumably Wahl's work. Wahl also has the habit of stating that pretty much all of Sigma's actions (including dying) have either been foreseen by the Thinker or that they're "slightly behind schedule".
 N from Pokémon Black and White shows tendencies towards this. He adores functions and formulas, carries a Menger Sponge accessory, and he's trying to "solve the equation to change the world". His OneLetter Name even fits, since "n" is frequently used as a variable in math equations. However, he's not so much insane as he is... horribly misguided, a sheltered and abused Man Child Tyke Bomb designed to destroy Unova's political system so his Treacherous Advisor can take over, and convinced that Humans Are Bastards.
Western Animation
 Kim Possible: The Mathter
Real Life
 As mentioned above, there seems to be a tendency for mathematicians to go mad.
 Although, in the same vein as a Psychic making 50 correct predictions and 7,000 incorrect ones, the exceptional examples tend to be remembered. It should also be noticed Human Calculators are not mathematicians, merely very good at one task through repetition, so any of those who go mad don't count. We do tend to die young though, as G.H. Hardy notes:
Galois died at 21, Abel at 27, Ramanujan at 33, Riemann at 40... 
 Worth nothing, perhaps, that Galois was shot in a politics related duel, while Abel and Riemann died of tuberculosis and Ramanujan of misdiagnosed Amoebiasis. So perhaps the real lesson is Try not to get sick while you reinvent mathematics.
 It's a common opinion that math and physics are fields for young people since they require an ability to learn very quickly and see things creatively, implications that weren't even dreamed of before. As one ages, these abilities dull. This same creativity is also often held to be responsible for the eccentricity in many great mathematicians. This being said, truly great practitioners of anything are inherently exceptions.
 Ted Kaczynski (aka the Unabomber) was a mathematical prodigy who earned his doctorate in one year before he sent 16 bombs to targets including universities and airlines, killing three people and injuring 23.
 Paul Erdős lived as a virtual vagrant and yet was so influential and prolific that he's the Kevin Bacon of mathematics. (That is to say, mathematically inclined people have an Erdős number, as opposed to the film industry's Bacon number. Some people in show business who have also seen certain forms of higher education even have an ErdősBacon number. They are deeply envied.) Not to mention he had an interesting Personal Dictionary. He said that all the great equations were written in The Book. Which book? God's (or as he put it the "Supreme Fascist's") book, which was selfishly guarded  most likely in the same place He hid socks, passports, and other small items.
 More precisely, Kevin Bacon is the Paul Erdős of show business. Erdős came first.
 It was really a thing he was playing around with  even calling it a joke several times when asked about it in the biographical film N Is A Number. It's a bit easier to understand when you realize English was not nearly his first language. Though he sometimes had difficulty expressing himself, he used English like an ordinary person the vast majority of the time he used it.
 Erdős, like many great mathematicians, was a phenomenal amphetamine addict. As any longtime user (mathematician or otherwise) will tell you, speed tweaks your brain.
Um, no, noooo he wasn't. He had ADHD. And amphetamine is a medicine for ADHD.There is some speculation as to whether or not this is true. Additionally this article suggests that his use of amphetamine began shortly after his mother's death, beginning after he had tried antidepressants for a time.
 According to The Other Wiki, Erdős was bet a sum of money by a fellow mathematician that he couldn't give up the amphetamines for a month. He did, won the bet, and went right back to taking amphetamines, claiming that while he was abstaining, it destroyed his ability to do math ("Before, when I looked at a piece of blank paper my mind was filled with ideas. Now all I see is a blank piece of paper.").
 Georg Cantor, a little bizarre to begin with, ended up spending much of his last years in sanatoriums  still trying to correlate the various orders of infinity.
 Well, to be fair, his being hospitalized a couple of times did also have to do with the death of his son and him being viciously attacked by fellow mathematicians who just did not understand his ideas. Anyone would suffer from depression and mental breakdown when his achievements fail to gain the credit they deserve, regardless of the discipline one is working in. That is to say, it was probably not the math in itself that was responsible for Georg Cantor's problems with mental sanity.
 Lewis Carroll was a mathematician. Coincidentally, he also allegedly suffered from epilepsy and a rare condition that causes a person to perceive the size of objects incorrectly which is actually named after Alice in Wonderland. His background as a mathematician and logician, as well as his experiences with mental illness, were the inspiration to some of the more cerebral elements of his writing. Drugs on the other hand, not so much.
 In fact, the Wonderland series was an attack on the "new mathematics" coming into vogue in Carroll's time. This included such things as imaginary numbers, abstract algebras, nondecimal bases, and limits. As usual, TOW has something to say on the subject.
 The mathematicians of Dangerous Knowledge (including the aforementioned Georg Cantor) went mad trying to figure out infinity.
 In his later years, Kurt Gödel began to suffer mental instability, to the point where he started to think someone was trying to poison him and asked his wife, Adele, to taste every meal he ate. When Adele was hospitalized, Gödel refused to eat anything, eventually dying.
 The introductory historyofthefield segment of Advanced Logic classes seem to go: Brilliant Theorist > Spectacular Achievement/Contribution > Insanity > Bizarre Death > Rinse and Repeat. It instills some serious trepidations about entering the discipline.
 John Nash.
 Nikola Tesla was brilliant at math. He was also nuts. Luckily, he wasn't evil or violent.
 Though, he did claim to have designed a Death Ray capable of obliterating any target on Earth at the drop of a hat. Presumably the only reason he didn't take over the world was that investors weren't sure what place they would have in Tesla's New Order.
 He also claimed that his resonator could cause earthquakes, and at one point calculated that if he ran it for long enough, it would shake the earth into pieces. He commented "I considered this an undesirable outcome and switched it off." See? Not crazy at all.
 Though, he did claim to have designed a Death Ray capable of obliterating any target on Earth at the drop of a hat. Presumably the only reason he didn't take over the world was that investors weren't sure what place they would have in Tesla's New Order.
 In the text the first page quote came from, Chesterton attributed Poe's madness to his obsession with math puzzles instead of poetry.
 Grigori Perelman: settled the Poincare Conjecture, one of the most important problems facing mathematics. There's a million dollar bounty on the problem, plus he's guaranteed a spot in any university, plus book and lecture rights. He turned down all of it and chooses to live with his mom on her pension.
 This also has to do with his hatred of the current mathematical community, and the associated cultures. He isn't insane, just angry, and considers himself retired from academic mathematics.
 Andrew Wiles (the man who finally proved Fermat's Last Theorem) claims that he'd probably have gone mad from the effort of doing so, if he hadn't made time to play with his children every day.
Attention, you factoring Hectopascals! (It's x 2)DIE!!