A flywheel is a mechanical device that stores energy in the form of rotational momentum. It uses the conservation of angular momentum to store rotational energy, which is a form of kinetic energy proportional to the product of its moment of inertia and the square of its rotational speed. The stored energy is directly associated with the square of its rotational speed, assuming the flywheels moment of inertia is constant. A flywheel is typically a heavy wheel attached to a rotating shaft that smooths out the delivery of power from a motor to a machine. The inertia of the flywheel opposes and moderates fluctuations in the speed of the engine and stores the excess energy for intermittent use. The energy stored in a flywheel depends on both the weight distribution and the rotary speed. A flywheel can be used to apply torque to any rotating object, most commonly machinery or motor vehicles. In the case of motor vehicles and other moving objects, the rotational inertia of the flywheel can have an effect due to gyroscopic motion, resisting a change in the direction of the vehicle. The energy stored inside a flywheel is related to the speed of its rotation and its moment of inertia.