We all know people at both ends of the empathy spectrum: the ones who will rush right over with a freshly baked lasagna when your cat dies and the ones who make you work until 9 p.m. on the night your kid has the solo in the seventh-grade musical. Typically, we’d call the latter Scrooge “coldhearted.” But the biology is wrong—it isn’t the heart that’s cold, it’s the brain.As with virtually every one of our biological functions, there’s a survival value in feeling empathy for others; teaming up with a community to get a job done is more advantageous than doing it alone.It’s more than just adaptation at play, though. It’s brain function. Our moral system is largely dependent on how connected we feel with others; the more connected we feel, the higher our degree of generosity and compassion.

Part of the biology comes from a phenomenon involving mirror neurons. Someone does something around you (yawns or crosses her arms) and you pick up on it and reflect the action back. Mirror neurons—like tiny, neurological cameras—record life as it happens. They’re how children learn and why you may pick up a southern accent after living a year on Louisiana. These neurons are found in various areas of the brain, and they fire in response to people’s actions.

When you see a person performing a certain action, you automatically want to simulate the action (closed circuits in the brain may prevent you from doing it, though). This applies to watching someone dance on “Dancing With the Stars” or serve an ace at the U.S. Open, which is why we can perform better after a real pro shows us the way.

Mirror neurons enabled the brains of our ancestors to majorly increase in size, because their learning (and hence survival) ability grew so dramatically. The cool thing is that the mirror neurons don’t fire only with yawning and other inconsequential bodily blurts; your mirror neurons also react to emotions, generating empathy.

When you see someone touched in a painful way, your own pain areas are activated; when you see a spider crawl up someone’s leg, you feel a creepy sensation because your mirror neurons are firing.

QUIZ: How Do You Act in Relationships?

Social emotions such as guilt, shame, embarrassment and lust are based on the uniquely human mirror neuron system found in the part of your brain called the insula. It’s why you feel sad in the face of tragedy; you can empathize with people who experience it. It’s what allows you to connect with other humans, and transcend your differences. Women appear to access this part of the brain more than men, especially during childbearing years.