Bees are flying insects closely related to wasps and ants, known for their role in pollination and, in the case of the best-known bee species, the western honey bee, for producing honey and beeswax. Bees are a monophyletic lineage within the superfamily Apoidea and are presently considered a clade, called Anthophila. There are nearly 20,000 known species of bees in seven recognized biological families.[1][2]They are found on every continent except Antarctica, in every habitat on the planet that contains insect-pollinated flowering plants.

Some species including honey bees, bumblebees, and stingless bees live socially in colonies. Bees are adapted for feeding on nectar and pollen, the former primarily as an energy source and the latter primarily for protein and other nutrients. Most pollen is used as food for larvae. Bee pollination is important both ecologically and commercially; the decline in wild bees has increased the value of pollination by commercially managed hives of honey bees.

Bees range in size from tiny stingless bee species whose workers are less than 2 millimetres (0.08 in) long, to Megachile pluto, the largest species of leafcutter bee, whose females can attain a length of 39 millimetres (1.54 in). The most common bees in the Northern Hemisphere are the Halictidae, or sweat bees, but they are small and often mistaken for wasps or flies. Vertebrate predators of bees include birds such as bee-eaters; insect predators include beewolves and dragonflies.

Human beekeeping or apiculture has been practised for millennia, since at least the times of Ancient Egypt and Ancient Greece. Apart from honey and pollination, honey bees produce beeswax, royal jelly and propolis. Bees have appeared in mythology and folklore, through all phases of art and literature, from ancient times to the present day, though primarily focused in the Northern Hemisphere, where beekeeping is far more common.

The ancestors of bees were wasps in the family Crabronidae, which were predators of other insects. The switch from insect prey to pollen may have resulted from the consumption of prey insects which were flower visitors and were partially covered with pollen when they were fed to the wasp larvae. This same evolutionary scenario may have occurred within the vespoid wasps, where the pollen wasps evolved from predatory ancestors. Until recently, the oldest non-compression bee fossil had been found in New Jersey amber, Cretotrigona prisca of Cretaceous age, a corbiculate bee.[3] A bee fossil from the early Cretaceous (~100 mya), Melittosphex burmensis, is considered "an extinct lineage of pollen-collecting Apoidea sister to the modern bees".[4] Derived features of its morphology (apomorphies) place it clearly within the bees, but it retains two unmodified ancestral traits (plesiomorphies) of the legs (two mid-tibial spurs, and a slender hind basitarsus), showing its transitional status.[4] By the Eocene (~45 mya) there was already considerable diversity among eusocial bee lineages.[5][a]

The highly eusocial corbiculate Apidae appeared roughly 87 Mya, and the Allodapini (within the Apidae) around 53 Mya.[8] The Colletidaeappear as fossils only from the late Oligocene (~25 Mya) to early Miocene.[9] The Melittidae are known from Palaeomacropis eocenicus in the Early Eocene.[10] The Megachilidae are known from trace fossils (characteristic leaf cuttings) from the Middle Eocene.[11] The Andrenidaeare known from the Eocene-Oligocene boundary, around 34 Mya, of the Florissant shale.[12] The Halictidae first appear in the Early Eocene[13] with species[14][15] found in amber. The Stenotritidae are known from fossil brood cells of Pleistocene age.[16]

According to inclusive fitness theory, organisms can gain fitness not just through increasing their own reproductive output, but also that of close relatives. In evolutionary terms, individuals should help relatives when Cost < Relatedness * Benefit. The requirements for eusociality are more easily fulfilled by haplodiploid species such as bees because of their unusual relatedness structure.[27] In haplodiploid species, females develop from fertilized eggs and males from unfertilized eggs. Because a male is haploid (has only one copy of each gene), his daughters (which are diploid, with two copies of each gene) share 100% of his genes and 50% of their mother's. Therefore, they share 75% of their genes with each other. This mechanism of sex determination gives rise to what W. D. Hamilton termed "supersisters", more closely related to their sisters than they would be to their own offspring.[28] Workers often do not reproduce, but they can pass on more of their genes by helping to raise their sisters (as queens) than they would by having their own offspring (each of which would only have 50% of their genes), assuming they would produce similar numbers. This unusual situation has been proposed as an explanation of the multiple independent evolutions of eusociality (arising at least nine separate times) within the Hymenoptera.[29][30] However, some eusocial species such as termitesare not haplodiploid. Conversely, all bees are haplodiploid but not all are eusocial, and among eusocial species many queens mate with multiple males, creating half-sisters that share only 25% of their genes.[31] Haplodiploidy is thus neither necessary nor sufficient for eusociality. But, monogamy (queens mating singly) is the ancestral state for all eusocial species so far investigated, so it is likely that haplodiploidy contributed to the evolution of eusociality in bees.[29]