Tallying up all shootings and instances of school violence is difficult, researchers say; there's no official count, and various organizations differ in their definitions of school shootings.
For example, an open source database put together by Mother Jones suggests there have been 11 mass shootings (where four or more people died) in schools since the Columbine High School shooting in Colorado in 1999, and 134 children and adults died in those attacks.
Psychologists and law enforcement agencies have been analyzing how these sorts of multivictim attacks came to be, because of what they tell us about many other people who are at risk of becoming violent in schools and the ways we might intervene early, before anger becomes violence.
In the two decades since the Columbine High School shooting, researchers have learned a lot about school shooters. For one thing, many are themselves students, or former students, at the schools they attack. A significant majority tend to be teenagers or young adults.
"There's no one thing, [but] maybe a couple of dozen different things that come together to put someone on the path to committing an act of mass violence," says Peter Langman, a clinical psychologist in Allentown, Pa., and the author of two books and several studies about school shootings.
Multiple factors contribute in each case
Most shooters in these cases had led difficult lives, the studies find.
"Adolescent school shooters, there's no question that they're struggling and there have been multiple failures in their lives," says Reid Meloy, a forensic psychologist who has consulted with the FBI.
Many struggle with psychological problems, Meloy says.
"We know that mental health issues are very much in the mix," he says. "The child might be just, you know, very depressed. We also found in one of our early studies that you've got this curious combination of both depression and paranoia."
Studies by the FBI and the U.S. Secret Service have also found that many of the shooters were feeling desperate before the event.
"Whether or not they've been diagnosed, or whether or not they're severely mentally ill, something is going on that could [have been] addressed through some kind of treatment," says Langman.
But most never got that treatment.
The role of mental health problems
Mental health issues don't cause school shootings, Van Dreal emphasizes. After all, only a tiny, tiny percentage of kids with psychological issues go on to become school shooters.
But mental health problems are a risk factor, he says, because they can decrease one's ability to cope with other stresses. And studies have shown that most school shooters have led particularly stressful lives.
Many, though not all, of the perpetrators have experienced childhood traumas such as physical or emotional abuse, and unstable families, with violent, absent or alcoholic parents or siblings, for example. And most have experienced significant losses.
For example, the defendant in the case of the Parkland, Fla., shooting last year had lost his adopted mother to complications from the flu just a couple of months before the school attack. His adopted father had died when he was a little boy.
Feeling like an outcast at school may also play a role.
"A lot of these people have felt excluded, socially left out or rejected," says Van Dreal. Studies show that social rejection at school is associated with higher levels of anxiety, depression, aggression and antisocial behavior in children.
A 2004 study by the U.S. Secret Service and U.S. Department of Education found that nearly three-quarters of school shooters had been bullied or harassed at school.
Marginalized kids don't have anchors at school, says Van Dreal. "They don't have any adult connection — no one watching out for them. Or no one knows who they are anymore."
And the absence of social support at the school, Meloy says, is a big risk factor.
"People who do these kinds of targeted attacks don't feel very good about themselves, or where they're headed in their lives," says Van Dreal. "They may wish someone would kill them. Or they may wish they could kill themselves."
For example, Dylan Klebold, one of the perpetrators of the Columbine shooting, had been depressed and suicidal two years prior.
"About half of the school shooters I've studied have died by suicide in their attack," says Langman. "It's often a mix of severe depression and anguish and desperation driving them to end their own lives."
Of course, most people who feel suicidal don't kill others.
So what makes a small minority of kids who have mental health issues and thoughts of suicide turn to violence and homicide?
Meloy and Van Dreal think it's because these individuals had been struggling alone — either because they were unable to ask for help or their cries went unheard when the adults in their lives didn't realize the child needed support.
When despair turns to anger and a desire for revenge
When someone has been struggling alone for a while and failing, their despair can turn into anger, the researchers say.
"There's loss. There's humiliation. There's anger. There's blame," says Meloy.
That sort of anger can lead to homicidal thoughts, Van Dreal says.
They start out fantasizing about revenge, says Meloy.
"So the fantasy is one where the teenager starts to identify with other individuals who have become school shooters and have used violence as a way to solve their problem," he says.
These days, Meloy adds, it's easy for a troubled kid to go online and research how previous shooters planned and executed their attacks.
Easy access to guns — one of the biggest risk factors — then turns these fantasies into reality.
Psychologists say these attacks can be prevented — they are often weeks or months in the planning.
The keys to prevention are to spot the earliest behavioral signs that a student is struggling, Langman says, and also to watch for signs that someone may be veering toward violence.
Some signs can seem obvious in hindsight. "So, I've stopped being the kid who went to Boy Scouts, and church and loved his grandmother," Van Dreal says, "and now I want to be that kid with camouflage who's isolated and attacks people and hurts them."
But sometimes, even professionals who see the signs miss their significance.
About a year and a half before he attacked students at Columbine High School, Dylan Klebold, who was a gifted student, started to get into trouble.
He and some friends hacked into his school's computer system. Then, a couple of months later, he and his friend Eric Harris broke into a van and stole some equipment. They were arrested at that point and sent to a diversion program — an alternative to jail for first-time juvenile offenders — that offered counseling and required community service.
Sue Klebold, Dylan's mother and subsequent author of the book A Mother's Reckoning: Living in the Aftermath of Tragedy, tells NPR she was upset and concerned to see the sudden change in her son's behavior. She says she asked the diversion counselor if his behavior meant something and whether he needed a therapist. The counselor asked Dylan, and Dylan said no.
Sue Klebold says she never realized how deep the problem was.
"The piece that I think I failed [in] is, we tend to underestimate the level of pain that someone may be in," Klebold tells NPR. "We all have a responsibility to stop and think — someone we love may be suffering, may be in a crisis."
Beware pitfalls in the search for a solution
The solution, according to psychologists who study kids who become violent, isn't to expel or suspend a student like Dylan — though that is what happened to him in the fall of 1997, after he hacked into his school's computer system.
A student like that who's expelled "can now be bored, can be isolated at home, can be living in a dysfunctional family, and can be ruminating and thinking all the time about how he's going to avenge what has happened to him," says Meloy.
Eric Harris, who was Dylan Klebold's friend and fellow killer that day at Columbine, didn't seem depressed; he was self-absorbed, lacked empathy and was prone to angry outbursts, according to those who analyzed his journals and earlier behavior.
While Klebold's journals were "full of loneliness and depression," Langman says, the writings of Harris were "full of narcissism and rage and rants against people — a lot of contempt."
Harris' contempt extended to himself. Significant surgeries during his early teen years to correct a birth condition contributed to self-loathing, Langman's study of Harris' journal suggests.
"I have always hated how I looked," Harris wrote in his journal. "That's where a lot of my hate grows from." In his last journal entry, Harris refers to himself as "the weird looking Eric KID."
"Anyone contemplating getting a gun and killing people needs to be seen as a person in crisis," says Langman. "And that's why it's so important to reach out and connect with that individual."
Time and time again, psychologists and educators have found that surrounding a young person with the right kind of support and supervision early on can turn most away from violence.