Energy is directly proportional to frequency. In optoelectronics, it is said that the energy of a photon is directly proportional to its frequency. This equation is written as "E = hf". In addition, the energy of a wave is also directly proportional to its amplitude squared.
To calculate the energy of a photon, the frequency of the photon is multiplied by a number known as Planck's constant. This constant was defined by the quantum physicist Max Karl Ernst Ludwig Planck in the year 1900 and describes the relationship between energy and frequency, which is also known as the Planck-Einstein relation.