Teeth can be formed on the outside as for external gears, or on the inside, as for internal gears. It is also possible to simply change the direction of motion. Torque is equal to force multiplied by the distance from the point of force application to the center of rotation. A small gear driving a large gear multiplies torque, while a large gear driving a small gear multiplies speed. Two external gears in mesh rotate in opposite directions, while an external and internal gear in mesh rotate in the same direction.
Gears can also convert rotary motion to linear motion by meshing with a toothed bar called a rack.
When large mechanical advantages are desired, many gears are meshed successively in a gear train. With the exception of some lever applications all of the devices discussed thus far have a constant mechanical advantage over their input cycle and are called linear machines, or linear mechanisms. The input cycle consists of a repetitive input such as a gear rotation or screw turn. There are also many machines, such as cams and linkages, where the mechanical advantage changes over the input cycle. These are called nonlinear mechanisms.