The simplest definition of mechanical work is the product of force and displacement, but force is a vector quantity and the displacement, in this case, has a direction, therefore, is also a vector quantity, and then, we can define the mechanical work as the product between two vectors, the force and the length.
To exist mechanical work, force has to move the point of force application and it doesn’t always act on the same path with the length, but sometimes it is tilted at an angle (example: you pull a sled with a rope).
Force, like any vector, it decomposes into two components, so that it is diagonal in the parallelogram formed. The force that is perpendicular to the length equals to the force that moves the point of application multiplied by the sine of the angle and does not perform mechanical work and force in road length, actually, is equal to the force that moves the point of application multiplied by the cosine of the angle. Now we can define the mechanical work as the scalar product of force and displacement.
When we say displacement, it is clear that we are referring to the move. The mechanical work is a scalar physical quantity, deduced fact from the mathematical relationship of the general formula, knowing that the scalar product of two vectors is a scalar and the module is equal to the product of the two vectors multiplied by the cosine of the angle between them. Having the formula of the module and seeing that it contains the trigonometric cosine function, it is enough to realize that we have to deal with a scalar.
Vector product of two vectors is anti-interchangeable and is also a vector. The resulting vector module value equals the modules of the two vectors multiplied together and multiplied it by the sine of the angle between the two vectors. So, the scalar multiplication shouldn’t be confused with the vector multiplication of two vectors.
Depending on the performance, the mechanical work is useful or consumed. Always the mechanical work consumed is greater than the mechanical work useful, because of the Joule effect. To move a body we spend energy. We must overcome the frictional forces that oppose the traction forces. A part of the energy is lost by heating the body. The body is heated more or less, faster or slower, depending on the material it is made.
The machine that converts energy into mechanical work is called engine. Do not understand that the energy can be consumed and then there will be no more energy. Energy is just one. Energy is a property of matter. It can not be created and it can not be destroyed. Energy, heat and mechanical work are “the same Marie but with a different hat”. The unit of measurement is common: the joule.