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 math; nonetheless, the correlation seems to exist.
- Moriaki-sensei from And Yet the Town Moves looks like your average Stern Teacher at first, but he takes Mathematics way too seriously.
- Gamble Fish's Heavy Abandi is revealed to be one of these. In specific, he believes to discover a message from God itself within his mathematics. He tests whether or not he should share his discovery with anyone by suicidal exploits in hopes of testing whether or not God would protect him, ultimately leading to his Start of Darkness when he's electrocuted and believes he came Back from the Dead.
- The third season has Hell Girl has one of the villains of the week, Mizuragi Shogo, a mathematician who is obsessed with Hell because the Hell Girl sent his mother to Hell. Eventually, he was able to prove the existence of Hell and used the knowledge to create a device to keep Ai's minions away he could meet her on his own terms. To that end, he used hypnosis to artificially create a grudge against Tsugumi, who by that point has given up on trying to stop Ai from taking souls and is resigned to her fate. Shogo, Ai, Ai's minions and Tsugumi all get a resounding You're Insane! from Yuzuki. Eventually, Shogo's assistant banishes him to Hell so that several children who had been orphaned by Shogo's earlier inventions wouldn't make the contract at the cost of their own souls.
- While he's not crazy in the usual sense, Daichi/Bastion Misawa of Yu-Gi-Oh! 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 Freak Out 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.
- Green Lantern and sentient 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.
- Fantastic Four: 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...
- Logicomix (written in part by a computer scientist) features a number of Real Life examples, although the authors are always sure to point out that the study of mathematics and logic has its uses as well.
- Discworld and The Big Bang Theory crossover The Many Worlds Interpretation, by A.A. Pessimal, sees a meeting of shining minds across worlds between Unseen University and Caltech. Sheldon Cooper proves to be a man who even the Unseen University Faculty come to view as eccentric and hard to deal with.note As noted below, theoretical physicians and mathematicians share a lot of common traits. These are enough to excite the appetitie of the dread, if dysfunctional, entity known on the Disc as the Shadowing Lemma, which devours the brain energies of mathematically-minded geniuses (and camels), leaving only a dribbling husk who is totally unable to interact in normal human society. note . Ponder Stibbons, assisted by HEX, has to find a way of destroying the Lemma lest one be loosed on Earth. Sheldon, unwittingly, becomes bait in a trap...
- Hilda's incarnation in Pokémon Reset Bloodlines litters her speech with lots of math speak, although she seems to prefer using math that a layman can easily understand. For example, when a boy glanced at her shorts, she said "My eyes are 44.7º up, boy."
- 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.
- π. 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.
- Sherlock Holmes: A Game of Shadows conflates Professor Moriarty's legitimate mathematical research with his criminal career, especially if you read any of the articles on the actual (non-evil) mathematicians the filmmakers consulted with in order to design his personal financial code.
- 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. (Some of the many adaptations place more emphasis on it, though.)
- John Givings from Revolutionary Road (see above).
- Mavolio Bent from 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 bye-bye and he embraced 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 this trope. 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. For what is probably the most obvious example, in "The Dreams in the Witch House" a brilliant young mathematician moves into said house precisely because of hints that its most infamous former inhabitant of over two hundred years ago might have possessed certain mathematical knowledge — notably about the geometry of space and time — not yet actually (re)discovered by modern science. It does not end well, partly because it turns out that said witch is actually still alive and still as nasty as ever.
- In Diamond Dogs, the explorers of a Big Dumb Object in a uninhabited system have been progressively replacing most of their body and augmenting their minds in order to pass the lethal mathematical and astrophysical tests to find out what lies in the center of the object. By the end of the novella, the explorers are full-body prosthetic dog-like creatures enshrouded in diamond armor, which are completely incapable of functioning in society due to their augments and mathematical oriented minds. The cyborg Mad Scientist who augmented proceeded to take himself apart piece by piece while the explorers were in the object to make sure that he couldn't undo his 'greatest work'
- In Murderous Maths, the pure mathematicians are affectionately portrayed as rather eccentric, to put it mildly. Professor Fiendish is more seriously insane, although he seems to be more of a Mad Scientist with a focus on maths.
- In John Frenchs Thousand Sons novels, the Chaos sorcerer Ignis is obsessed with the numerology of destruction. He perceives mathematical ratios and formulas in everything, from a persons posture, to the firing of a warships guns, to the shifting tides of the Warp. These formulas blend into a vast, constantly-changing pattern which allows him to predict outcomes with great (but not perfect) accuracy, precisely orchestrate magical rituals on a grand scale, and more. He also has difficulty understanding the emotions of others and prefers the company of robots to people.
- 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 Burkle in Angel was a gifted young physicist who got trapped in Another Dimension (more specifically, a demon-ruled, medieval-level 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.Fred: Not a lot. The trionic speechcraft formulation/modification has to alter the dynamic-reality sphere. Lutzbalm predicted it at Zurich in '89. Laughed him off the stage, although this slavery and degradation's no laughing matter. (suddenly laughs insanely for a minute and then abruptly stops) It's no Crug-grain and Kalla berry breakfast alright.Angel: ...she's been here a while.
- After rescuing her, she continued to write on her bedroom walls for a while. A couple years later she's running a lab where she starts writing equations on windows. The team thought she relapsed. She simply ran out of white board space.
- 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.
- 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.
- The unsub in the Criminal Minds episode "Derailed" had to take a few years off from his groundbreaking work on M-theory to be involuntarily committed due to his violent schizophrenia.
- Cassie in The Librarians 2014 has extreme mathematical abilities (she can calculate in seven dimensions in her head) and synesthesia which in combination can make her constantly repeat certain phrases or pass out under the load of too much information.
- Ned's math teacher in Ned's Declassified School Survival Guide is shown to be more than a little bit off her rocker. She uses a lot of the Mad Scientist tropes as well.
- Jennifer Goines in the 12 Monkeys TV series is a mathematical genius whom the main character Cole first meets when both of them are patients in the same closed psych ward for the criminally insane. Based on everything she does during the series, she was put there for a good reason.
- Sheldon Cooper in The Big Bang Theory is a theoretical physicist rather than a pure mathematician. However, the two disciplines are closely related and as Sheldon demonstrates, their practitioners share a lot of the same (un)common quirks and eccentricities, right down to the multiple whiteboards full of symbols impenetrable to the outsider.
- 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
Every one of them is a splinter in my eye
I hate the Peano Space and the Koch Curve, I fear the Cantor Ternary Set
And the Sierpinski Gasket makes me want to cry
And a million miles away, a butterfly flapped its wings
On a cold November day, a man named Benoit Mandelbrot was born
- The World Ends with You has Sho Minamimoto, who shouts trigonometric functions when attacking, gives out missions like "Beat the bosses of 2.2360679's 0 + 5. t = 60 min."note , is the trope image for Mouthful of Pi and is also a complete psychopath.
- 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 2 DLC Minerva's Den has Reed Wahl, the co-inventor 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 One-Letter 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 Manchild Tyke Bomb designed to destroy Unova's political system so his Treacherous Advisor can take over, and convinced that Humans Are Bastards.
- OFF has Theme Naming in the attacks of all characters and most enemies. Guess what the attacks of the most powerful non-boss enemies, the Secretaries, are named after. The Zone 3 Secretaries Vertical Limit is easily the hardest-hitting attack in the game. The same Zone 3 Secretaries can also Divide By Zero, which doesn't cause a Reality-Breaking Paradox (maybe because reality is already broken) but can inflict some nasty status conditions.
- Kazuaki from Hatoful Boyfriend is a narcoleptic mathematician. And his calm exterior is a complete front - he's been mad with grief and desire for revenge ever since the death of his brother.
- Dive from Divekick dabbles in this, applying his talent for calculating angles to his divekicking, and the majority of his win and defeat quotes being math-related.
- In one episode, Kim Possible deals with a math-themed villain known as The Mathster. She quickly grew tired of his many, many math jokes.
- A quick short on Dexter's Laboratory had Major Glory fighting the Evil Math-Magician... with "Justice Fruit Pies, the delicious treat you'd have to be crazy to hate".
- In the Gravity Falls episode "Dungeons, Dungeons & More Dungeons", a magical "infinity-sided die" brings to life the eponymous tabletop game's flagship villain, the mighty math-wizard Probabilitor the Annoying.
- A recurring segment on HBO's Crashbox was "Psycho Math", hosted by a robot guy whose head would occasionally explode with numerals flying out of the top.
Attention, you factoring Hectopascals! (It's x 2)DIE!!