A rack and pinion is a type of linear actuator that comprises a circular gear (the pinion) engaging a linear gear (the rack). Together, they convert between rotational motion and linear motion: rotating the pinion causes the rack to be driven in a line. Conversely, moving the rack linearly will cause the pinion to rotate.
The rack and pinion mechanism is used in rack railways, where the pinion mounted on a locomotive or a railroad car engages a rack usually placed between the rails, and helps to move the train up a steep gradient. It is also used in arbor presses and drill presses, where the pinion is connected to a lever and displaces a vertical rack (the ram). In pipelines and other industrial piping systems, a rack displaced by a linear actuator turns a pinion to open or close a valve. Stairlifts, lock gates, electric gates, and the mechanical steering mechanism of cars are other notable applications.