What is this thing called love? Cole Porter wasn’t the first to ask. From mystified poets to angst-ridden teens, the question of what exactly love is has troubled us since long before the master songwriter put pen to paper.

Now, though, scientists claim to have uncovered the secrets of how the emotion affects the brain, paving the way for the creation of a love test. By scanning the brains of men and women who said they were in love, and comparing them with people who had fallen out of love or never been in love, researchers say they have been able to piece together the first map of the changes that occur in the brain.

The use of a functional magnetic resonance imaging scan (fMRI), which measures brain activity by detecting changes in blood flow, showed that love involves a dozen areas of the brain, with one area – the caudate nucleus – dealing with the ending of a love affair. A cocktail of chemicals also carries messages from one region to another.

“Our study provides the first evidence of love-related alterations in the underlying architecture of the brain and the results shed new light on the mechanisms of romantic love,” said Professor Xiaochu Zhang of the University of Science and Technology of China in Hefei, who led the study, which is published in Frontiers in Human Neuroscience.

The researchers, who showed romantic lovers photographs of their partners while scanning their brains, say that the study has demonstrated the “possibility of applying a resting-state fMRI approach” for testing for romantic love, opening the way for fMRI tests to diagnose love.

The 100 men and women who were scanned either said they were intensely in love, or had recently ended a romantic relationship or had never had a romance. They were told to think of nothing during the scans, with the aim of seeing what changes occur in the brains of people in love and how the areas work together.

Results show that areas of the brain involved in reward, motivation, emotion, and social functioning are involved. The areas that were more active in the people in love included the dorsal anterior cingulate cortex, insula, caudate, amygdala, and nucleus accumbens, as well as the temporo-parietal junction, posterior cingulate cortex, medial prefrontal cortex, inferior parietal, precuneus, and temporal lobe.