Here's the breakdown:
* Mammals are warm-blooded vertebrates that share several traits, including giving birth to live young, nursing their offspring with milk, and having hair or fur at some point in their lives.
* Dolphins are indeed mammals. They fulfill all the criteria above.
* However, they live in water because they evolved from land mammals. Millions of years ago, their ancestors adapted to a marine lifestyle.
Here's a simplified explanation of how that happened:
* Adaptation to water: Over time, their bodies changed to suit their new environment. Their limbs evolved into flippers, their tails became powerful for swimming, and they developed a streamlined body shape.
* Breathing air: Even though they live in the water, dolphins need to breathe air like other mammals. They have lungs and must surface regularly to take a breath.
* Maintaining body temperature: They have a layer of blubber to keep warm in cold water, another adaptation from their land-based ancestors.
In essence, dolphins are a great example of how evolution can lead to incredible changes in species, allowing them to thrive in diverse environments. They adapted to a life in the ocean while retaining their fundamental mammalian characteristics.