Orbitals, States, and Wavefunctions
Since electrons are fermions they are subject to the Pauli exclusion principle, which states that no two fermions can occupy the same quantum state at once. This is the fundamental basis of the configuration of electrons in an atom: once a state is occupied by an electron, the next electron must occupy a different quantum mechanical state.
In an atom, the stationary states of an electron's wavefunction (i.e. the states which are eigenstatess of the Schrödinger equation HΨ = EΨ where H is the Hamiltonian) are referred to as (molecular) orbitals, by analogy with the classical picture of electron particles orbiting the nucleus. In general, an orbital represents the region where an electron can be expected to exist (with ~90% probability). These states have four principal quantum numbers: n, l, ml and ms, and by the Pauli principle no two electrons may share the same values for all four numbers. The two most important of these are n and l.
Energy Levels (n)
The first quantum number n corresponds to the overall energy and hence also the distance from the nucleus of an orbital, hence sets of states with the same n are often referred to as electron shells or energy levels. These are not sharply delineated zones within the atom, but rather fuzzy-edged regions within which an electron is likely to be found, due to the probabilistic nature of quantum mechanical wavefunctions.
Angular Momentum (l)
The second quantum number l corresponds to the angular momentum of the state. These states take the form of spherical harmonics, and so are described by Legendre polynomials. The various states relating to different values of l are sometimes called sub-shells, and (mainly for historical reasons) are referred to by letter, as follows:
|l value||Letter||Maximum number of electrons in shell|
Each of the different angular momentum states can take 2(2l+1) electrons. This is because the third quantum number ml (which can be thought of [somewhat inaccurately] as the [quantised] projection of the angular momentum vector on the z-axis) runs from -l to l in integer units, and so there are 2l+1 possible states. Each distinct nlml state can be occupied by two electrons with opposing spins (given by the quantum number ms), giving 2(2l+1) electrons overall. States with higher l than given in the table are perfectly permissible in theory, but these values cover all ground state atoms so far discovered.
For a given value of n the possible values of l range from 0 to n-1; therefore, the n=1 shell only possesses an s subshell and can only take 2 electrons, the n=2 shell possesses an s and a p subshell and can take 8 electrons overall, the n=3 shell possesses s, p and d subshells and has a maximum of 18 electrons, and so on (generally speaking, the maximum number of electrons in the n\th energy level is 2n2).
In the ground state of an atom, the states are "filled" in order of increasing energy; i.e., the first electron goes into the lowest energy state, the second into the next lowest, and so on. The fact that the 3d state is higher in energy than the 4s state but lower than the 4p is the reason for the existence of the transition metals. The order in which the states are filled is as follows:
4s 3d 4p
5s 4d 5p
6s 4f 5d 6p
7s 5f 6d 7p
8s 5g 6f 7d 8p
...This leads directly to the structure of the periodic table. The chemical properties of an atom are largely determined by the arrangement of the electrons in its outermost ("valence") shell (although other factors, such as atomic radius, atomic mass, and increased accessibility of additional electronic states also contribute to the chemistry of the elements as atomic size increases).
Progressing through a group from lightest element to heaviest element, the outer-shell electrons (those most readily accessible for participation in chemical reactions) are all in the same type of orbital, with a similar shape, but with increasingly higher energy and average distance from the nucleus. For instance, the outer-shell (or "valence") electrons of the first group, headed by hydrogen all have one electron in an s orbital. In hydrogen, that s orbital is in the lowest possible energy state of any atom, the first-shell orbital (and represented by hydrogen's position in the first period of the table). In francium, the heaviest element of the group, the outer-shell electron is in the seventh-shell orbital, significantly further out on average from the nucleus than those electrons filling all the shells below it in energy. As another example, both carbon and lead have four electrons in their outer shell orbitals.
Because of the importance of the outermost shell, the different regions of the periodic table are sometimes referred to as periodic table blocks, named according to the sub-shell in which the "last" electron resides, e.g. the s-block, the p-block, the d-block, etc.
An example of the notation commonly used to give the electron configuration of an atom, in this case silicon (atomic number 14), is as follows: 1s2 2s2 2p6 3s2 3p2 The numbers are the shell number, n; the letters refer to the angular momentum state, as given above, and the superscripted numbers are the number of electrons in that state for the atom in question. An even simpler version is simply to quote the number of electrons in each shell, eg (again for Si): 2-8-4.
In molecules, the situation becomes much more complex: see molecular orbitals for details. Similar, but not identical, arguments can be applied to the protons and neutrons in the atomic nucleus: see the shell model of nuclear physics.