Rib
Ribs are classed as flat bones which usually have a protective role in the body. Humans have 24 ribs, in 12 pairs. All are attached at the back to the thoracic vertebrae, and are numbered from 1–12 according to the vertebrae they attach to. The first rib is attached to thoracic vertebra 1 (T1). At the front of the body most of the ribs are joined by costal cartilages to the sternum. The ribs connect to the vertebrae with two joints, the costovertebral joints.
Evolution of mammals
The advanced cynodonts have very mammal-like rib cages, with greatly reduced lumbar ribs. This suggests that these animals had more developed diaphragms, were capable of strenuous activity for fairly long periods and therefore had high metabolic rates. On the other hand, these mammal-like rib cages may have evolved to increase agility. However, the movement of even advanced therapsids was "like a wheelbarrow", with the hindlimbs providing all the thrust while the forelimbs only steered the animal, in other words advanced therapsids were not as agile as either modern mammals or the early dinosaurs. So the idea that the main function of these mammal-like rib cages was to increase agility is doubtful.