Like hair, mammary glands are uniquely mammalian. These glands develop from distinctive mammary ridges running along both sides of the trunk of a mammalian embryo. Mammary glands are found in both sexes, but cease development in males well before puberty. A few other animals feed their young with a milk-like substance (such as the crop milk of pigeons), but in every case the origin of the "milk" is very different from mammals.
Mammary glands are probably highly modified sweat glands. We don't know when they first appeared in the evolution of vertebrates, but it may be reasonable to suggest that their origin was correlated with the development of milk teeth and the pattern of tooth replacement (diphyodonty) seen in most modern mammals. Milk teeth are probably not as efficient as adult teeth at chewing, due partly to their small size and partly to their ever-changing pattern of occlusion as the young mammal grows. This lack of efficiency is accommodated by reliance on a food that doesn't need to be chewed, milk. Evidence from the fossil record suggests that the earliest mammals probably were diphyodont, whereas late therapsids probably maintained the ancestral pattern of replacing teeth more than once.
Mammary glands are made up of a system of ducts surrounded by glandular tissue, which secretes milk. Milk formation is stimulated by the hormones prolactin and growth hormone; secretion of these hormones is in turn stimulated by the act of suckling. Mammary glands differ somewhat in form from species to species of mammals. Those of monotremes are simple aggregations of glandular tissue along the abdominal wall. Milk is secreted into depressions and is licked off of the fur by the young. In many species (e.g., humans), numerous ducts discharge separately to the surface of a fleshy protuberance called a nipple. In others (e.g., cows), the ducts secrete their milk into a common reservoir, which discharges to the outside via a single opening in a teat.
Mammary glands also differ in location and number. Some marsupials have up to 19 or 20 nipples, located in a pouch. Eutherians with large litter sizes have nipples arrayed in lines on each side of the body; in extreme cases, such as the African rat Mastomys, they run from the axillae (armpits) along the body to the sides of the thighs. Many mammals have a single pair, but among these the location varies. Manatees, for example, have a pair of axillary nipples; in humans, the nipples are pectoral; in horses, abdominal.
Milk contains high percentages of protein, fat, and sugars (especially lactose), and some amount of vitamins and salts. It is a very rich food source, which varies considerably among species in composition.
Phil Myers (author).