# W = mgh

In equations, the formula: $W = mgh \,$

is called the “gravitational work”, or potential energy, and is the work done by a force on a body of mass m, against the force of gravity g, when the mass is raised though a distance of height h or, conversely, the work done by the force of gravity on the rock, when the mass is lowered through a distance of height h.

Overview
In 1686, English physicist Isaac Newton, in his famed Principia, established his second law of motion: $F = ma \,$

which states that a force F acting on a body equals the product of the mass m of the body and the acceleration a of the body.

In 1784, French engineer Lazare Carnot published his Essay on Machines, which contained a statement that foreshadowed the principle of energy as applied to a falling weight.

In 1824, Lazare’s son, French physicist Sadi Carnot, in his famed Motive Power of Fire, the publication that launched the science of thermodynamics, defined ‘motive power’, or what is defined as ‘work’ in the modern sense, as “an effect likened to the elevation of a weight to a certain height, which has a measure of the product of the weight multiplied by the height to which it is raised; although, to note, he did not state this principle formulaically, but only mentions it in a footnote. 

In 1829, French physicist Gustave Coriolis, in his Calculation of the Effect of Machines, established the “principle of the transmission of work”, the foundation of the definition of work as force times distance, in rigorous mathematical format. The English translations for this work seem to be lacking, but the gist of Coriolis' derivation, which seems to use a certain amount of trigonometry and discussion of component forces, is the establishment of the the following equation: $W = Fd \,$

In 1875, German physicist Rudolf Clausius, in the the opening paragraph to the finalized version of his The Mechanical Theory of Heat, in "Mathematical Introduction" section, summarized the gist of Coriolis's work principle with the following terse statement:

“Whenever a body moves under the influence of a force, work is performed.”

This is the bedrock statement of the science of thermodynamics, the study of the relation between heat and work, as was captured previously in the opening paragraph to Sadi Carnot's Reflections, wherein he stated:

“Everyone knows that heat can produce motion and that to heat are due the vast movements which take place on the surface of the earth.”

These are huge statements which require a deep concerted amount of thought to see how this applies to human motion, in the sense that the force performs the work, not the person.

Derivation

Substitution of Newton's second law (1686) into Coriolis' work principle (1829) yields the following formula: $W = (ma)d \,$

If, then, in the case of a weight lifted through a height or conversely descended through a height, the distance d becomes a measure of height h, and the acceleration a becomes the gravitational acceleration of earth g, whereby with substitution: $W = mgh \,$

which is the stand formula for the calculation of gravitational work.

References
1. Carnot, Sadi. (1824). Reflections on the Motive Power of Fire: and on Machines Fitted to Develop that Power. Paris: Chez Bachelier, Libraire, Quai Des Augustins, No. 55.
2. (a) Coriolis, Gustave. (1829). Calculation of the Effect of Machines, or Considerations on the Use of Engines and their Evaluation (Du Calcul de l'effet des Machines, ou Considérations sur l'emploi des Moteurs et sur Leur Evaluation). Paris: Carilian-Goeury, Libraire.
(b) Coriolis, Gustave. (1844). Treatise on the Mechanics of Solid Bodies and Calculation of the Effect on Machines (Traité de la Mécanique des Corps Solides et du Calcul de l'effet des Machines) (section: Principle of the Transmission of Work in the Movement of a Material Point, pgs. 35-40). 2nd. Ed. Paris.