system
Given the following post, respond as if you're commenting on Reddit:
human
I understand why different atoms have different absorption spectrum, but why does a given atom have several "peaks" in its spectrum?

I would assume it's because each electron will give off a different amount of energy.

But hydrogen only has one electron, and it has 5 peaks (at least in the visible spectrum, don't know if it has some elsewhere) so I suppose that's busted.

Anyone care to explain?
gpt
An atom is a bound quantum system with a discrete energy spectrum. This means that independently of how many electrons are involved, the whole thing can only take on a discrete set of energy levels. (And still be called an atom).

An atom emits a photon or absorbs one by transitioning from one energy level to another. Since the energy of the photon must be the difference of these energies, the possible photon energies also form another discrete spectrum.

Here's a specific example for the hydrogen atom in the simplest possible treatment: the energy levels are of the form:

E = constant * 1/n^2

Where n = 1, 2, ... is an integer. Therefore the photons emitted or absorbed must have energies given by all the possible differences

E_γ = const * (1/n_1^2 - 1/n_2^(2))

With n_1 and n_2 taking all possible positive integer values.

So in the photon emission spectrum we will find a forest of peaks corresponding to these discrete photon energy levels (each corresponding to a transition between two atomic energy levels) and generally a handful will fall in the visible portion.

A couple of corrections to this: first of all when atoms are in molecules, they don't retain their own electronic structure, part of the electrons will be shared between atoms in molecular orbitals. So you should talk about a molecule's energy levels and emission spectra, and all we said should really be said about molecules, not atoms. The spectrum of molecular hydrogen is not the same as that for atomic hydrogen. 

Typically, an atom will have a valence shell of electrons shared in molecular orbitals, while the inner shells will be mostly "his" and will display typical (generally high-energy) transitions of that specific element.

Point number two is these peaks are not perfectly narrow. There is some "spread" to the photon energy. There's two reasons: one is quantum uncertainty. This makes the peak get a Lorentzian shape. Second reason is the Doppler effect due to thermal motion of the molecule with respect to you, the gentleman with the detector. This makes the peak get a gaussian shape.