How does a hydrogen atom have so many spectral lines when it only has one electron?

That one electron can occupy many, many different energy levels.

To understand why a hydrogen atom has many spectral lines despite having only one electron, we need to understand the concept of energy levels and electron transitions.

In a hydrogen atom, the electron orbits the positively charged nucleus. However, the electron can only occupy specific energy levels, also known as electron shells or orbitals. Each energy level corresponds to a distinct amount of energy that the electron possesses.

The energy levels in a hydrogen atom are denoted by whole number values: 1, 2, 3, and so on. The lowest energy level is called the ground state, denoted by n=1. As the energy level increases, the electron is found farther away from the nucleus and possesses more energy.

When the hydrogen atom's electron absorbs or emits energy, it transitions between these energy levels. This transition is accompanied by the emission or absorption of a photon of light. The energy of the emitted or absorbed photon corresponds to the energy difference between the initial and final energy levels.

The precise energy difference between energy levels in a hydrogen atom determines the wavelength (color) of the emitted or absorbed photon. The relationship is given by the Rydberg formula, which calculates the wavelength of the spectral line:

1/λ = R*(1/n₁² - 1/n₂²)

where λ is the wavelength, R is the Rydberg constant, and n₁ and n₂ are the initial and final energy levels, respectively.

Since hydrogen atoms have multiple possible energy levels, various electron transitions can occur, resulting in different spectral lines. For example, when the electron transitions from energy level 2 to energy level 1, it emits a photon of light in the ultraviolet region. This transition corresponds to the Lyman series of spectral lines. Similarly, transitions from higher energy levels (e.g., n=3 or n=4) to the second energy level (n=2) result in the Balmer and Paschen series, respectively, which fall in the visible and infrared parts of the electromagnetic spectrum.

In summary, the existence of multiple energy levels in a hydrogen atom allows its single electron to occupy different states and transition between them, resulting in numerous spectral lines when photons are emitted or absorbed.