Forget for a minute everything you know about politics. Barack Obama now openly supports gay marriage. Mitt Romney now opposes roughly the same kind of health care reform he fought for as governor of Massachusetts. What if they weren’t two politicians calculating how to win an election but instead just two guys who changed their minds? They didn’t “flip-flop”; they experienced, as social scientists say, an attitude change, the way any of us do when we become a vegetarian or befriend a neighbor we used to hate or even just choose to buy a new brand of toothpaste.

Scientists have been studying attitudes and preferences for more than a century; those topics are bound to the origins of social psychology itself. Some of the earliest research, like William Thomas and Florian Znaniecki’s five-volume set, “The Polish Peasant in Europe and America,” published in 1918, revolved around the attitudes of immigrants: how they lived, what their neighbors thought of them, how they changed as they became Americans.

In the last decade, psychologists have focused increasing attention on moral attitudes. Jonathan Haidt, professor of psychology at the Stern School of Business at New York University and author of “The Righteous Mind,” told me that researchers have been especially interested in the way emotions and attitudes interact. Moral attitudes are especially difficult to change, Haidt said, because the emotions attached to those preferences largely define who we are. “Certain beliefs are so important for a society or group that they become part of how you prove your identity,” he said. “It’s as though we circle around these ideas. It’s how we become one.”

We tend to side with people who share our identity — even when the facts disagree — and calling someone a flip-flopper is a way of calling them morally suspect, as if those who change their minds are in some way being unfaithful to their group. This is nonsense, of course. People change their minds all the time, even about very important matters. It’s just hard to do when the stakes are high. That’s why marshaling data and making rational arguments won’t work. Whether you’re changing your own mind or someone else’s, the key is emotional, persuasive storytelling.