The modern theory of quantum mechanics is formulated using rigorous mathematical formalisms. In this modern formulation, the wave function, commonly denoted as , is defined as a function of the degrees of freedom of a quantum system such as the positions or momenta of particles and their spin, which describes the state of the system. A complex-valued function, the wave function assigns a complex number to each element of its domain, i.e. every point in space or every possible spin value of each particle.
Given discrete degrees of freedom and continuous variables , the wave function can be written as . The wave function is an abstract mathematical construct and cannot be "measured" directly. The squared modulus of the wave function, , is interpreted as the probability density. In other words, defines a probability distribution and therefore, for every , it satisfies
The mathematical formalism of quantum mechanics defines an inner product on the space of all wave functions. For any two wave functions and , the inner product is defined as
Upon measurement of an observable, the wave function "collapses" to a new wave function. The modulus squared of the inner product of two wave functions and is interpreted as the probability of the wave function collapsing to the wave function :