(CNN) What motivated the man who killed two people on a Portland train after shouting anti-Muslim slurs?

What prompted the person, or people, who spray-painted the N-word on an NBA star's home

What ideas would incite an Israeli teen charged with threatening dozens of Jewish centers in the US, throwing communities into chaos and terrifying the parents of young children?

We call them all "hate crimes," as if the same motivation lurks behind each of these disparate incidents. But that term is outdated and inaccurate, experts say.

What spurs offenders into action is rarely animosity alone. It's a toxic mix of emotions, from anger to fear to indignation. And, as the FBI says , "hate itself is not a crime." Instead, bias is considered an "added element" to offenses like murder, arson and vandalism, leading at times to longer prison sentences.

The public and prosecutors often disagree on what constitutes a hate crime. Besieged minorities like Muslims and transgender people often see an assault on one of them as an attack on their entire community, especially in this era of intense rancor and fear. Between the November election and February, for instance, the Southern Poverty Law Center counted more than 1,300 "hate incidents" across the country.

But how do prosecutors determine the role hate had in a given crime? For more than two decades, the FBI and other law enforcement agencies have relied on a somewhat obscure study to help spot bias in criminal offenses.

In 1993, Jack McDevitt and Jack Levin, two social scientists in Boston, examined 169 hate-crime case files at the Boston Police Department. They then interviewed victims, offenders and investigators. McDevitt and Levin found that there are four main kinds of hate crimes, ranging from thrill-seekers, the most common; to "mission-offenders," the rare but often lethal hardcore hatemongers.

Knowing the differences between the types of hate crimes -- and their motivations -- not only helps law enforcement better understand them, McDevitt said, it also helps find perpetrators and put them in prison. "If they know the motivation," he told CNN, "they know where to look."

Here are the four categories of hate-crimes, along with some examples, many of which are hypotheticals taken from the FBI's training manual on recognizing and collecting data on hate crimes:

Thrill-seeking

These hate crimes are often driven by an immature itch for excitement and drama. Think bored and drunk young men marauding through neighborhoods, mayhem on their minds.

Often there is no real reason for these crimes, experts say. They're committed for the thrill of it, and the victims are vulnerable simply because their sexual, racial, ethnic, gender or religious background differs from that of their attackers.

Often the attackers think society doesn't care about the victims -- or worse, will applaud their assault.

The attackers may be young, but they are dangerous. In McDevitt's study, 70% of these "thrill offenses" were assaults, including vicious beatings that put victims in the hospital.

That said, the attackers' animosity toward their victims, who are chosen at random, can be relatively low, which at least offers the opportunity for rehabilitation.

Examples: A group of teens breaks into an LGBT center, destroys property and scrawls anti-gay graffiti on the walls. A street gang assaults a Hindu man while yelling anti-Hindu epithets. A group of men viciously attack men leaving a well-known gay bar, yelling "Sissy!" and "Girlie-man!"

Defensive

In these hate crimes, the attackers sees themselves as "defending" their turf: their neighborhood, their workplace, their religion or their country.

Unlike thrill-seekers, who invade other neighborhoods and attack without warning, "defenders" target specific victims and justify their crimes as necessary to keep threats at bay. Many times, they are triggered by a particular event, such as a Muslim or black family moving into a new neighborhood.

Like thrill-seekers, the "defenders" show little or no remorse for their attacks and believe that most, if not all of society supports them but is too afraid to act.

"They honestly believe that what they're doing has some sort of communal assent," said Brian Levin, who leads the Center for the Study of Hate and Extremism at California State University, San Bernardino.

Examples: A group home for people with psychiatric disabilities is set on fire by a man heard to say, "I'll get rid of those crazies." A transgender woman is attacked near her home by men who yell, "We don't want no queers in this neighborhood!" A Japanese man is attacked by a white man who called him an anti-Asian epithet and complained that the Japanese are taking jobs away from Americans.

Retaliatory

These hate crimes are often seen as revenge, whether in response to personal slights, other hate crimes or terrorism.

The "avengers," who often act alone, target members of the racial, ethnic or religious group who they believe committed the original crime -- even if the victims had nothing to do with it. They care only about revenge, and they will travel to the victims' territory to enact it.

These eye-for-an-eye attacks spike after acts of terrorism, a bitter backlash that often targets Muslim Americans. After the 9/11 attacks, for example, hate crimes against Arabs and Muslims rose by 1,600%. A similar spike occurred after the Paris attacks in 2015.

Occasionally, members of the same religion or racial group target each other.

Ohio prosecutors, for example, charged members of a breakaway Amish sect with hate crimes after they violently cut off the beards of a rival sect. An appeals court overturned the hate crimes conviction, though, ruling that religion had been a significant but not prime motivation behind the assaults.

Examples: A woman fires gun shots into the men's locker room of a fitness center, saying she hates men for rejecting her. Hours after Islamic extremists launch a terrorist attack in Europe, someone defaces an American mosque with graffiti that says "Go home, terrorists!"

Mission offenders

These are the deadliest -- and rarest -- types of hate crimes. They are committed by people who consider themselves "crusaders," often for a racial or religious cause. Their mission: total war against members of a rival race or religion. They are often linked to groups that share their racist views.

Mission offenders write lengthy manifestos explaining their views, visit websites steeped in hate speech and violent imagery, and travel to target symbolically significant sites while seeking to maximize carnage.

"Mission offenders believe that the system is rigged against them, which means that they can justify excessive violence against innocents," said Levin.

These hate crimes can look a lot like terrorism, and scholars say mission offenses often overlap both definitions, as in the case of a Muslim man who killed 49 people at a gay nightclub in Orlando last year. Former President Barack Obama called the massacre both "an act of terror and an act of hate."

Examples: Mission offenders tend to become infamous. According to criminologists, they include Oklahoma City bomber Timothy McVeigh, Charleston church shooter Dylan Roof and Omar Mateen, who massacred 49 people at gay nightclub in Orlando.

What can be done?

McDevitt acknowledges limits to these categories. Crimes rarely fit cleanly into one or the other. "Some people have multiple motivations. They may feel 'defensive,' but also that it's fun to go and harass someone."

Edward Dunbar, a psychologist who has written widely about hate crimes, said the categories are valuable for training police and prosecutors but can't predict or prevent bias-motivated attacks.

"To assess patterns of violence, or look at issues like capacity to benefit from rehabilitation, or to consider the evidence of premeditation, the typology is not the way to go."

Still, the categories help communities learn how to respond to hate crimes, McDevitt and other experts say.

Many hate-crime offenders believe that society supports their violent prejudices. The Internet, with its hives of hate groups, has fed that feeling, especially with the ascendancy of the alt-right during the 2016 presidential election.

It's crucial for communities -- and politicians -- to clearly and unequivocally condemn hate crimes. McDevitt said that when he interviewed victims, they tended to want three things:

1) A statement from public officials denouncing the crime and the beliefs that inspired it.

2) For law officers to take the crime -- and their duty to protect the vulnerable -- seriously.

3) For communities to value them and make clear they don't share the animosity that triggered the hate crimes.

In other words, behind every hate crime is a message: You are not welcome here.

Behind every strong community is another: Yes, you are.