Work is equal to the product of the force and the distance through which it produces movement.
Although both force and displacement are vector quantities, having both magnitude and direction, work is a scalar quantity, having only magnitude. If the force acts in a direction other than that of the motion of the body, then only that component of the force in the direction of the motion produces work. If a force acts on a body constrained to remain stationary, no work is done by the force. Even if the body is in motion, the force must have a component in the direction of motion. When there is no friction and a force acts on a body, the work done by the force is equal to the increase of the kinetic and potential energy of the body, since all the energy expended by the agency exerting the force must be gained by the body.