The potential energy (PE) of a pendulum can be expressed as mg(L - Lcos(theta/2)), where m is mass, g is gravitational acceleration, L is the length of the pendulum, and theta is the angle from the vertical. The formula indicates that the height (h) in the context of potential energy is related to the vertical displacement of the pendulum bob. The discussion clarifies that the common formula for potential energy is not simply mgcos(theta/2)/2l, as initially questioned. Understanding the derivation of this formula involves recognizing the relationship between the pendulum's angle and its height. This breakdown helps clarify the concept of potential energy in pendulum motion.