Pauli exclusion principle
The Pauli exclusion principle is a quantum mechanical principle formulated by Wolfgang Pauli in 1925. It states that no two identical fermions may occupy the same quantum state simultaneously. A more rigorous statement of this principle is that, for two identical fermions, the total wave function is anti-symmetric. For electrons in a single atom, it states that no two electrons can have the same four  quantum numbers, that is, if n, l, and ml are the same, ms must be different such that the electrons have opposite spins.
The Pauli exclusion principle mathematically follows from applying the rotation operator to two identical particles with half-integer spin.

# Overview
The Pauli exclusion principle is one of the most important principles in physics, primarily because the three types of particles from which ordinary matter is madeelectrons, protons, and neutronsare all subject to it; consequently, all material particles exhibit space-occupying behavior. The Pauli exclusion principle underpins many of the characteristic properties of matter from the large-scale stability of matter to the existence of the periodic table of the elements.
The Pauli exclusion principle follows mathematically from the definition of the angular momentum operator (rotation operator) in quantum mechanics.  The exchange of particles in the system of two identical particles (which is mathematically equivalent to the rotation of each particle by 180 degrees) results either in the change of the sign of wave function of the system (when the particles have half-integer spin) or not (when the particles have integer spin). Thus, no two identical particles of half integer spin can be at the same quantum place - because the wave function of such system must be equal to its opposite - and the only wave function which satisfies this condition is the zero wave function.
Particles with antisymmetric wave functions are called fermionsand obey the Pauli exclusion principle. Apart from the familiar electron, proton and neutron, these include neutrinos and quarks (from which protons and neutrons are made), as well as some atoms like helium-3. All fermions possess "half-integer spin", meaning that they possess an intrinsic angular momentum whose value is \hbar = h/2\pi (Planck's constant divided by 2) times a half-integer (1/2, 3/2, 5/2, etc.). In the theory of quantum mechanics, fermions are described by "antisymmetric states", which are explained in greater detail in the article on identical particles.
Particles with integer spin have a symmetric wave function and are called bosons; in contrast to fermions, they may share the same quantum states. Examples of bosons include the photon and the W and Z bosons.

# History
In the early 20th century, it became evident that atoms and molecules with pairs of electrons or even numbers of electrons are more stable than those with odd numbers of electrons.  In the famous 1916 article The Atom and the Molecule by Gilbert N. Lewis, for example, rule three of his six postulates of chemical behavior states that the atom tends to hold an even number of electrons in the shell and especially to hold eight electrons which are normally arranged symmetrically at the eight corners of a cube (see: cubical atom). In 1922 Niels Bohr showed that the periodic table could be explained by assuming that certain numbers of electrons (for example 2, 8 and 18) corresponded to stable "closed shells".
Pauli looked for an explanation for these numbers which were at first only empirical.
At the same time he was trying to explain experimental results in the Zeeman effect in atomic spectroscopy and in ferromagnetism. He found an essential clue in a 1924 paper by E.C.Stoner which pointed out that for a given value of the principal quantum number (n), the number of energy levels of a single electron in the alkali metal spectra in an external magnetic field, where all degenerate energy levels are separated, is equal to the number of electrons in the closed shell of the rare gases for the same value of n. This led Pauli to realize that the complicated numbers of electrons in closed shells can be reduced to the simple rule one per state, if  the electron states are defined using four quantum numbers. For this purpose he introduced a new two-valued quantum number, identified by Samuel Goudsmit and George Uhlenbeck as electron spin.

# Connection to quantum state symmetry
The Pauli exclusion principle with a single-valued many-particle wavefunction is equivalent to the assumption that the wavefunction is antisymmetric. An antisymmetric two-particle state is represented as a sum of states in which one particle is in state \scriptstyle |x \rangle and the other in state \scriptstyle |y\rangle:
and antisymmetry under exchange means that A(x,y) = -A(x,y). This implies that A(x,x)=0, which is Pauli exclusion. It is true in any basis, since unitary changes of basis keep antisymmetric matrices antisymmetric, although strictly speaking, the quantity A(x,y) is not a matrix but an antisymmetric rank two tensor.
Conversely, if the diagonal quantities A(x,x) are zero in every basis, then the wavefunction component:
A(x,y)=\langle \psi|x,y\rangle = \langle \psi | ( |x\rangle \otimes |y\rangle )
is necessarily antisymmetric. To prove it, consider the matrix element:
<\psi| ((|x\rangle + |y\rangle)\otimes(|x\rangle + |y\rangle))
This is zero, because the two particles have zero probability to both be in the superposition state \scriptstyle |x\rangle + |y\rangle. But this is equal to
\langle \psi |x,x\rangle + \langle \psi |x,y\rangle + \langle \psi |y,x\rangle + \langle \psi | y,y \rangle
The first and last terms on the right hand side are diagonal elements and are zero, and the whole sum is equal to zero. So the wavefuncion matrix elements obey:
\langle \psi|x,y\rangle + \langle\psi |y,x\rangle = 0
-r
A(x,y)=-A(y,x)
According to the spin-statistics theorem, particles with integer spin occupy symmetric quantum states, and particles with half-integer spin occupy antisymmetric states; furthermore, only integer or half-integer values of spin are allowed by the principles of quantum mechanics.

# Consequences

## Atoms and the Pauli principle
The Pauli exclusion principle helps explain a wide variety of physical phenomena. One such consequence of the principle is the elaborate electron shell structure of atoms and of the way atoms share electron(s) - thus variety of chemical elements and of their combinations (chemistry). (An electrically neutral atom contains bound electrons equal in number to the protons in the nucleus. Since electrons are fermions, the Pauli exclusion principle forbids them from occupying the same quantum state, so electrons have to "pile on top of each other" within an atom).
For example, consider a neutral helium atom, which has two bound electrons. Both of these electrons can occupy the lowest-energy (1s) states by acquiring opposite spin. This does not violate the Pauli principle because spin is part of the quantum state of the electron, so the two electrons are occupying different quantum states. However, the spin can take only two different values (or eigenvalues). In a lithium atom, which contains three bound electrons, the third electron cannot fit into a 1s state, and has to occupy one of the higher-energy 2s states instead. Similarly, successive elements produce successively higher-energy shells. The chemical properties of an element largely depend on the number of electrons in the outermost shell, which gives rise to the periodic table of the elements.

## Solid state properties and the Pauli principle
In conductors and semi-conductors free electrons have to share entire bulk space - thus their energy levels stack up creating band structure out of each atomic energy level. In strong conductors (metals) electrons are so degenerate that they can not even contribute much into thermal capacity of a metal. Many mechanical, electrical, magnetic, optical and chemical properties of solids are the direct consequence of Pauli exclusion.

## Stability of matter
It has been shown that the Pauli exclusion principle is responsible for the fact that ordinary bulk matter is stable and occupies volume. The history of the demonstration of this fact is outlined in The Stability of Matter, Science News Online, 14 October 1995. The first suggestion in 1931 was by Paul Ehrenfest, who pointed out that the electrons of each atom cannot all fall into the lowest-energy orbital and must occupy successively larger shells. Atoms therefore occupy a volume and cannot be squeezed too close together.
A more rigorous proof was provided by Freeman Dyson and Andrew Lenard in 1967, who considered the balance of attractive (electron-nuclear) and repulsive (electron-electron and nuclear-nuclear) forces and showed that ordinary matter would collapse and occupy a much smaller volume without the Pauli principle. The consequence of the Pauli principle here is that electrons of the same spin are kept apart by a repulsive exchange force or exchange interaction. This is a short-range force which is additional to the long-range electrostatic or coulombic force. This additional force is therefore responsible for the everyday observation in the macroscopic world that two solid objects cannot be in the same place in the same time.
Dyson and Lenard did not consider the extreme magnetic or gravitational forces which occur in some astronomical objects. In 1995 Elliott Lieb and coworkers showed that the Pauli principle still leads to stability in intense magnetic fields as in neutron stars, although at much higher density than in ordinary matter. In sufficiently intense gravitational fields, matter does collapse to form a black hole.

## Astrophysics and the Pauli principle
Astronomy provides another spectacular demonstration of this effect, in the form of white dwarf stars and neutron stars. For both such bodies, their usual atomic structure is disrupted by large gravitational forces, leaving the constituents supported by "degeneracy pressure" alone.  This exotic form of matter is known as degenerate matter. In white dwarfs, the atoms are held apart by the electron degeneracy pressure. In neutron stars, which exhibit even larger gravitational forces, the electrons have merged with the protons to form neutrons, which produce a larger degeneracy pressure. Neutrons are the most "rigid" objects known - their Young modulus (or more accurately, bulk modulus) is 20 orders of magnitude larger than that of diamond.