I spent much of this politically momentous week at a workshop on inequality, where papers were presented on everything from the causes of wage disparities to the effects of inequality on happiness. As so often happens at conferences, however, what really got me thinking was a question during coffee break: “Why don’t you talk more about horizontal inequality?”

What? Horizontal inequality is the term of art for inequality measured, not between individuals, but between racially or culturally defined groups. (Of course, race itself is mainly a cultural construct rather than a fact of nature — Americans of Italian or even Irish extraction weren’t always considered white.) And it struck me that horizontal thinking is what you need to understand what went down in both parties’ nominating seasons: It’s what led to Donald Trump, and also why Hillary Clinton beat back Bernie Sanders. And like it or not, horizontal inequality, racial inequality above all, will define the general election.

You can argue that it shouldn’t be that way. One way to think about the Sanders campaign is that it was based on the premise that if only progressives were to make a clear enough case about the evils of inequality among individuals, they could win over the whole working class, regardless of race. In one interview Mr. Sanders declared that if the media was doing its job, Republicans would be a fringe party receiving only 5 or 10 percent of the vote.

But that’s a pipe dream. Defining oneself at least in part by membership in a group is part of human nature. Even if you try to step away from such definitions, other people won’t. A rueful old line from my own heritage says that if you should happen to forget that you’re Jewish, someone will remind you: a truth reconfirmed by the upsurge in vocal anti-Semitism unleashed by the Trump phenomenon.