In chemistry, electron configuration is the distribution of electrons in the orbitals of an atom. The electron configuration of an atom can provide important information about its chemical behavior and reactivity. However, there are two exceptions to the rules of electron configurations that occur in certain cases. These exceptions are known as the Aufbau principle and the Pauli exclusion principle.

The Aufbau principle is a rule that states that electrons occupy the lowest energy levels first before filling higher energy levels. This means that when electrons are added to an atom, they fill the orbitals in order of increasing energy, starting with the 1s orbital and moving up to the higher energy levels. For example, the electron configuration of nitrogen, with atomic number 7, is 1s2 2s2 2p3. This configuration follows the Aufbau principle, with the 1s orbital filled first, followed by the 2s and 2p orbitals.
However, there are some cases where the Aufbau principle is not followed. One exception to this rule occurs with the transition metals, which have partially filled d orbitals. In these cases, the electrons may occupy the d orbitals before completely filling the s orbitals. For example, the electron configuration of chromium, with atomic number 24, is 1s2 2s2 2p6 3s2 3p6 4s1 3d5. This configuration shows that the fifth electron of chromium occupies the 3d orbital instead of the 4s orbital, which is of higher energy.
Another exception to the Aufbau principle occurs with the noble gases. The noble gases are the elements in group 18 of the periodic table, which include helium, neon, argon, krypton, xenon, and radon. These elements have filled valence electron shells, making them highly stable and unreactive. The electron configurations of the noble gases are unique in that their valence electrons occupy s and p orbitals that are completely filled, which gives them a special stability. For example, the electron configuration of neon, with atomic number 10, is 1s2 2s2 2p6. This configuration shows that the valence shell of neon is completely filled with eight electrons.
The Pauli exclusion principle is a rule that states that no two electrons in an atom can have the same set of quantum numbers. This means that each orbital can hold a maximum of two electrons with opposite spins. For example, the electron configuration of oxygen, with atomic number 8, is 1s2 2s2 2p4. This configuration shows that the two electrons in the 2s orbital have opposite spins, and the four electrons in the 2p orbitals have opposite spins as well.
However, there are some cases where the Pauli exclusion principle is not followed. One exception to this rule occurs with atoms that have unpaired electrons in their valence shells. These unpaired electrons can interact with each other, resulting in a phenomenon known as electron spin pairing. Electron spin pairing occurs when two unpaired electrons in the same orbital have their spins aligned in the same direction, resulting in a net spin. This net spin can affect the magnetic properties of the atom, making it paramagnetic. For example, the electron configuration of nitrogen, with atomic number 7, is 1s2 2s2 2p3. This configuration shows that the three electrons in the 2p orbital are all unpaired, resulting in a net spin and making nitrogen a paramagnetic element.
Another exception to the Pauli exclusion principle occurs with the d-block elements. The d-block elements have partially filled d orbitals, which can result in multiple electron configurations that have the same energy.