why is the spectrum of hydrogen composed of discrete lines?

An electron in an excited atom is at a higher orbit in the H atom. When it falls to a lower orbit, the energy is emitted as a specific energy and that has a specific wavelength.

The spectrum of hydrogen is composed of discrete lines because of the quantized nature of energy levels in atoms. The energy levels in an atom are often described using a model called the Bohr model, which was developed by Niels Bohr in 1913.

According to the Bohr model, electrons in an atom can only occupy specific energy levels. When an electron transitions from a higher energy level to a lower energy level, it releases energy in the form of light. The energy of this light is directly proportional to the energy difference between the two levels.

In the case of hydrogen, when an electron transitions between energy levels, it emits or absorbs photons of specific energies. These energies directly correspond to different wavelengths or frequencies of light. When these emitted or absorbed photons are analyzed, they appear as discrete lines in the electromagnetic spectrum.

To explain why these energy levels are discrete, quantum mechanics is needed. In the quantum mechanical model of the atom, the electron's energy is described by wavefunctions and is constrained by Heisenberg's uncertainty principle. These constraints lead to the quantized energy levels and the discrete lines observed in the spectrum of hydrogen.

In summary, the spectrum of hydrogen is composed of discrete lines because the energy levels of electrons in atoms are quantized and transitions between these levels result in the emission or absorption of photons with specific energies.