### The Law of Conservation of Energy

Energy in a system may take on various forms (e.g. kinetic, potential, heat, light). The law of conservation of energy states that energy may neither be created nor destroyed. Therefore the sum of all the energies in the system is a constant.

The most commonly used example is the pendulum:

The formula to calculate the potential energy is:

PE = mgh

The mass of the ball = 10kg
The height, h = 0.2m
The acceleration due to gravity, g = 9.8 m/s^2
Substitute the values into the formula and you get:

PE = 19.6J (J = Joules, unit of energy)

The position of the blue ball is where the Potential Energy (PE) = 19.6J while the Kinetic Energy (KE) = 0.
As the blue ball is approching the purple ball position the PE is decreasing while the KE is increasing. At exactly halfway between the blue and purple ball position the PE = KE.
The position of the purple ball is where the Kinetic Energy is at its maximum while the Potential Energy (PE) = 0.
At this point, theoretically, all the PE has transformed into KE> Therefore now the KE = 19.6J while the PE = 0.
The position of the pink ball is where the Potential Energy (PE) is once again at its maximum and the Kinetic Energy (KE) = 0.

We can now say and understand that:

PE + KE = 0

PE = -KE

The sum of PE and KE is the total mechanical energy:

Total Mechanical Energy = PE + KE

NOTE: This is with the abscence of outside forces such as friction

Using our common sense we know that it's impossible for the pendulum to swing higher than the height h without giving it a push yourself. If there was no friction, the pendulum would swing back and forth forever because of the law of conservation of energy.