The six horses in a 2002 study were “known weavers.” When stabled alone, they swayed their heads, necks, forequarters, and sometimes their whole bodies from side to side. The behavior is thought to stem from the social frustration brought on by isolation. It can be seen in a small percentage of all stabled horses, and owners hate it—they think it causes fatigue, weight loss, and uneven muscle development, and it looks disturbing.

People had tried stopping the weaving by installing metal bars that limit a horse’s movement, but the study found that a different modification to the stable worked surprisingly well: a mirror. “Those horses with the mirror were rarely [observed] weaving,” the researchers reported. A later study even found that the mirror worked just as well as the presence of another horse.

Studies have shown that mirrors can improve the lives of a variety of laboratory, zoo, farm, and companion animals. Isolated cows and sheep have lower stress reactions when mirrors are around. With mirrors, monkeys alone or in groups show a healthy increase in social behaviors such as threats, grimaces, lip-smacking, and teeth chattering, and laboratory rabbits housed alone are also more active. Mirrors in birdcages reduce some birds’ fear.

But why? Other animals have a very different experience with mirrors than people do. According to the prevailing science, individuals of most species can’t recognize their reflections as themselves. The only known exceptions are humans, some great apes, and possibly dolphins, elephants, and magpies—all animals with high intelligence.

Gordon Gallup invented the test that shows whether an animal recognizes itself in the mirror: He marked primates’ faces and ears with dye and watched whether they used a mirror to investigate the spots. If they did, it revealed that the animals understood that the faces in the mirror were their own. But he thinks that most animals probably think of their reflections as another animal. The calming effect in some cases could come partly from the reflection’s apparent mimicking. “The animal confronting its own reflection in a mirror has complete control over the behavior of the image, and therefore the image is always attentive and ready to reciprocate when the animal is,” he and Stuart Capper wrote in 1970. In other words, the mirror image is sort of like a friend who always does exactly what you want.

Yet it does seem likely that some animals are intelligent enough to notice that there are differences between a reflection and a real animal—an animal in a mirror has no smell or sound, and for that matter, no body. Even fish may get that: Researchers have routinely used mirrors to test aggression levels in fish because fish are among the creatures that react fearfully to their mirror images. But a study published in May found that two out of three related cichlid species exhibited differing responses to a mirror image and to an actual live opponent. Another study found differences in brain gene expression levels depending on whether fish were meeting other fish or a mirror. “Clearly, the fish recognize something unusual about the mirror image and the differential brain response may reflect a cognitive distinction,” the authors write.

Whatever animals do conclude about the creature in the mirror, mirrors sometimes lead to bizarre (and unhelpful) behaviors. Many bird owners have horror stories of their male birds “mating” with their reflections and continuously masturbating. This mirror-image mate can also stimulate females to lay eggs, which can be dangerous for them because it depletes calcium, causing brittle bones and other health problems. Pair-bonding birds, like budgies, may bond with their mirror image and snub their owner. Mice feed less around mirrors, suggesting that mirrors may not be ideal companions for rodents, either.

When it comes to dogs and cats, reactions vary. The first mirror exposure can be hilarious, with the young animal trying to play or fight with its reflection—and ending up completely confused. Eventually most of them ignore or even avoid their reflections, although some dogs continue to growl when confronted with a mirror. But it’s clear that some pets, especially cats, continue to be entertained by their reflections, preening and performing acrobatics in front of the mirror, making it seem for all the world like they recognize themselves.

Though mirrors may provide comfort and entertainment, they are clearly not enough for most social animals. The most poignant example is a study of young monkeys raised with only mirrors for companionship. Not surprisingly, the monkeys displayed a sad mix of “autoeroticism, self-clasping, stereotypy, and bizarre posturing,” behaviors known as isolation syndrome. The same would be true for isolated cats, dogs, birds, and other pets. If you’ve got one, you know: They accept no substitute for the person you see in the mirror.