Polar bears tend to live solitary lives except when mating, when a female raising her cubs forms a family group, or when many bears are attracted to a food source like a beached whale.