Adult dragonflies typically only live for a few months, but many live for years as water-based larvae before emerging from the water. After hatching in the water, infant dragonflies feed on bugs and shed their skins multiple times before becoming large enough to crawl out of the water.
The habitat of the dragonfly affects its lifespan. Dragonflies prefer warm temperatures near lots of water. If the air is too cold or wet, they either hide in plants or fly south. Predators, such as spiders and frogs, can end a dragonfly's life quickly. However, the dragonflies' flying speed and hiding abilities offer protection.