Shkrelinfreude? (AP Photo/Craig Ruttle)

Has the Internet ever been as excited about an arrest as it was for Martin Shkreli's? The (former) pharmaceutical mogul - as of Monday he's stepped down or been booted from both companies he led - is now facing securities fraud charges. But the public's seemingly universal joy had little to do with whatever justice he might face for these white collar crimes. Shkreli had inspired a wave of pure, unadulterated schadenfreude. Folks wanted to see bad things happen to the young executive.

If you know anything about Shkreli, this doesn't come as a surprise: He rose to fame recently when he bumped the price of one of his company's drugs up by more than 4,000 percent. His unapologetic (I mean really unapologetic) focus on profit over human well-being was shocking, to say the least. Reading about Shkreli was a little bit like finding out that the kid who'd pulled your hair and tortured ants in first grade was suddenly in charge of pricing lifesaving medication.

Meanwhile, Shkreli seemed determined to up his general grossness quotient, bragging about the luxury items he purchased for himself and flaunting arguably inappropriate online flirtations with underage women.

So yeah: Shkreli is the perfect person to launch a delightful wave of schadenfreude. But what even is that weird emotion, and where does it come from? Part joy, part envy, part self-righteousness - it's not necessarily a "good" feeling. But it feels great.

Luckily, there's been some pretty cool research on the subject. The most interesting studies focus on children. Since toddlers are relatively unspoiled by the larger influence of the outside world, the idea is that their basic emotional responses might reveal something about the origin of similar responses in adults. Sure, the competitiveness of the modern world might teach you to snicker as a rival stumbles, but is there first a basic instinct that compels us to find joy in this suffering?

That seems to be the case. A 2014 study found that children as young as 2 were likely to find joy in the misfortune of someone they saw as a rival. If you're wondering how to get a toddler to see another toddler as a "rival,"it's as simple as making them watch each other cuddle up with one another's moms. Children placed in this scenario were so pleased when they watched their nemeses endure mishaps that some even jumped up and down in glee, which sounds pretty similar to the whole Shkreli situation.

The kids were exhibiting the most understandable version of schadenfreude: a soothing balm for vicious green envy. Studies on adults have suggested that low self-esteem and a sense of inferiority can boost schadenfreude levels. I don't want to suggest that any of us are inferior to a certain pharma-bro but he is the sole owner of an exclusive, single-print Wu-Tang album. He's certainly tried to make us all feel inferior. And even if you don't see Shkreli as superior, per se, you probably see him as being quite different from yourself (if only because of that one Wu-Tang album). And surprise, surprise: That sense of "otherness" makes babies more likely to exhibit schadenfreude, too.

University of Kentucky psychologist Richard Smith explained to Nautilus Magazine that the evolutionary origins of schadenfreude are most likely entrenched in competitive envy.

"Let’s say you’re a guy and you’re in love with a woman, and that’s just a fact. But there’s another guy who’s also in love with this woman. She’s going to make a choice; it’s either you or him. If that rival suffers—falls into the mud puddle or whatever it might be—and is no longer a competitor, are you going to be sorry about that? You’re getting the girl. That’s good," Smith told Nautilus.

Of course, the only people who are direct rivals of Shkreli's are other people in the pharmaceutical industry (and maybe other New York guys on Tinder). If we want to feel good about feeling good about someone's bad luck when their misfortune doesn't actually benefit us, it's better to believe these sensations stem from some sense of justice. And to be fair, a sense of justice seems to be pretty inherent in humans: Experiments have shown that even young kids like to right wrongs they witness. But some researchers argue that this self-righteous schadenfreude might be a slippery slope: A 2009 study suggested that schadenfreude might cloud our judgement, leading us to judge others more harshly in order to justify our ugly pleasure over their suffering.

“You can imagine a kind of vicious circle,” researcher Colin W. Leach of the University of Connecticut told Scientific American in 2009. When it comes to rival groups, you might grow to “enjoy their suffering so much that maybe if the opportunity arises, you want to cause that suffering.” So while these feelings are perfectly natural, it's good to be honest with yourself about them - and to take a step back to think about the origin of your emotions.

But hey, it's hard to let go of schadenfreude. Some neurological studies have shown that the sensation actually lights up regions of the brain associated with pleasure. And according to one study that sought to identify "schadenfreude face," the emotion is physically indistinguishable from joy itself.

Read More:

You only need a one-question test to identify a narcissist

Scientists examine why men even exist

Is cheating more ‘natural’ for humans than staying monogamous? It’s complicated.

The sinister science of addiction

How have anti-evolution tactics evolved over time? They’ve gotten sneakier.

Study confirms that ending your texts with a period is terrible