A change to the energy of an electron within an atom, or more rarely within a molecule, in which the electron remains attached (bound) to the atom or molecule both before and after the change. When the energy is increased, a photon is absorbed; when the energy is reduced, a photon is emitted. Bound–bound transitions produce the emission and absorption lines found in stellar spectra.