Wave function
A wave function or wavefunction is a mathematical tool used in quantum mechanics to describe any physical system. It is a function from a space that maps the possible states of the system into the complex numbers. The laws of quantum mechanics (i.e. the Schrodinger equation) describe how the wave function evolves over time. The values of the wave function are probability amplitudes  complex numbers  the squares of the absolute values of which, give the probability distribution that the system will be in any of the possible states.
For example, in an atom with a single electron, such as hydrogen or ionized helium, the wave function of the electron provides a complete description of how the electron behaves. It can be decomposed into a series of atomic orbitals which form a basis for the possible wave functions. For atoms with more than one electron (or any system with multiple particles), the underlying space is the possible configurations of all the electrons and the wave function describes the probabilities of those configurations.

# Definition
The modern usage of the term wave function refers to a complex vector or function, i.e. an element in a complex Hilbert space. Typically, a wave function is either:
- a complex vector with finitely many components
- a complex vector with infinitely many components
where each component may be complex function of one or more real variables (a "continuously indexed" complex vector)
In all cases, the wave function provides a complete description of the associated physical system. An element of a vector space can be expressed in  different bases; and so the same applies to wave functions. The components of a wave function describing the same physical state take different complex values depending on the basis being used; however the wave function itself is not dependent on the basis chosen; in this respect they are like spatial vectors in ordinary space: choosing a new set of cartesian axes by rotation of the coordinate frame does not alter the vector itself, only the representation of the vector with respect to the coordinate frame.  A basis in quantum mechanics is analogous to the coordinate frame: choosing a new basis does not alter the wavefunction, only its representation, which is expressed as the values of the components above.
Because the probabilities that the system is in each possible state should add up to 1, the norm of the wave function must be 1.

# Spatial interpretation
The physical interpretation of the wave function is context dependent. Several examples are
provided below, followed by a detailed discussion of the three cases described above.

## One particle in one spatial dimension
The spatial wave function associated with a particle in one dimension is a complex function \psi(x)\, defined over the real line. The  positive function |\psi|^2\, is interpreted as the probability density associated with the particle's position. That is, the probability of a measurement of the particle's position yielding a value in the interval  is given by
This leads to the normalization condition
since the probability of a measurement of the particle's position yielding a value in the range (-\infty, \infty) is unity.

## One particle in three spatial dimensions
The three dimensional case is analogous to the one dimensional case; the wave function is a complex function \psi(x, y, z)\, defined over three dimensional space, and its complex square is interpreted as a three dimensional probability density function:
The normalization condition is likewise
where the preceding integral is taken over all space.

## Two distinguishable particles in three spatial dimensions
In this case, the wave function is a complex function of six spatial variables, \psi(x_1, y_1, z_1, x_2, y_2, z_2) \ , and |\psi|^2\, is the joint probability density associated with the positions of both particles. Thus the probability that a measurement of the positions of both particles indicates particle one is in region R and particle two is in region S is
where dV_1 = dx_1 dy_1 dz_1, and similarly for dV_2.
The normalization condition is then:
in which the preceding integral is taken over the full range of all six variables.
Given a wave function  of a system consisting of two (or more) particles, it is in general not possible to assign a definite wave function to a single-particle subsystem. In other words, the particles in the system can be entangled.

## One particle in one dimensional momentum space
The wave function for a one dimensional particle in momentum space is a complex function \psi(p)\, defined over the real line. The quantity |\psi|^2\, is interpreted as a probability density function in momentum space:
As in the position space case, this leads to the normalization condition:

## Spin 1/2
The wave function for a spin-12 particle (ignoring its spatial degrees of freedom) is a column vector
The meaning of the vector's components depends on the basis, but typically c_1
and c_2 are respectively the coefficients of spin up and spin down in the z
direction. In Dirac notation this is:
The values |c_1|^2 \, and |c_2|^2 \, are then respectively interpreted as the probability of obtaining spin up or spin down in the z direction when a measurement of the particle's spin is performed. This leads to the normalization condition

# Interpretation
A wave function describes the state of a physical system, | \psi \rangle\,, by expanding it in terms of other possible states of the same system, | \phi_i \rangle. Collectively the latter are referred to as a basis or representation. In what follows, all wave functions are assumed to be normalized.

## Finite dimensional basis vectors
A wave function which is a vector \vec \psi with n components describes how to express the state of the physical system | \psi \rangle as the linear combination of finitely many basis elements | \phi_i \rangle, where i runs from 1 to n. In particular the equation
which is a relation between column vectors, is equivalent to
which is a relation between the states of a physical system. Note that to pass between these expressions one must know the basis in use, and hence, two column vectors with the same components can represent two different states of a system if their associated basis states are different. An example of a wave function which is a finite vector is furnished by the spin state of a spin-1/2 particle, as described above.
The physical meaning of the components of \vec \psi is given by the wave function collapse postulate:

## Infinite dimensional basis vectors
The case of an infinite vector with a discrete index is treated in the same manner a finite vector, except the sum is extended over all the basis elements. Hence
is equivalent to
where it is understood that the above sum includes all the components of \vec \psi. The interpretation of the components is the same as the finite case (apply the collapse postulate).

## Continuously indexed vectors (functions)
In the case of a continuous index, the sum is replaced by an integral; an example of this is the spatial wave function of a particle in one dimension, which expands the physical state of the particle, | \psi \rangle, in terms of states with definite position, | x \rangle. Thus
Note that | \psi \rangle is not the same as \psi(x)\,. The former is
the actual state of the particle, whereas the latter is simply a wave function
describing how to express the former as a superposition of states with definite position. In this case the base states themselves can be expressed as
and hence the spatial wave function associated with | x_0 \rangle is \delta(x - x_0)\, (where \delta(x - x_0)\, is the Dirac delta function).

# Formalism
Given an isolated physical system, the allowed states of this system (i.e. the states the system could occupy without violating the laws of physics) are part of a Hilbert space H. Some properties of such a space are
The wave function associated with a particular state may be seen as an expansion of the state in a basis of H. For example,
is a basis for the space associated with the spin of a spin-1/2 particle and consequently
the spin state of any such particle can be written uniquely as
Sometimes it is useful to expand the state of a physical system in terms of states which are not allowed, and hence, not in H. An example of this is the spacial wave function associated with a particle in one dimension which expands the state of the particle in terms of states with definite position.
Every Hilbert space H is equipped with an inner product. Physically, the nature of the inner product is contingent upon the kind of basis in use. When the basis is a countable set \{ | \phi_i \rangle \}\,, and orthonormal, i.e.
Then an arbitrary vector | \psi \rangle can be expressed as
where c_i = \langle \phi_i | \psi \rangle.
If one chooses a "continuous" basis as, for example, the position or coordinate basis consisting of all states of definite position \{ | x \rangle \}, the orthonormality condition holds similarly:
We have the analogous identity

# Ontology
Whether the wave function is real, and what it represents, are major questions in the interpretation of quantum mechanics. Many famous physicists have puzzled over this problem, such as Erwin Schrodinger, Albert Einstein and Niels Bohr. Some approaches regard it as merely representing information in the mind of the observer. Others argue that it must be objective.

# Notes