Potential energy
Potential energy can be thought of as energy stored within a physical system. This energy can be released or converted into other forms of energy, including kinetic energy. It is called potential energy because it has the potential to change the states of objects in the system when the energy is released.

# Overview
Potential energy is the energy that is stored. Potential energy exists when there is a force that tends to pull an object back towards some original position when the object is displaced. This force is often called a restoring force. The phrase 'potential energy' was coined by William Rankine. For example, when a spring is stretched to the left, it exerts a force to the right so as to return to its original, un-stretched position. Or, suppose that a weight is lifted straight up. The force of gravity will try to bring it back down to its original position. The initial steps of stretching the spring and lifting the weight both require energy to perform. According to the principle of conservation of energy, energy cannot be created or destroyed; hence this energy cannot disappear. Instead it is stored as potential energy. If the spring is released or the weight is dropped, this stored energy will be converted into kinetic energy by the restoring force  elasticity in the case of the spring, and gravity in the case of the weight.
The more formal definition is that potential energy is the energy of position, that is, the energy an object is considered to have due to its position in space. There are a number of different types of potential energy, each associated with a particular type of force. More specifically, every conservative force gives rise to potential energy. For example, the work of elastic force is called elastic potential energy; work of gravitational force is called gravitational potential energy, work of the Coulomb force is called electric potential energy; work of strong nuclear force or weak nuclear force acting on the baryon charge is called nuclear potential energy; work of intermolecular forces is called intermolecular potential energy. Chemical potential energy, such as the energy stored in fossil fuels, is the work of Coulomb force during rearrangement of mutual positions of electrons and nuclei in atoms and molecules. Thermal energy usually has two components: the kinetic energy of random motion of particles and potential energy of their mutual positions.
As a general rule, the work done by a conservative force F will be
where \Delta PE is the change in the potential energy associated with that particular force. The most common notations for potential energy are PE and U. It is important to note that electric potential (commonly denoted with a V for voltage) is not the same as electric potential energy.

# Gravitational potential energy
Gravitational energy is the potential energy associated with gravitational force. If an object falls from point A to point B inside a gravitational field, the force of gravity will do positive work on the object and the gravitational potential energy will decrease by the same amount.
For example, consider a book, placed on top of a table. When the book is raised from the floor to the table, the gravitational force does negative work. If the book is returned back to the floor, the exact same (but positive) work will be done by the gravitational force. Thus, if the book is knocked off the table, this work (called potential energy) goes to accelerate the book (and is converted into kinetic energy). When the book hits the floor this kinetic energy is converted into heat and sound by the impact.
The factors that affect an object's gravitational potential energy are its height relative to some reference point, its mass, and the strength of the gravitational field it is in. Thus, a book lying on a table has less gravitational potential energy than the same book on top of a taller cupboard, and less gravitational potential energy than a heavier book lying on the same table. An object at a certain height above the Moon's surface has less gravitational potential energy than at the same height on Earth because the Moon's gravity is weaker. (This follows from Newton's law of gravitation because the mass of the moon is much smaller than that of the Earth.) It is important to note that "height" in the common sense of the term cannot be used for gravitational potential energy calculations when gravity is not assumed to be a constant. The following sections provide more detail.
The strength of a gravitational field varies with location. However, within a small range of distances from the center of the source of the gravitational field, this variation in field strength is negligible and we can assume that the force of gravity on a particular object is constant. Near the surface of the Earth, for example, we assume that the acceleration of gravity is a constant g=9.8 m/s2. If we assume that the force of gravity is constant, a simple expression for gravitational potential energy can be derived using the W = Fd equation for work, and the equation
If h is the height above an arbitrarily assigned reference point, then
where PE is the gravitational potential energy of an object of mass m at that point. Hence, the potential difference is
However, if the force of gravity varies too much for this approximation to be valid, then we have to use the general, integral definition of work in order to determine gravitational potential energy. In order to derive the following formula, the reference point where PE = 0 is set at an infinite distance away from the source of the gravitational field provided by mass m2. Thus, unlike the PE = mgh approximation formula, this formula assumes a preset reference point that cannot be arbitrarily defined. In order for the equation to be valid, m2 must remain practically stationary so that its gravitational field does not change over time.
The gravitational potential energy of a mass m1 at a distance R from another mass m2 is
This equation is found by integrating the gravitational force (whose magnitude is given by Newton's law of gravitation) with respect to the distance of the object r from the gravitating body from r = R to r = \infty.

# Elastic potential energy
Elastic potential energy is the potential energy of an elastic object (for example a bow or a catapult) that is deformed under tension or compression (often termed under the word stress by physicists). It arises as a consequence of a force that tries to restore the object to its original shape, which is most often the electromagnetic force between the atoms and molecules that constitute the object.

## Calculation of elastic potential energy
In the case of a spring of natural length l and modulus of elasticity  under an extension of x, elastic potential energy can be calculated using the formula:
This formula is obtained from the integral of Hooke's Law:
The equation is often used in calculations of positions of mechanical equilibrium.
In the general case, elastic energy is given by the Helmholtz potential per unit of volume f as a function of the strain tensor components ij:
Where  and  are the Lame elastical coefficients. The connection between stress tensor components and strain tensor components is:
For a material of Young's modulus, Y (same as modulus of elasticity ), cross sectional area, A0, initial length, l0, which is stretched by a length, \Delta l:
The elastic potential energy per unit volume is given by:

# Chemical potential energy
Chemical potential energy is a form of potential energy related to the structural arrangement of atoms or molecules.  This arrangement may be the result of chemical bonds within a molecule or otherwise.  Chemical energy of a chemical substance can be transformed to other forms of energy by a chemical reaction.  For example, when a fuel is burned the chemical energy is converted to heat, same is the case with digestion of food metabolized in a biological organism.  Green plants transform solar energy to chemical energy through the process known as photosynthesis, and electrical energy can be converted to chemical energy through electrochemical reactions.
The similar term chemical potential is used by chemists to indicate the potential of a substance to undergo a chemical reaction.

# Electrical potential energy
An object can also have potential energy by virtue of its electric charge and several forces related to their presence. There are three main kinds of this kind of potential energy; electrostatic potential energy, electrodynamic potential energy (also sometimes called magnetic potential energy), and nuclear potential energy.

## Electrostatic potential energy
In case the electric charge of an object can be assumed to be at rest, it has potential energy due to its position relative to other charged objects.
The electrostatic potential energy is the energy of an electrically charged particle (at rest) in an electric field. It is defined as the work that must be done to move it from an infinite distance away to its present location, in the absence of any non-electrical forces on the object.  This energy is non-zero if there is another electrically charged object nearby.
The simplest example is the case of two point-like objects A1 and A2 with electrical charges q1 and q2.  The work W required to move A1 from an infinite distance to a distance d away from A2 is given by:
where k is Coulomb's constant, equal to \frac 1 {4\pi\epsilon_0}.
This equation is obtained by integrating the Coulomb force between the limits of infinity and d.
A related quantity called electric potential is equal to electric potential energy of a unit charge.

## Electrodynamic potential energy
In case a charged object or its constituent charged particles are not at rest, it generates a magnetic field giving rise to yet another form of potential energy, often termed as magnetic potential energy. This kind of potential energy is a result of the phenomenon magnetism, whereby an object that is magnetic has the potential to move other similar objects. Magnetic objects are said to have some magnetic moment. Magnetic fields and their effects are best studied under electrodynamics.

## Nuclear potential energy
Nuclear potential energy is the potential energy of the particles inside an atomic nucleus, some of which are indeed electrically charged. This kind of potential energy is different from the previous two kinds of electrical potential energies because in this case the charged particles are extremely close to each other. The nuclear particles are bound together not because of the coulombic force but due to strong nuclear force that binds nuclear particles more strongly and closely. Weak nuclear forces provide the potential energy for certain kinds of radioactive decay, such as beta decay.
Nuclear particles like protons and neutrons are not destroyed in fission and fusion processes, but collections of them have less mass than if they were individually free, and this mass difference is liberated as heat and radiation in nuclear reactions (the heat and radiation have the missing mass, but it often escapes from the system, where it is not measured). The energy from the Sun, also called solar energy, is an example of this form of energy conversion. In the Sun, the process of hydrogen fusion converts about 4 million metric tons of solar matter per second into light, which is radiated into space.

# Thermal potential energy
Thermal energy of an object is simply a sum of average kinetic energy of random motion of particles constituting the object plus average potential energy of their displacement (from their equilibrium positions) as they oscillate/move around it. In case of ideal gas there is no potential energy due to interactions of particles, but kinetic energy may include rotational part too (for multiatomic gases) - if rotational levels are excited at given temperature T.
Solar updraft tower uses this kind of power.

# Rest mass energy
Albert Einstein was the first to calculate the amount of work needed to accelerate a body from rest to some finite speed using his definition of relativistic momentum. To his surprise, this work contained an extra term which did not vanish as the speed of accelerated body approached zero:
This term (E0) was therefore called rest mass energy, as m is the rest mass of the body (c is the speed of light in a vacuum).  (The subscript zero is used here to distinguish this form of energy from the others that follow.  In most other contexts, the equation is written with no subscript.)
So, the rest mass energy is the amount of energy inherent in the mass when it is at rest. If the mass changes, so must its rest mass energy which must be released or absorbed due to energy conservation law. Thus, this equation quantifies the equivalence of mass and energy.
Due to large numerical value of squared speed of light, even a small amount of mass is equivalent to a very large amount of energy, namely 90 petajoules per kilogram  21 megaton of TNT per kilogram.

# Relation between potential energy and force
Potential energy is closely linked with forces. If the work done moving along a path which starts and ends in the same location is zero, then the force is said to be conservative and it is possible to define a numerical value of potential associated with every point in space.  A force field can be re-obtained by taking the vector gradient of the potential field.
For example, gravity is a conservative force. The work done by a unit mass going from point A with U = a to point B with U = b by gravity is (b - a) and the work done going back the other way is (a - b) so that the total work done from
If we redefine the potential at A to be a + c and the potential at B to be b + c  then the work done going from
as before.
In practical terms, this means that you can set the zero of U anywhere you like. You might set it to be zero at the surface of the Earth or you might find it more convenient to set it zero at infinity.
A thing to note about conservative forces is that the work done going from A to B does not depend on the route taken. If it did then it would be pointless to define a potential at each point in space. An example of a non-conservative force is friction. With friction, the route you take does affect the amount of work done, and it makes no sense at all to define a potential associated with friction.
All the examples above are actually force field stored energy (sometimes in disguise). For example in elastic potential energy, stretching an elastic material forces the atoms very slightly further apart. Equilibrium between electromagnetic forces and Pauli repulsion of electrons (they are fermions obeying Fermi statistics) is slightly violated resulting in small returning force. Scientists rarely talk about forces on an atomic scale. Often interactions are described in terms of energy rather than force. You can think of potential energy as being derived from force or you can think of force as being derived from potential energy (though the latter approach requires a definition of energy that is independent from force which does not currently exist).
A conservative force can be expressed in the language of differential geometry as a closed form.  Because Euclidean space is contractible, its de Rham cohomology vanishes, so every closed form is exact, i.e., is the gradient of a scalar field.  This gives a mathematical justification of the fact that all conservative forces are gradients of a potential field.

# Unit of Measure
The standard unit of measure for potential energy is the same as work, which is the joule.