The magnitude difference between the apparently brightest object, the Sun, and the faintest observable object is 54 magnitudes. This is truly an astronomically large range in the brightness of observable objects. The actual brightnesses of two objects can also be compared using the above formula. You intuitively judge the distance of approaching headlights at night by comparing how bright they appear with your knowledge of how bright the headlights should be. That is, you compare the apparent brightness and the actual brightness of the headlights.
Astronomers do the same sort of thing using the inverse square law of light.
The absolute magnitude, M, is a measure of the actual brightness while the apparent magnitude, m, is related to the apparent brightness. If the distance modulus is known, the distance to the star can be computed. Spectral Classification Light can be thought of as energy in the form of a wave. The energy associated with the wave is inversely proportional to the wavelength. So short waves have the largest energy and long waves the smallest energy.