← Back to Blog Biology

Herds, Hives, and Hierarchies: Why Animals Live Together

June 5, 2026 · 10 min

In 1963 and 1964, a doctoral student named William Donald Hamilton sat at a borrowed desk in the Galton Laboratory at University College London, writing on yellow paper, working out the algebra that would finally make sterile worker bees make sense. He was awkward, often overlooked, and convinced he was onto something his supervisors barely understood. What he produced was a short inequality, three letters and a greater-than sign, published in two brief papers in the Journal of Theoretical Biology in 1964, and those papers founded the genetical theory of social behavior, answering a question that had quietly haunted evolutionary biology for more than a century.

The question is easy to state and surprisingly hard to answer. A honeybee colony contains tens of thousands of workers, every one a female who will never lay an egg of her own. They build the comb, feed the larvae, forage for nectar, and defend the hive to the death, all without reproducing. If natural selection rewards reproductive success, how could it ever have produced an animal that gives up reproduction entirely? Why, more broadly, do so many animals live together in herds, hives, and ranked hierarchies, often paying real costs to help others? This article follows the line of thinking, from Darwin's confessed difficulty to Hamilton's rule and beyond, that explains why animals cooperate at all.

The One Special Difficulty That Nearly Sank a Theory

When Charles Darwin published On the Origin of Species in 1859, he was honest about where his argument felt weakest. The sterile castes of social insects, the worker bees and worker ants and worker termites that never reproduce, struck him as "one special difficulty, which at first appeared to me insuperable, and actually fatal to my whole theory." Natural selection works by differential reproduction, so traits that help an individual leave more offspring spread while traits that hinder reproduction disappear. A worker bee leaves no offspring at all. By the plain reading of his own theory, sterility should be selected away instantly, and yet entire colonies are built on it.

Darwin glimpsed the shape of an answer, suggesting that selection might act on the family as a whole rather than on each insect individually, so that a colony producing useful sterile workers could outcompete a colony that did not. He lacked the genetics to make this precise, but the intuition pointed in the right direction, and the puzzle sat unresolved for a hundred years until someone supplied the missing arithmetic.

Three Letters That Reorganized a Field

That someone was Hamilton, and his answer is now known as Hamilton's rule. It states that a gene predisposing its bearer to help others will spread through a population when r·B > C. The letter r is the coefficient of relatedness between the actor (the helper) and the recipient (the helped), a number measuring the probability that the two share a given gene by descent. The letter B is the fitness benefit to the recipient, counted in extra offspring, and C is the fitness cost to the actor, the offspring it gives up by helping. When the benefit to a relative, discounted by how closely related that relative is, outweighs the cost to oneself, the helping gene wins.

The conceptual leap hidden inside this inequality is that an organism can pass on copies of its genes in two ways: it can reproduce directly, or it can help relatives reproduce, since relatives carry copies of the same genes. A bee that helps its mother produce a hundred sisters can propagate its own genes far more effectively than by laying a few eggs of its own. Biologists call the combined total, an individual's own reproduction plus the reproduction it enables in relatives, weighted by relatedness, its inclusive fitness, and Hamilton's insight was that natural selection maximizes it. Once you accept that, the sterile worker stops being a contradiction and becomes a good Darwinian strategy.

Why Sister Bees Are Closer Than Mother and Daughter

The genetics turn out to be even more favorable than this, and the reason lies in a quirk of how bees, ants, and wasps inherit their genes. These insects belong to the order Hymenoptera, and they reproduce through a system called haplodiploidy: males develop from unfertilized eggs and are haploid, carrying only a single set of chromosomes, while females develop from fertilized eggs and are diploid, carrying two sets, one from each parent. This asymmetry has a strange consequence for how closely sisters are related.

When a queen mates with a single male, every one of her daughters receives an identical copy of that father's entire genome, because the haploid father has only one set of chromosomes to give. On the mother's side, two sisters share half their genes on average. Add the fully shared paternal contribution to the half-shared maternal one and the relatedness between full sisters comes out to 0.75, against the standard 0.5 between a mother and her own daughter, so a worker bee is more closely related to her sisters than to her own offspring. Hamilton spotted this in 1964 and read it as the key to the whole phenomenon: in a haplodiploid species, helping your mother raise more sisters can be a better genetic bet than reproducing yourself, exactly the precondition Hamilton's rule requires. Haplodiploidy is not the only road to insect societies, since termites manage it without, but as a piece of arithmetic that made the puzzle click, the 0.75 figure was electric.

Eusociality and the Most Cooperative Animals on Earth

The bees, ants, and termites that take cooperation to its limit fall into a category that the biologist Edward O. Wilson defined with precision. In The Insect Societies (1971) and Sociobiology: The New Synthesis (1975), he laid out three diagnostic features that together define eusociality, the most extreme form of social organization known: overlapping generations living together in the same colony, cooperative care of the young so that individuals tend offspring that are not their own, and a reproductive division of labor in which a fertile caste reproduces while a sterile or near-sterile worker caste does the labor.

Honeybees, ants, and termites all meet these criteria, and so, remarkably, does a mammal. The naked mole-rat, a nearly blind, hairless rodent that lives in underground tunnel systems in East Africa, runs its colony on the same principles, with a single breeding queen, a handful of breeding males, and dozens of non-reproductive workers who dig, forage, and defend. A colony of this kind is a network of specialized parts that combine into a single coherent whole, and the logic echoes something far smaller: inside a eukaryotic cell, the cytoskeleton uses three filament systems together with a centrosome to give the cell its shape, movement, and ability to divide. Cooperation among specialized parts to build a functioning whole is an architectural theme that life returns to at every scale.

When Strangers Help Strangers

Kinship explains a great deal, but it cannot explain everything, because animals sometimes cooperate with individuals they are not related to at all. In 1971, a Harvard graduate student named Robert Trivers asked what happens when two unrelated animals could each benefit from helping the other. His paper "The Evolution of Reciprocal Altruism," published in the Quarterly Review of Biology in March 1971, supplied the answer: cooperation between non-relatives can evolve provided that the interactions are repeated over time and that individuals can recognize and remember who has cooperated with them before. The helper pays a cost now in the expectation of a return later, and the system holds together only because cheaters who take without giving can be spotted and cut off.

The textbook case is the vampire bat. These bats feed on blood and can starve within a few days if they fail to find a meal, but a bat that has fed successfully will often regurgitate part of its meal to a roost-mate that has not. The sharing tracks need rather than kinship, and the bats preferentially return favors to those that have helped them before, exactly the pattern of repeated, partner-specific exchange that Trivers's theory predicts. Reciprocity adds a second route to cooperation, one that depends not on shared genes but on memory, recognition, and the shadow of future encounters.

Pecking Orders and the Quiet Economics of Conflict

Living together creates a problem that cooperation alone does not solve: competition over food, mates, and space. If every conflict had to be settled by fighting, the costs in injury and energy would be ruinous, and the way animals economize was first described carefully in a barnyard. In 1922, a Norwegian zoologist named Thorleif Schjelderup-Ebbe completed his doctoral dissertation at the University of Oslo on the social behavior of domestic chickens. He noticed that the hens arranged themselves into a stable linear ranking, with each bird able to peck those below it and obliged to yield to those above, and he gave it a name that has stuck in everyday language, Hackordnung, the pecking order.

The same logic recurs across the vertebrates, from wolves to primates to reef fish. A dominance hierarchy reduces costly fighting by establishing predictable winners and losers in advance, so that most disputes are settled by a glance or a posture rather than a brawl, since neither animal gains from a fight whose outcome is already clear. A hierarchy in this reading is not simply a ladder of bullies and victims but a conflict-reduction system, a way of making the unavoidable competition of group life cheaper for everyone.

Genes, Groups, and What Altruism Really Means

Hamilton's framework did not win unopposed. Through the 1960s a rival idea, group selection, held wide currency, championed by the ecologist Vero Wynne-Edwards in 1962. It proposed that animals restrain themselves for the good of the species, regulating their own breeding to avoid exhausting resources, whereas kin selection held that animals act not for the good of the species but for copies of their own genes carried in their relatives. By the 1970s the evidence had swung decisively toward kin selection, because "for the good of the species" turns out to be vulnerable to any selfish individual who breeds freely while others hold back. The idea was later refined rather than reversed, since the biologist David Sloan Wilson rehabilitated multilevel selection as a mathematically equivalent reframing, but the naive version of group selection did not survive.

One last point clears up the most common misunderstanding. Students meeting Hamilton for the first time tend to assume that altruism is a moral idea, a matter of kindness or generous feeling, but in evolutionary biology the word has a precise and unsentimental meaning: an altruistic behavior is one that reduces the actor's own lifetime reproductive fitness while increasing the recipient's, with intentions and emotions left entirely out of the definition. A worker bee is an altruist in this technical sense whether or not it feels anything at all about its sisters. This same inclusive-fitness logic, John Maynard Smith and Eors Szathmary argued in The Major Transitions in Evolution (1995), runs through the deepest events in the history of life, from genes that combined into chromosomes to single cells that aggregated into multicellular bodies to humans who built societies on shared language. Cooperation, properly understood, is one of evolution's great recurring inventions.

Key Takeaways

Animals live together because cooperation, under the right conditions, pays off in the only currency natural selection counts, which is genes passed to the next generation. Darwin flagged sterile worker insects as a near-fatal difficulty in 1859, and W. D. Hamilton resolved it in 1964 with the rule r·B > C, showing that a helping gene spreads when the relatedness-weighted benefit to a relative exceeds the cost to the helper, because relatives carry copies of the same genes and inclusive fitness counts the reproduction one enables in others. Haplodiploidy sharpens the bargain in bees, ants, and wasps, giving full sisters a relatedness of 0.75 against the 0.5 between mother and daughter, and it helped drive eusociality, which E. O. Wilson defined through overlapping generations, cooperative brood care, and a reproductive division of labor, and which appears in honeybees, termites, and naked mole-rats. Among non-relatives, cooperation can still evolve through reciprocity, as Robert Trivers showed in 1971 and vampire bats demonstrate, while dominance hierarchies like Schjelderup-Ebbe's pecking order cut the cost of group living by settling conflicts before they turn violent. Kin selection won out over naive group selection, altruism here means a fitness-reducing act rather than a moral one, and the same logic structures the major transitions that built complexity across the history of life.

Learn more with Mindoria

Bite-sized lessons, spaced repetition, and live PvP trivia battles. Free on Android.

Download Free