A dorsal fin is a fin located on the back of most marine and freshwater vertebrates within various taxa of the animal kingdom. Many species of animals possessing dorsal fins are not particularly closely related to each other, though through convergent evolution they have independently evolved external superficial fish-like body plans ideal for their marine environments, including most numerously fish, but also mammals such as cetaceans ( whales, dolphins, and porpoises), and even extinct ancient marine reptiles such as various known species of ichthyosaurs. Most species have only one dorsal fin, but some have two or three.
Wildlife biologists often use the distinctive nicks and wear patterns which develop on the dorsal fins of large cetaceans to identify individuals in the field.
The bony or cartilaginous bones that support the base of the dorsal fin in fish are called pterygiophores.
The main purpose of the dorsal fin is to stabilize the animal against rolling and to assist in sudden turns. Some species have further adapted their dorsal fins to other uses. The sunfish uses the dorsal fin (and the anal fin) for propulsion. In anglerfish, the anterior of the dorsal fin is modified into a biological equivalent to a fishing pole and a lure known as illicium or esca. Many catfish can lock the leading ray of the dorsal fin in an extended position to discourage predation or to wedge themselves into a crevice. Some animals have developed dorsal fins with protective functions, such as spines or venom. For example, both the spiny dogfish and the Port Jackson shark have spines in their dorsal fins which are capable of secreting venom.
Most fish, like this Prussian carp, have one dorsal fin
Sharks typically have two dorsal fins
The yellowfin tuna also has two dorsal fins
Haddocks have three dorsal fins
Billfish have prominent dorsal fins. Like tuna, mackerel and other scombroids, billfish streamline themselves by retracting their dorsal fins into a groove in their body when they swim.  The shape, size, position and colour of the dorsal fin varies with the type of billfish, and can be a simple way to identify a billfish species. For example, the white marlin has a dorsal fin with a curved front edge and is covered with black spots. The huge dorsal fin, or sail, of the sailfish is kept retracted most of the time. Sailfish raise them if they want to herd a school of small fish, and also after periods of high activity, presumably to cool down.  
Large retractable dorsal fin of the Indo-Pacific sailfish
Various species of Ichthyosaurs displaying different types of dorsal fins
A dorsal fin is classified as a medial, unpaired fin that is located on the midline of the backs of some aquatic vertebrates. In development of the embryo in teleost fish, the dorsal fin arises from sections of the skin that form a caudal fin fold.  The larval development and formation of the skeleton that support the median fins in adults result in pterygiophores. The skeletal elements of the pterygiophore includes basals and radials. The basals are located at the base of the dorsal fin, and are closest to the body. The radials extend outward from the body to support the rest of the fin.  These elements serve as attachment sites for epaxial muscles.  The muscles contract and pull against the basals of the pterygiophores along one side of the body, which helps the fish move through water by providing greater stability.  In these types of fish, the fins are made of 2 main components.  The first component is the dermal fin rays known as lepidotrichia, and the endoskeletal base with associated muscles for movement is the second. 
Dorsal fin of a perch showing the basals and radials of the pterygiophore that support the dorsal fin.
Closeup of the dorsal fin of a common dragonet
|Wikimedia Commons has media related to Dorsal fins.|
|Look up dorsal in Wiktionary, the free dictionary.|
- Aquatic Life of the World pp. 332–333, Marshall Cavendish Corporation, 2000. ISBN 9780761471707.
- Dement J Species Spotlight: Atlantic Sailfish (Istiophorus albicans) littoralsociety.org. Retrieved 1 April 2012.
- Lingham‐Soliar T (2005) "Dorsal fin in the white shark, Carcharodon carcharias: A dynamic stabilizer for fast swimming" Journal of Morphology, 263 (1): 1–11. doi: 10.1002/jmor.10207 pdf[ permanent dead link]
- Tohru, Suzuki (2003). "Differentiation of chondrocytes and scleroblasts during dorsal fin skeletogenesis in flounder larvae". Development, Growth & Differentiation. 45 (5–6): 435–448. doi: 10.1111/j.1440-169X.2003.00711.x. PMID 14706069.
- Barton, Michael (2007). Bond's Book of Fish (3rd ed.). The Thompson Corporation. pp. 37–39, 60–61.