After the massacre at the Tree of Life synagogue in Pittsburgh, in which a white supremacist shot to death 11 people while screaming, “All Jews must die,” a Jewish girl in New York sent an anguished note to her mother. “I know I shouldn’t feel like I don’t have an answer to this question,” she wrote in a text message that was later shared on social media. “But why do people hate us?”

Her bafflement was understandable. Many people, of course, favor the groups they belong to and dislike groups they don’t belong to; that is the regrettable foundation of prejudice. But not all groups are disliked the same way: Why are some groups (such as homeless people) dismissed or neglected in a relatively steady stream of scorn, while other groups (such as Jewish people) are subjected to sudden waves of virulent, even exterminatory attacks?

For many decades psychologists conceived of prejudice as a one-dimensional antipathy: People love their “in-groups” and hate “out-groups.” But this us-versus-them approach failed to account for prejudice’s real-world complexities.

To better understand the various ways in which bigotry manifests, the psychologists Susan Fiske, Peter Glick and I developed a new theory of prejudice, one that focuses on the content of stereotypes of out-groups. We have found that how an out-group is stereotyped predicts how the prejudice against it gets expressed. This theory — tested over more than 20 years by us and others in hundreds of studies, with tens of thousands of participants, across many cultures — helps explain why anti-Semitism often erupts in such violent bursts.