Animal locomotion
In biomechanics, animal locomotion  is the study of how animals move. Not all animals move, but locomotive ability is widespread throughout the animal kingdom. As all animals are heterotrophs, they must obtain food from their environment. Some animals such as sponges are sessile, and move the fluid in which they live through their body (this is known as filter feeding). However, most animals must move around to find food, mate, and so forth. Ability to do so efficiently is therefore essential to their survival.
Locomotion requires energy to overcome friction and often gravity as well. In terrestrial environments gravity must be overcome, though the friction of air is much less of an issue (except for crawling animals like worms, for which friction is much higher). In aqueous environments however, friction (or drag) becomes the major challenge, with gravity being less of a concern. Although animals with natural buoyancy need not expend much energy maintaining vertical position, though some will naturally sink and must expend energy to remain afloat. Friction may also present a problem in flight, and the aerodynamically efficient body shapes of birds highlight this point. Flight presents a different problem from movement in water however, as there is no way for a living organism to have lower density than air.
Much of the study is an application of Newton's third law of motion: if at rest, to move forwards an animal must push something backwards.  Terrestrial animals must push the solid ground, swimming and flying animals must push against a fluid or gas (either water or air). 

# Classification
Animals move through a variety of fluids, such as water, air and mud. Some may move through more than one, such seals and otters. In some cases locomotion is facilitated by the substrate on which they move. Forms of locomotion include:

## Through a fluid medium

### Swimming
In the water staying afloat is possible through buoyancy. Provided an aquatic animals body is no denser than its aqueous environment, it should be able to stay afloat well enough. Though this means little energy need be expended maintaining vertical position, it makes movement in the horizontal plane much more difficult. The drag encountered in water is much higher than that of air, which is almost negligible at low speeds. Body shape is therefore important is efficient movement, which is essential for basic functions like catching prey. A fusiform, torpedo-like body form is seen in many marine animals, though the mechanisms they employ for movement are diverse. Movement of the body may be from side to side, as in sharks and many fishes, or up and down, as in marine mammals. Other animals, such as those from the class Cephalopoda, use jet-propulsion, taking in water then squirting it back out in an explosive burst. Others may rely predominantly on their limbs, much as humans do when swimming. Though life on land originated from the seas, terrestrial animals have returned to an aquatic lifestyle on several occasions, such as the fully aquatic cetaceans, now far removed from their terrestrial ancestors.

### Flight
Gravity is a major problem for flight through the air. Because it is impossibly for any organism to approach the density of air, flying animals must generate enough lift to ascend and remain airborne. Wing shape is crucial in achieving this, generating a pressure gradient that results in an upward force on the animal' body. The same principle applies to airplanes, the wings of which are also airfoils. Unlike aircraft however, flying animals must be very light to achieve flight, the largest birds being around 20 kilograms.. Other structural modifications of flying animals include reduced and redistributed body weight, fusiform shape and powerful flight muscles.
Rather than fly, some animals simply reduce their rate of falling by gliding. Flight has independently evolved at least four times, in the insects, pterosaurs, birds, and bats. Gliding has evolved on many more occasions. The advantage gliding provides to arboreal animals provides a bridge for the evolution of flight.

## On a substrate

### Terrestrial
Forms of locomotion on land include walking, running, hopping or jumping, and crawling or slithering. Here friction and buoyancy are not longer an issue, but a strong skeletal and muscular framework are required in most terrestrial animals for structural support. Each step also requires much energy to overcome inertia, and animals can store elastic potential energy in their tendons to help overcome this. Balance is also required for movement on land. Human infants learn to crawl first before they are able to stand on two feet, which requires good coordination as well as physical development. Humans are bipedal animals, standing on two feet and keeping one on the ground at all times while walking. When running, only one foot is on the ground at any one time at most, and both leave the ground briefly. At higher speeds momentum helps keep the body upright, so more energy can be used in movement. The number of legs an animal has varies greatly, resulting in differences in locomotion. Many familiar mammals have four legs; insects have six, while spiders have eight. Centipedes and millipedes have many sets of legs. Some have none at all, relying on other modes of locomotion.
Animals that crawl or slither must use more energy due to the higher friction levels. Earthworms crawl by a peristalsis, the same rhythmic contractions that propel food through the digestive tract. Snakes move differently, undulating from side to side or lifting and repositioning their scales.
Some animals are specialized for moving on non-horizontal surfaces. One common habitat for such climbing animals is in trees, for example the gibbon is specialized for arboreal movement , traveling rapidly by brachiation. Another case is animals like the snow leopard living on steep rock faces such as are found in mountains. Some light animals are able to climb up smooth sheer surfaces or hang upside down by adhesion. Many insects can do this, though much larger animals such as geckos can also perform similar feats.

### On water
While animals like ducks can swim in water by floating, some small animals move across it without breaking through the surface. This surface locomotion takes advantage of the surface tension of water. Animals that move in such a way include the water strider.  Water striders have legs that are hydrophobic, preventing them from interfering with the structure of water.  Another form of locomotion (in which the surface layer is broken) is used by the Basilisk lizard.

# Energetics
The energetics of locomotion involves the energy expenditure by animals in moving. Animals that swim expend less energy per unit of body mass per meter traveled. Flying animals expend more, however running terrestrial animals actually expend more energy for the distance traveled than those that fly. Flying animals use the most energy per unit time, however. This does not mean that an animal that normally moves by running would be a more efficient swimmer, however; these comparisons assume an animal is specialized for that form of motion. Another consideration here is body massheavier animals, though using more total energy, require less energy per unit mass to move. Physiologists generally measure energy use by the amount of oxygen consumed, or the amount of carbon dioxide produced, in an animal's respiration.
Energy consumed in locomotion is not available for other efforts, so animals have evolved to be highly efficient in movement. Having said that, some animals move through different environments, such as the mudskipper pictured above, so their movement will be below optimum for any given environment. In this case the optimum reached is a trade-off between the different forms of locomotion.