In quantum mechanics, a density matrix (or density operator) is a matrix used in calculating the probabilities of the outcomes of measurements performed on physical systems. It is a generalization of the state vectors or wavefunctions: while those can only represent pure states, density matrices can also represent mixed ensembles of states. These arise in quantum mechanics in two different situations:
when the preparation of a system can randomly produce different pure states, and thus one must deal with the statistics of the ensemble of possible preparations; and when one wants to describe a physical system that is entangled with another, without describing their combined state. This case is typical for a system interacting with some environment (e.g. decoherence). In this case, the density matrix of an entangled system differs from that of an ensemble of pure states that, combined, would give the same statistical results upon measurement. Density matrices are thus crucial tools in areas of quantum mechanics that deal with mixed states (not to be confused with superposed states), such as quantum statistical mechanics, open quantum systems and quantum information.
Definition and motivation The density matrix is a representation of a linear operator called the density operator. The density matrix is obtained from the density operator by a choice of an orthonormal basis in the underlying space. In practice, the terms density matrix and density operator are often used interchangeably. Pick a basis with states |0⟩, |1⟩ in a two-dimensional Hilbert space, then the density operator is represented by the matrix (ρij)=(ρ00ρ01ρ10ρ11)=(p0ρ01ρ01∗p1) where the diagonal elements are real numbers that sum to one (also called populations of the two states |0⟩, |1⟩). The off-diagonal elements are complex conjugates of each other (also called coherences); they are restricted in magnitude by the requirement that (ρij) be a positive semi-definite operator, see below. A density operator is a positive semi-definite, self-adjoint operator of trace one acting on the Hilbert space of the system. This definition can be motivated by considering a situation where some pure states |ψj⟩ (which are not necessarily orthogonal) are prepared with probability pj each. This is known as an ensemble of pure states. The probability of obtaining projective measurement result m when using projectors Πm is given by p(m)=∑jpj⟨ψj|Πm|ψj⟩, which can be proven equal to p(m)=tr[Πm(∑jpj|ψj⟩⟨ψj|)]. Consequently, the density operator, defined as ρ=∑jpj|ψj⟩⟨ψj|, is a convenient representation for the state of this ensemble. This operator is positive semi-definite, self-adjoint, and has trace one. Conversely, it follows from the spectral theorem that every operator with these properties can be written as ∑jpj|ψj⟩⟨ψj| for some states |ψj⟩ and coefficients pj that are non-negative and add up to one. However, this representation will not be unique, as shown by the Schrödinger–HJW theorem. Another motivation for the definition of density operators comes from considering local measurements on entangled states. Let |Ψ⟩ be a pure entangled state in the composite Hilbert space ℋ1⊗ℋ2. The probability of obtaining measurement result m when measuring projectors Πm on the Hilbert space ℋ1 alone is given by p(m)=⟨Ψ|(Πm⊗I)|Ψ⟩, which after algebraic manipulation becomes p(m)=tr[Πm(tr2|Ψ⟩⟨Ψ|)], where tr2 denotes the partial trace over the Hilbert space ℋ2. This makes the operator ρ=tr2|Ψ⟩⟨Ψ| a convenient tool to calculate the probabilities of these local measurements. This operator has all the properties of a density operator and is known as the reduced density matrix of |Ψ⟩ on subsystem 1. Conversely, the Schrödinger–HJW theorem implies that all density operators can be written as tr2|Ψ⟩⟨Ψ| for some state |Ψ⟩.
Pure and mixed states A pure quantum state is a state that can not be written as a probabilistic mixture, or convex combination, of other quantum states. There are several equivalent characterizations of pure states in the language of density operators. A density operator represents a pure state if and only if:
it can be written as an outer product of a state vector |ψ⟩ with itself, that is, ρ=|ψ⟩⟨ψ|. it is a projection, in particular of rank one. it is idempotent, that is ρ=ρ2. it has purity one, that is, tr(ρ2)=1. It is important to emphasize the difference between a probabilistic mixture (i.e. an ensemble) of quantum states and the superposition of two states. If an ensemble is prepared to have half of its systems in state |ψ1⟩ and the other half in |ψ2⟩, it can be described by the density matrix:
ρ=12(1001), where |ψ1⟩ and |ψ2⟩ are assumed orthogonal and of dimension 2, for simplicity. On the other hand, a quantum superposition of these two states with equal probability amplitudes results in the pure state |ψ⟩=(|ψ1⟩+|ψ2⟩)/2, with density matrix
|ψ⟩⟨ψ|=12(1111). Unlike the probabilistic mixture, this superposition can display quantum interference.
Geometrically, the set of density operators is a convex set, and the pure states are the extremal points of that set. The simplest case is that of a two-dimensional Hilbert space, known as a qubit. An arbitrary mixed state for a qubit can be written as a linear combination of the Pauli matrices, which together with the identity matrix provide a basis for 2×2 self-adjoint matrices: ρ=12(I+rxσx+ryσy+rzσz), where the real numbers (rx,ry,rz) are the coordinates of a point within the unit ball and
σx=(0110),σy=(0−ii0),σz=(100−1). Points with rx2+ry2+rz2=1 represent pure states, while mixed states are represented by points in the interior. This is known as the Bloch sphere picture of qubit state space.
Example: light polarization
… excerpt ends here. Continue reading the full article.

![Density matrix: The incandescent light bulb (1) emits completely random polarized photons (2) with mixed state density matrix:
[0.5000.5].
After passing through vertical plane polarizer (3), the remaining photons are all vertically polarized (4) and have pure state density matrix:
[1000].](https://thumb.wikimedia.org/wikipedia/commons/thumb/6/6d/Vertical_polarization.svg/500px-Vertical_polarization.svg.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)