The first thing to notice on this evogram is that hippos are the closest living relatives of whales, but they are not the ancestors of whales. In fact, none of the individual animals on the evogram is the direct ancestor of any other, as far as we know. That's why each of them gets its own branch on the family tree.

Hippos are large and aquatic, like whales, but the two groups evolved those features separately from each other. We know this because the ancient relatives of hippos called anthracotheres (not shown here) were not large or aquatic. Nor were the ancient relatives of whales that you see pictured on this tree  such as Pakicetus. Hippos likely evolved from a group of anthracotheres about 15 million years ago, the first whales evolved over 50 million years ago, and the ancestor of both these groups was terrestrial.

These first whales, such as Pakicetus, were typical land animals. They had long skulls and large carnivorous teeth. From the outside, they don't look much like whales at all. However, their skulls  particularly in the ear region, which is surrounded by a bony wall  strongly resemble those of living whales and are unlike those of any other mammal. Often, seemingly minor features provide critical evidence to link animals that are highly specialized for their lifestyles (such as whales) with their less extreme-looking relatives.

Skeletons of two early whales.

Compared to other early whales, like Indohyus and Pakicetus, Ambulocetus looks like it lived a more aquatic lifestyle. Its legs are shorter, and its hands and feet are enlarged like paddles. Its tail is longer and more muscular, too. The hypothesis that Ambulocetus lived an aquatic life is also supported by evidence from stratigraphy  Ambulocetus's fossils were recovered from sediments that probably comprised an ancient estuary  and from the isotopes of oxygen in its bones. Animals are what they eat and drink, and saltwater and freshwater have different ratios of oxygen isotopes. This means that we can learn about what sort of water an animal drank by studying the isotopes that were incorporated into its bones and teeth as it grew. The isotopes show that Ambulocetus likely drank both saltwater and freshwater, which fits perfectly with the idea that these animals lived in estuaries or bays between freshwater and the open ocean.

Isotopic analyses help us figure out the likely habitats of extinct whales like Ambulocetus.

Whales that evolved after Ambulocetus (Kutchicetus, etc.) show even higher levels of saltwater oxygen isotopes, indicating that they lived in nearshore marine habitats and were able to drink saltwater as today's whales can. These animals evolved nostrils positioned further and further back along the snout. This trend has continued into living whales, which have a "blowhole" (nostrils) located on top of the head above the eyes.

As whales evolved increasingly aquatic lifestyles, they also evolved nostrils located further and further back on their skulls.

These more aquatic whales showed other changes that also suggest they are closely related to today's whales. For example, the pelvis had evolved to be much reduced in size and separate from the backbone. This may reflect the increased use of the whole vertebral column, including the back and tail, in locomotion. If you watch films of dolphins and other whales swimming, you'll notice that their tailfins aren't vertical like those of fishes, but horizontal. To swim, they move their tails up and down, rather than back and forth as fishes do. This is because whales evolved from walking land mammals whose backbones did not naturally bend side to side, but up and down. You can easily see this if you watch a dog running. Its vertebral column undulates up and down in waves as it moves forward. Whales do the same thing as they swim, showing their ancient terrestrial heritage.

As whales began to swim by undulating the whole body, other changes in the skeleton allowed their limbs to be used more for steering than for paddling. Because the sequence of these whales' tail vertebrae matches those of living dolphins and whales, it suggests that early whales, like Dorudon and Basilosaurus, did have tailfins. Such skeletal changes that accommodate an aquatic lifestyle are especially pronounced in basilosaurids, such as Dorudon. These ancient whales evolved over 40 million years ago. Their elbow joints were able to lock, allowing the forelimb to serve as a better control surface and resist the oncoming flow of water as the animal propelled itself forward. The hindlimbs of these animals were almost nonexistent. They were so tiny that many scientists think they served no effective function and may have even been internal to the body wall. Occasionally, we discover a living whale with the vestiges of tiny hindlimbs inside its body wall.

Skeleton of the early whale Dorudon. Notice the tiny hind limbs at left below the tail.

This vestigial hindlimb is evidence of basilosaurids' terrestrial heritage. The picture below on the left shows the central ankle bones (called astragali) of three artiodactyls, and you can see they have double pulley joints and hooked processes pointing up toward the leg-bones. Below on the right is a photo of the hind foot of a basilosaurid. You can see that it has a complete ankle and several toe bones, even though it can't walk. The basilosaurid astragalus still has a pulley and a hooked knob pointing up towards the leg bones as in artiodactyls, while other bones in the ankle and foot are fused. From the ear bones to the ankle bones, whales belong with the hippos and other artiodactyls.

At left, the ankle bones of two middle Eocene protocetid archaeocetes, Rodhocetus balochistanensis (left) and Artiocetus clavis (right) from Pakistan, compared to those of the pronghorn Antilocapra americana (center).
At right, the ankle region and foot of Basilosaurus. The pulley part of the astragalus (outlined) connects to the tibia and fibula.