“Great minds think alike,” goes the old saying. It’s a fun bromide to invoke when you and one of your friends come up with the same thought—no matter how profound or harebrained—at the same time. Now a newly published study suggests that it’s literally true: People who get along well share similar neural patterns. The closer two people are, the more their neurons fire in the same places. The research was published in Nature Communications.

Previous studies support the notion of homophily, that social ties form more easily among people of the same age, gender, ethnicity, and other demographic commonalities. But this new finding is something different, as it's based on the analysis of fMRI scans that show how we think.

The research involved 279 female students in the first year of a graduate program at a private U.S. university. (The study doesn’t say which one.) The women, aged 25-32, had been on campus for three to four months at the time of the study, and so had begun establishing social networks that were analyzed and documented by the neuroscientists. The women were asked in an online survey, “Consider the people with whom you like to spend your free time. Since you arrived at [institution name], who are the classmates you have been with most often for informal social activities, such as going out to lunch, dinner, drinks, films, visiting one another’s homes, and so on?” The researchers then mapped out the resulting social connections.

The students' social connections according to the study. (Parkinson, et al)

Forty-two of these students—signified by the orange dots in the illustration above—participated in the fMRI phase of the study in which each subject watched the same mix of video clips selected for their unfamiliarity, to simulate the effect of “channel surfing.” As the students watched the videos, the researchers watched their brains via fMRI scans in which activity in 80 brain areas of interest was tracked.

A comparison of the activity in a pair of subjects. (Parkinson, et al)

After studying the results and factoring for other variables, the study found that the more closely people were socially connected, the more neural activity they shared. People who were actually friends had the most in common, people who were friends-of-friends a little less, and people who were friends-of-friends-of-friends even less. At the fourth degree of separation, though, the similarities seemed to strengthen, but the researchers suggest this is just a reflection of instability in the data at such a remove, and not a true reflection of neural similarities.

One, two, three, and four degrees of separation. (Parkinson, et al)

This is just one study, of course, and it doesn’t address how on earth we identify those who think the same way we do. One might imagine it’s likely just trial and error: We happen to meet and then get along like a house on fire. But it looks like the reason we agree with our friends on so many things is that our brains arrived at our shared conclusions along the same neural pathways.