The total magnetic moment is a combination of spin (S) and orbital magnetic moment (L) which is given by

J=L+S

If there are n number of electrons then the spin angular momentum is given by

S=s1+s2+...+sn

The orbital angular momentum is given by

L=l1+l2+...+ln

The resultant total angular momentum J is given by

J=L+S

The orbital magnetic moment is given by

µ_{L}=µ_{B}L

and the spin magnetic moment is

µ_{S}=2µ_{B}S

The resultant magnetic moment is given by

µ_{R}=µ_{L}+µ_{S}

=µ_{B}(L+2S)

=gJµ_{B}

where g is given by

g={1+J(J+1)+S(S+1)-L(L+1)}/{2J(J+1)}

When S=0

J=L and g=1 which gives the orbital contribution

When L=0

J=S and g=2 which gives the spin contribution

**Hund's Rule in magnetic moment**

In an atom, the set of values for S and L are governed by Hund's rule given according to the following

1) The spin of the electron follows Pauli's principle. Electrons fill vacant shells first. Each spin will contribute to 1 Bohr magneton. Therefore 5 electrons in 3d shell will give raise to 5µ_{B}

After all the electrons have occupied all the vacant shells the extra electron will pair up with the available electrons with opposite spins. The opposite spins will give raise to negative values. The resultant spin magnetic moment in such case with 6 electrons in the d shell will be 4µ_{B }since 5µ_{B} in the positive and 1µ_{B} in the negative direction will give a net value of 4µ_{B}. Completely filled d orbital will give a net moment of zero.

_{ }

2) The orbital magnetic moment arises from the electrons occupying the shells according to the values given by

m_{l},m_{l-1},....m_{o}

For instance for 5 3d electrons

mL=+2 +1 + 0 -1 -2 = 0

for 7 3d electrons

mL=+2 +1 +0 -1 -2 +2 +1 = +3

3) The total quantum number is given by

J=L+S

If the shell is more than half filled then

J=L+S

If the shell is less than half filled then

J=L - S

If the shell is half filled

J=S

If the shell is completely filled

J=0