The Zeeman effect is the effect of splitting the energy levels of
an atom when it is placed in an external magnetic field.

The splitting occurs because of the interaction of the magnetic moment \huge\muof the atom with the magnetic field B

In the Zeeman effect, atoms are excited to a level above the ground
state. When they return to the ground state, they emit the extra energy
as a visible photon whose energy corresponds to the difference in
energy between the excited and ground states. If a magnetic field
is applied, both the ground state and the excited state energies experience
the Zeeman splitting. Thus, photons of slightly different energies
will be emitted when the excited atoms return to their ground state.

Historically there is a difference between the normal and the anomalous
Zeeman effects. The normal Zeeman effect describes the phenomenon
where the total spin is 0, thus the explanation of the effect is possible
using classical physics. The anomalous Zeeman effect describes the
phenomenon where the total spin is not 0, thus needing a quantum explanation.

__The normal Zeeman effect:__

In this situation, the electron moving in a magnetic field experiences
a Lorentz force that slightly changes the orbit of the electron and
hence its energy.

The orbital motion of the electron produces a magnetic moment \mu_{e}
so the shift in the energy of the atomic levels can be expressed by:

(1)\Delta E=\mu_{e}\cdot B

The magnetic dipole moment associated with the orbital angular momentum
is given by:

(2) \mu=\frac{-e}{2m_{e}}\cdot L

For a magnetic field in the z- direction, eq. (1) becomes:

(3) \Delta E=m_{l}\frac{e\hbar}{2m_{e}}\cdot B=m_{l}\mu_{B}B

Where \mu_{B} is the Bohr magneton and m_{l} is the magnetic
quantum number.

__The anomalous Zeeman effect:__

In addition to orbital angular momentum, electrons possess spin angular
momentum S and an associated magnetic moment \mu_{s}.

Thus, now eq. (3) takes the form:

(4) \Delta E=-\frac{e}{2m_{e}}\cdot(\vec{L}+2\vec{S})\cdot\vec{B}=-g_{L}\mu_{B}m_{j}B

The factor of two multiplying the electron spin angular momentum comes
from the fact that it is twice as effective in producing magnetic
moment. This factor is called the spin g-factor or the gyromagnetic-
ratio.

For an electron that has spin angular momentum S, orbital
angular momentum L and total angular momentum J, we can write:

(5) \mu_{J}=g_{L}\frac{e}{2m_{e}}J

Where g_{L} is the Lande g- factor and is given by:

(6) g_{L}=1+\frac{J(J+1)+S(S+1)-L(L+1)}{2J(J+1)}

Now eq. (4) makes much more sense.

Since, from quantum mechanics we know that the angular momentum is
quantized, m_{j} is the total angular momentum quantum number according
to:

(7) J_{z}=m_{j}\hbar

__Calculating the energy splitting:__

The light that is emitted from the gas is generated when electrons
make transitions from excited states of the atom to the ground state.
When an electron makes such transition, it emits a single photon which
carries away an angular momentum of \hbar, which means transitions
can only occur between states where J_{z} differs by only 0
or \pm1\hbar. If the transition is between levels with the same m_{j} then the photon's energy is unshifted by the magnetic field.
But, if the change in m_{j} is \pm1, then the change in the
photon energy is:

(8) \Delta h\nu=(g_{L}m_{j}-g'_{L}m'_{j})\mu_{B}B=g_{eff}\mu_{B}B

Where the prime refers to the initial state, \Delta m=m_{j}-m'_{j}=0,\pm1and g_{eff} is the effective g- factor for the transition.

Note that he above treatment of the Zeeman effect describes the phenomenon
when the magnetic fields are small enough that the orbital and spin
angular momenta can be considered to be coupled. For extremely strong
magnetic fields this coupling is broken and another approach must
be taken. The strong field effect is called the Paschen- Back effect.

In order to see the weak field effect (Zeeman effect) in a numerical experiment,
I calculated the wavelength splitting of the Zeeman energy of eq.
(8). Using (9) \lambda\nu=c, where c is the speed of light:

(10) |\Delta\lambda|=(\frac{c}{\lambda^{2}})^{-1}\cdot\Delta\nu

Thus:

(11) |\Delta\lambda|=g_{eff}\frac{\lambda}{hc}\mu_{B}B=4.668\times10^{-8}g_{eff}\lambda^{2}B

Where wavelengths are in nm and the magnetic field id in Tesla.

[1] en.wikipedia.org/wiki/Zeeman_effect

[2]www.physics.rutgers.edu/ugrad/387/zeeman.pdf

[3]courses.washington.edu/phys432/zeeman/zeeman_effect.pdf