In short

The inner product \langle\phi|\psi\rangle is a complex number that measures how much two quantum states overlap. Mechanically it is a row (the bra) times a column (the ket), with the bra's entries complex-conjugated. Orthogonal states have \langle\phi|\psi\rangle = 0 — no overlap — and an orthonormal basis is a set where every pair is orthogonal and each state has \langle\psi|\psi\rangle = 1. Every physical state must be normalised: \langle\psi|\psi\rangle = 1, because |\langle i|\psi\rangle|^2 is the probability of measuring outcome i, and probabilities have to add up to 1.

Imagine two arrows drawn on the same page. They share a starting point; they point in different directions. You want one number that says how aligned they are: if they point the same way, the number is big; if they point at right angles, it is zero; if they point in opposite directions, it is negative. In two-dimensional real geometry this number is the familiar dot product \mathbf{v} \cdot \mathbf{w} = |\mathbf{v}|\,|\mathbf{w}|\cos\theta. Draw the two arrows and you see the geometry: one number, one angle, one picture.

Quantum states carry exactly this same idea — with one twist. A quantum state is a vector in a complex vector space, not a real one. You cannot literally draw it as an arrow on the page, but the same alignment question still makes sense: given two states |\phi\rangle and |\psi\rangle, how much do they overlap? The answer is a complex number called the inner product, written \langle\phi|\psi\rangle. It plays exactly the role the dot product plays for ordinary vectors — and a little more besides, because its magnitude squared turns out to be the probability of measuring one state and getting the other.

This chapter builds that single number. You will see where the complex conjugation comes from, why orthogonal states have zero overlap, why every physical state must satisfy \langle\psi|\psi\rangle = 1, and why the identity matrix is secretly a sum of projectors — all from one definition.

The geometric picture — overlap as alignment

Start with real vectors on a flat page. Two arrows \mathbf{v} and \mathbf{w} meet at an angle \theta. Their dot product is

\mathbf{v} \cdot \mathbf{w} = |\mathbf{v}|\,|\mathbf{w}|\cos\theta.

Three easy facts fall out of this formula:

  1. If the arrows point the same direction (\theta = 0), \cos\theta = 1 and the dot product is just |\mathbf{v}|\,|\mathbf{w}|.
  2. If they are perpendicular (\theta = \pi/2), \cos\theta = 0 and the dot product is 0.
  3. If they point in opposite directions (\theta = \pi), \cos\theta = -1 and the dot product is -|\mathbf{v}|\,|\mathbf{w}|.

Now assume both are unit vectors, so |\mathbf{v}| = |\mathbf{w}| = 1. Then \mathbf{v} \cdot \mathbf{w} = \cos\theta — a single number between -1 and +1 that is exactly the cosine of the angle between them. The dot product is the alignment.

Inner product as alignment between two arrowsA 2D plot with two arrows starting from the origin. One arrow labelled psi points along the positive x-axis. Another arrow labelled phi points diagonally up and to the right. The angle theta between them is marked by an arc, and a label shows that the inner product equals cosine of theta for unit vectors.xy|ψ⟩|φ⟩θfor unit vectors: ⟨φ|ψ⟩ = cos θ (real case)
Two unit arrows. Their inner product is the cosine of the angle between them — $+1$ when aligned, $0$ when perpendicular, $-1$ when opposite. The quantum inner product is the complex-number generalisation of this picture.

Why unit vectors: the dot product of general vectors mixes two pieces of information — the angle and the lengths. For quantum states you fix the length to 1 (you will see why in a moment) so that the inner product carries only the angle, leaving the magnitudes out of the way.

The quantum version is the same idea in complex dimensions. Two quantum states |\phi\rangle and |\psi\rangle are vectors in a complex vector space. They have a "length" (more precisely, a norm) and a "direction." The inner product \langle\phi|\psi\rangle gives you one complex number that captures how aligned the two are — generalising \cos\theta into the complex plane. When the states are unit vectors, |\langle\phi|\psi\rangle| is between 0 and 1, and it is exactly 1 when |\phi\rangle and |\psi\rangle are the same state (up to phase), and exactly 0 when they are orthogonal.

The next few sections make "quantum inner product" fully concrete.

Defining the inner product — the mechanical rule

You met the mechanical definition in chapter 4. Write two qubit states as

|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}, \qquad |\phi\rangle = \gamma\,|0\rangle + \delta\,|1\rangle = \begin{pmatrix} \gamma \\ \delta \end{pmatrix}.

The inner product \langle\phi|\psi\rangle is the bra \langle\phi| — the row (\gamma^*, \delta^*) — multiplied into the ket |\psi\rangle — the column (\alpha, \beta)^T:

\langle\phi|\psi\rangle = (\gamma^*, \delta^*) \begin{pmatrix} \alpha \\ \beta \end{pmatrix} = \gamma^*\alpha + \delta^*\beta.

One complex number. Two coefficients from |\phi\rangle, conjugated; two from |\psi\rangle, kept as they are; paired up and added.

Why the conjugation on |\phi\rangle: the inner product needs to satisfy two geometric requirements at once. First, the norm \langle\psi|\psi\rangle should be a non-negative real number — otherwise it cannot be a length. Second, the inner product should be linear in |\psi\rangle so that it plays nicely with superposition. The only way to get both of these in a complex vector space is to complex-conjugate one side. Putting the conjugation on the bra (the left-hand side) is the physicist's convention; mathematicians sometimes put it on the other side.

The same rule generalises directly to bigger spaces. If |\psi\rangle and |\phi\rangle live in \mathbb{C}^n with components \alpha_i and \gamma_i, then

\langle\phi|\psi\rangle = \sum_{i=1}^{n} \gamma_i^*\,\alpha_i.

Sum of conjugated-coefficient times coefficient, one term per basis state.

An immediate consequence: the norm

Take |\phi\rangle = |\psi\rangle in the formula. The inner product becomes

\langle\psi|\psi\rangle = \alpha^*\alpha + \beta^*\beta = |\alpha|^2 + |\beta|^2.

A sum of squared magnitudes. This is always a non-negative real number, and it is zero only when every component is zero — that is, only when |\psi\rangle = 0.

The quantity \sqrt{\langle\psi|\psi\rangle} is called the norm of |\psi\rangle and is often written \||\psi\rangle\|. It is the quantum analogue of the length of an arrow. For a physical quantum state, you always have \langle\psi|\psi\rangle = 1 — the norm is 1 — because of the probability rule you are about to see.

Another immediate consequence: what happens when you flip the inner product

What is \langle\psi|\phi\rangle, the inner product the other way round? Apply the rule:

\langle\psi|\phi\rangle = \alpha^*\gamma + \beta^*\delta.

Compare with \langle\phi|\psi\rangle = \gamma^*\alpha + \delta^*\beta. These are different numbers, in general — but they are complex conjugates of each other, because taking the conjugate of \gamma^*\alpha + \delta^*\beta gives (\gamma^*\alpha)^* + (\delta^*\beta)^* = \alpha^*\gamma + \beta^*\delta. So:

\langle\phi|\psi\rangle = \overline{\langle\psi|\phi\rangle}.

This is the conjugate-symmetry of the inner product. For real vectors the dot product is symmetric, \mathbf{v} \cdot \mathbf{w} = \mathbf{w} \cdot \mathbf{v}; for complex vectors you get symmetry up to complex conjugation. The magnitude is symmetric, |\langle\phi|\psi\rangle| = |\langle\psi|\phi\rangle|, but the phase flips sign.

Why this matters: when you square the inner product to get a probability (the next section), the conjugation flip does not show up — |z|^2 = |\bar z|^2. So physical predictions do not care which way round you write the inner product, but the intermediate symbols do.

Overlap and the probability link

Here is the physical meaning of the inner product. If you prepare a quantum system in the state |\psi\rangle and then measure it in a basis that contains |\phi\rangle as one of its outcomes, the probability that your measurement returns "\phi" is

P(\phi\,|\,\psi) = |\langle\phi|\psi\rangle|^2.

The magnitude squared of the inner product is a probability. This is known as the Born rule, and chapter 11 derives it carefully from the measurement postulate. For now, treat it as a fact about what the inner product means: it measures the likelihood that a state prepared as |\psi\rangle will be observed as |\phi\rangle.

Three consequences, which you will use constantly:

The inner product is the bridge between the geometry of Hilbert space and the experimental statistics of quantum mechanics.

Orthogonality — perfectly distinguishable states

Two states are orthogonal when their inner product is zero:

\langle\phi|\psi\rangle = 0.

For the computational basis, this is immediate: |0\rangle and |1\rangle are orthogonal because

\langle 0|1\rangle = (1, 0) \begin{pmatrix} 0 \\ 1 \end{pmatrix} = 1 \cdot 0 + 0 \cdot 1 = 0.

Orthogonality is not a vague "these states are different" statement. It is an experimental statement: if you prepare |1\rangle and measure in the \{|0\rangle, |1\rangle\} basis, you get |1\rangle with probability 1 and |0\rangle with probability 0. The two states are perfectly distinguishable by a measurement in the basis that contains both of them.

The X-basis gives another pair of orthogonal states. The eigenstates of the Pauli-X operator are

|+\rangle = \tfrac{1}{\sqrt{2}}\bigl(|0\rangle + |1\rangle\bigr), \qquad |-\rangle = \tfrac{1}{\sqrt{2}}\bigl(|0\rangle - |1\rangle\bigr).

Compute \langle +|-\rangle. Using the rule "conjugate the bra's coefficients and multiply":

\langle +|-\rangle = \tfrac{1}{\sqrt{2}} \cdot \tfrac{1}{\sqrt{2}} + \tfrac{1}{\sqrt{2}} \cdot \bigl(-\tfrac{1}{\sqrt{2}}\bigr) = \tfrac{1}{2} - \tfrac{1}{2} = 0.

So |+\rangle and |-\rangle are orthogonal. Notice how the two basis states look almost the same on paper — they differ only by a minus sign on the second term — and yet that minus sign makes them as distinguishable as |0\rangle and |1\rangle. This is a recurring quantum phenomenon: tiny-looking phase changes produce fully distinguishable states.

Orthogonality in the complex case is subtler than perpendicularity

For real vectors, orthogonality is "perpendicular" — the two arrows meet at 90°. For complex vectors, "perpendicular" is not quite the right word. Consider the states

|\alpha\rangle = |0\rangle, \qquad |\beta\rangle = e^{i\varphi}|0\rangle.

These two states differ only by a global phase e^{i\varphi}. Physically they are the same state (global phases are unobservable, as you saw in chapter 14). The inner product is

\langle\alpha|\beta\rangle = \langle 0|e^{i\varphi}|0\rangle = e^{i\varphi}\langle 0|0\rangle = e^{i\varphi}.

So \langle\alpha|\beta\rangle = e^{i\varphi}, a complex number of magnitude 1. Its magnitude squared is 1. The two states have probability 1 of being identified with each other — they are, physically, the same state. But the inner product itself is not 1; it is e^{i\varphi}. This is the complex-vs-real subtlety: the magnitude of the inner product carries the physical information; the phase is bookkeeping that gets squared away.

Real vectors have no such phase freedom, and "orthogonal" and "perpendicular" mean the same thing. Complex vectors have more room, and orthogonality is the stronger condition that \langle\phi|\psi\rangle = 0 as a complex number, not just |\langle\phi|\psi\rangle| = 0 — though for magnitude-zero these happen to coincide.

Orthonormal bases — a complete and clean coordinate system

A set of states \{|i\rangle\} is an orthonormal basis if:

  1. Each state is normalised: \langle i|i\rangle = 1.
  2. Different states are orthogonal: \langle i|j\rangle = 0 for i \neq j.
  3. Any state in the space can be written as a sum |\psi\rangle = \sum_i c_i|i\rangle for some coefficients c_i.

Condition 1 and 2 combined — \langle i|j\rangle = \delta_{ij} — is the orthonormality condition. Condition 3 is the completeness condition.

For a single qubit, the canonical orthonormal basis is \{|0\rangle, |1\rangle\}: each is normalised, the two are orthogonal, and any state |\psi\rangle = \alpha|0\rangle + \beta|1\rangle is a linear combination. The X-basis \{|+\rangle, |-\rangle\} is another orthonormal basis for the same space. Any state can be written in the X-basis too: |\psi\rangle = c_+|+\rangle + c_-|-\rangle with appropriate c_\pm. These are two different coordinate systems for the same 2-dimensional complex space, like Cartesian and polar coordinates for the plane.

Overlaps of the four canonical single-qubit statesA 4-by-4 grid. Rows and columns are labelled by the four states: |0>, |1>, |+>, |->. Each cell shows the inner product value, with diagonal entries equal to 1 and other entries either 0 or ±1 over root 2, color-coded.⟨row|col⟩|0⟩|1⟩|+⟩|−⟩⟨0|101/√21/√2⟨1|011/√2−1/√2⟨+|1/√21/√210⟨−|1/√2−1/√201
All 16 inner products of the four canonical single-qubit states. The red diagonal entries are 1 (each state has unit norm). The grey 0 entries mark orthogonal pairs ($|0\rangle$-$|1\rangle$, $|+\rangle$-$|{-}\rangle$). The middle $\pm 1/\sqrt{2}$ entries are intermediate overlaps, and their squares are the $50\%$ probabilities you saw on the Bloch sphere.

Two properties of orthonormal bases that make them useful:

Normalisation — why every state satisfies \langle\psi|\psi\rangle = 1

Every physical quantum state must be normalised:

\langle\psi|\psi\rangle = 1.

The reason is probability. If you measure |\psi\rangle in an orthonormal basis \{|i\rangle\}, the probability of getting outcome i is |\langle i|\psi\rangle|^2. The probabilities across all outcomes must sum to 1 (something has to happen, after all). So:

\sum_i |\langle i|\psi\rangle|^2 = 1.

Now use the two properties from the previous section. The left side is \sum_i |c_i|^2 = \sum_i c_i^* c_i. That sum is exactly \langle\psi|\psi\rangle:

\langle\psi|\psi\rangle = \Bigl(\sum_i c_i^*\langle i|\Bigr)\Bigl(\sum_j c_j|j\rangle\Bigr) = \sum_{i,j} c_i^* c_j \langle i|j\rangle = \sum_i c_i^* c_i = \sum_i |c_i|^2.

Why the double sum collapses: \langle i|j\rangle = \delta_{ij}, so out of all the i-j pairs only those with i = j survive — every cross-term is zero. The sum over all pairs reduces to a sum over just the diagonal.

So \langle\psi|\psi\rangle = \sum_i|c_i|^2, and the probabilities-sum-to-1 requirement says this equals 1. Hence every physically meaningful state has norm 1.

If a state does not have norm 1, it is an unnormalised representative of a physical state — fine as an intermediate step in a calculation, but you must divide by the norm before extracting probabilities. Example 2 below walks through this.

The completeness relation — the identity as a sum of projectors

Here is a subtle-looking identity that turns out to be one of the most useful in quantum mechanics. For any orthonormal basis \{|i\rangle\},

\sum_i |i\rangle\langle i| = I,

where I is the identity operator. In words: the sum of the outer products |i\rangle\langle i| over an orthonormal basis equals the identity matrix.

You will meet outer products properly in chapter 6; here it is enough to know what |i\rangle\langle i| is as a matrix. For |0\rangle = (1, 0)^T:

|0\rangle\langle 0| = \begin{pmatrix} 1 \\ 0 \end{pmatrix} (1, 0) = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}.

And for |1\rangle:

|1\rangle\langle 1| = \begin{pmatrix} 0 \\ 1 \end{pmatrix} (0, 1) = \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}.

Sum them:

|0\rangle\langle 0| + |1\rangle\langle 1| = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I.

Why this works for any orthonormal basis, not just the computational one: any orthonormal basis is a rotated copy of \{|0\rangle, |1\rangle\}, and the identity matrix is rotation-invariant. The sum \sum_i |i\rangle\langle i| is just "project onto the i-th basis direction, sum over all directions," and if you cover all directions orthogonally you are doing nothing at all.

Why call it "completeness"? Because the fact that the sum equals I is what it means for the basis to be complete — there is no direction left uncovered; every vector can be reached. An incomplete set of orthonormal vectors (say, only |0\rangle) gives |0\rangle\langle 0| \neq I — that sum is a projector onto the 1-dimensional subspace spanned by |0\rangle, not the full identity.

The completeness relation is the single most-used identity in intermediate-level quantum mechanics. It lets you "insert the identity" anywhere you want, in the form of a sum of projectors, and expand any operator or state in whatever basis is convenient. You will see it bookend derivations throughout Part 6 and Part 9.

Completeness as a sum of projectorsA visual identity. The left side shows two matrices side by side, each with a single 1 on the diagonal and zeros elsewhere. A plus sign between them. On the right, an equals sign and the 2-by-2 identity matrix.|0⟩⟨0|1000+|1⟩⟨1|0001=I1001the identity is the sum of the rank-1 projectors onto each basis direction∑ᵢ |i⟩⟨i| = I — the completeness relation
Completeness as a jigsaw. The projector $|0\rangle\langle 0|$ catches the $|0\rangle$-direction; the projector $|1\rangle\langle 1|$ catches the $|1\rangle$-direction. Together they tile the identity — nothing left uncovered.

Worked examples

Example 1: Compute every overlap in the four-state family

Compute the inner products \langle 0|+\rangle, \langle 1|+\rangle, \langle +|{-}\rangle, \langle 0|0\rangle, and \langle 0|1\rangle. Present them in a table, and verify that \{|+\rangle, |{-}\rangle\} is an orthonormal basis.

Step 1. Write the four states as columns.

|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix},\ |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix},\ |+\rangle = \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix},\ |{-}\rangle = \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -1 \end{pmatrix}.

Why: the definitions of the computational-basis states and the X-basis states, written out explicitly. All four coefficients are real, so the bra is just the column laid flat — no conjugation changes.

Step 2. Compute each inner product using the row-times-column rule.

\langle 0|+\rangle = (1, 0) \cdot \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \tfrac{1}{\sqrt{2}}(1 \cdot 1 + 0 \cdot 1) = \tfrac{1}{\sqrt{2}}.
\langle 1|+\rangle = (0, 1) \cdot \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \tfrac{1}{\sqrt{2}}(0 \cdot 1 + 1 \cdot 1) = \tfrac{1}{\sqrt{2}}.
\langle +|{-}\rangle = \tfrac{1}{\sqrt{2}}(1, 1) \cdot \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -1 \end{pmatrix} = \tfrac{1}{2}(1 - 1) = 0.
\langle 0|0\rangle = (1, 0)\begin{pmatrix} 1 \\ 0 \end{pmatrix} = 1, \qquad \langle 0|1\rangle = (1, 0)\begin{pmatrix} 0 \\ 1 \end{pmatrix} = 0.

Why the pattern: each inner product is two numbers added (for 2-dimensional states). When the two non-zero components align, you get 1/\sqrt{2} or 1. When they cancel (as in \langle +|{-}\rangle), you get 0.

Step 3. Present in a table.

Overlap Value
\langle 0 | 0\rangle 1
\langle 0 | 1\rangle 0
\langle 0 | +\rangle 1/\sqrt{2}
\langle 1 | +\rangle 1/\sqrt{2}
\langle +|{-}\rangle 0

Step 4. Verify \{|+\rangle, |{-}\rangle\} is an orthonormal basis. You need \langle +|+\rangle = 1, \langle {-}|{-}\rangle = 1, and \langle +|{-}\rangle = 0.

\langle +|+\rangle = \tfrac{1}{2}(1 + 1) = 1, \quad \langle {-}|{-}\rangle = \tfrac{1}{2}(1 + 1) = 1, \quad \langle +|{-}\rangle = 0.

All three conditions hold, so \{|+\rangle, |{-}\rangle\} is an orthonormal basis. ✓

Result. Five inner products computed, \{|+\rangle, |{-}\rangle\} verified as an orthonormal basis.

Overlap values for the four canonical statesA horizontal bar chart. The x-axis lists pairs of states. The y-axis shows the overlap magnitude from 0 to 1. The bar for |0><0| is tall at 1. Bars for |0><1| and |+><-| are at 0. Bars for |0><+| and |1><+| are halfway, at 1/root-2.10.7070⟨0|0⟩⟨0|1⟩⟨0|+⟩⟨1|+⟩⟨+|−⟩red = identical state • pink = partial overlap • grey = orthogonal
Overlap magnitudes for five canonical pairs. Identical states (red) have overlap 1. Orthogonal states (grey) have overlap 0. The partial overlaps (pink) land at $1/\sqrt{2}$, which squared gives the $50\%$ probability of the computational-basis measurement on $|+\rangle$.

What this shows. The inner product gives you one number per pair of states, and that number is all you need to tell apart orthogonal, identical, and partially-overlapping states. Fluency with this table is the main reason quantum-computing students can read algorithms at a glance.

Example 2: Normalising a state

Given the unnormalised state

|\psi\rangle = 2|0\rangle + (1 - i)|1\rangle,

compute its norm and produce a normalised version.

Step 1. Write the state as a column, and write its bra as a conjugated row.

|\psi\rangle = \begin{pmatrix} 2 \\ 1 - i \end{pmatrix}, \qquad \langle\psi| = (2, \ 1 + i).

Why (1 - i)^* = 1 + i: the complex conjugate flips the sign of the imaginary part. The real coefficient 2 is its own conjugate.

Step 2. Compute \langle\psi|\psi\rangle as the row-times-column.

\langle\psi|\psi\rangle = (2, 1 + i)\begin{pmatrix} 2 \\ 1 - i \end{pmatrix} = 2 \cdot 2 + (1 + i)(1 - i).

Why the structure: the rule is "i-th bra coefficient times i-th ket coefficient, summed." Two terms for a two-dimensional space.

Step 3. Expand the product (1+i)(1-i).

(1 + i)(1 - i) = 1 - i + i - i^2 = 1 - (-1) = 2.

Why this always gives a real answer: the product of a complex number with its conjugate is |z|^2 = z^* z, which is always real and non-negative. Here |1 - i|^2 = 1^2 + 1^2 = 2 — two, just as computed.

Step 4. Add the terms to get the squared norm.

\langle\psi|\psi\rangle = 4 + 2 = 6.

The norm is \||\psi\rangle\| = \sqrt{6}.

Step 5. Divide by the norm to normalise.

|\psi_{\text{norm}}\rangle = \tfrac{1}{\sqrt{6}}\,|\psi\rangle = \tfrac{2}{\sqrt{6}}|0\rangle + \tfrac{1-i}{\sqrt{6}}|1\rangle.

Verify: \langle\psi_{\text{norm}}|\psi_{\text{norm}}\rangle = \tfrac{1}{6}\langle\psi|\psi\rangle = \tfrac{1}{6} \cdot 6 = 1. ✓

Result. The unnormalised state 2|0\rangle + (1-i)|1\rangle has norm \sqrt{6}. Dividing by \sqrt{6} gives the normalised state \tfrac{2}{\sqrt{6}}|0\rangle + \tfrac{1-i}{\sqrt{6}}|1\rangle, which now satisfies \langle\psi_{\text{norm}}|\psi_{\text{norm}}\rangle = 1.

Normalising an unnormalised state vectorTwo arrows from a common origin. The longer arrow is labelled unnormalised with norm root-6. The shorter arrow, same direction, ends on a unit-circle and is labelled normalised with norm 1. A dashed circle of radius 1 marks the unit-norm surface.unit circleunnormalisednorm = √6normalisednorm = 1dividing by √6 shrinks the vector to the unit circle without changing its direction
Normalisation is a pure rescaling. The direction of the state vector in Hilbert space does not change; only the length is rescaled to 1. After normalisation, the state satisfies $\langle\psi|\psi\rangle = 1$ and is ready for probability extraction.

What this shows. Normalisation is not a physical change — it is a bookkeeping step. The direction of the vector in Hilbert space is what encodes the physical state; the magnitude is something you can freely rescale. Any derivation that produces an unnormalised state can be normalised at the end by dividing by \sqrt{\langle\psi|\psi\rangle}, and the resulting state is the physically meaningful one.

Common confusions

Going deeper

If you can compute an inner product by eye, recognise orthogonal pairs, normalise a given state, and apply the completeness relation to expand a state in any basis — you have everything you need for the next several chapters. What follows is optional context: the Schwarz inequality and what it guarantees, a brief tour of Gram-Schmidt orthogonalisation, how completeness lets you write an operator as a matrix of matrix elements, and a peek at the infinite-dimensional case.

The Cauchy-Schwarz inequality

One of the oldest and most useful inequalities in linear algebra, applied to the quantum inner product, reads

|\langle\phi|\psi\rangle|^2 \leq \langle\phi|\phi\rangle\,\langle\psi|\psi\rangle,

with equality if and only if |\phi\rangle and |\psi\rangle are proportional (one is a scalar multiple of the other). For unit vectors, the right-hand side is 1 and the inequality becomes |\langle\phi|\psi\rangle| \leq 1.

Connect this to the geometric picture. For real unit vectors, \langle\phi|\psi\rangle = \cos\theta, and |\cos\theta| \leq 1 with equality only at \theta = 0 or \pi. The Cauchy-Schwarz inequality is the complex-vector restatement of exactly this: the magnitude of the inner product of two unit vectors cannot exceed 1, and it equals 1 only when they point in the same direction (up to a phase).

A quick proof. Consider the state |\chi\rangle = |\phi\rangle - \frac{\langle\psi|\phi\rangle}{\langle\psi|\psi\rangle}|\psi\rangle — the component of |\phi\rangle orthogonal to |\psi\rangle. Since \langle\chi|\chi\rangle \geq 0:

\langle\chi|\chi\rangle = \langle\phi|\phi\rangle - \frac{|\langle\psi|\phi\rangle|^2}{\langle\psi|\psi\rangle} \geq 0.

Why: expanding \langle\chi|\chi\rangle gives four cross-terms; two of them cancel against each other, and the survivors rearrange into \langle\phi|\phi\rangle - |\langle\psi|\phi\rangle|^2 / \langle\psi|\psi\rangle. Requiring this to be non-negative gives the inequality.

Rearranging: |\langle\psi|\phi\rangle|^2 \leq \langle\phi|\phi\rangle\langle\psi|\psi\rangle, which is Schwarz. This inequality underlies the uncertainty principle (where it bounds the product of two observables' variances), the Bell inequalities (where it bounds classical correlations), and many quantum-information quantities.

Gram-Schmidt orthogonalisation

Suppose you have a list of linearly independent but not orthogonal vectors, and you want an orthonormal basis for the same space. The Gram-Schmidt procedure builds one step by step.

Step 1. Take the first vector |v_1\rangle and normalise it: |e_1\rangle = |v_1\rangle / \||v_1\rangle\|.

Step 2. Take the second vector |v_2\rangle, subtract off its component along |e_1\rangle, and normalise the remainder:

|u_2\rangle = |v_2\rangle - \langle e_1|v_2\rangle\,|e_1\rangle, \qquad |e_2\rangle = |u_2\rangle / \||u_2\rangle\|.

Why this works: subtracting \langle e_1|v_2\rangle\,|e_1\rangle removes the part of |v_2\rangle that lies along |e_1\rangle. What is left is orthogonal to |e_1\rangle by construction — you just killed all of the overlap.

Step 3. For the third vector, subtract off both components and normalise. In general, for the k-th input vector, subtract the components along each of the previously constructed orthonormal vectors.

Example in 2D: start with |v_1\rangle = |0\rangle + |1\rangle and |v_2\rangle = |0\rangle. First, normalise |v_1\rangle: its norm is \sqrt{2}, so |e_1\rangle = (|0\rangle + |1\rangle)/\sqrt{2} = |+\rangle. Next, \langle e_1|v_2\rangle = \langle +|0\rangle = 1/\sqrt{2}, so

|u_2\rangle = |0\rangle - \tfrac{1}{\sqrt{2}}|+\rangle = |0\rangle - \tfrac{1}{\sqrt{2}} \cdot \tfrac{|0\rangle + |1\rangle}{\sqrt{2}} = |0\rangle - \tfrac{1}{2}|0\rangle - \tfrac{1}{2}|1\rangle = \tfrac{1}{2}(|0\rangle - |1\rangle).

The norm of |u_2\rangle is \sqrt{1/4 + 1/4} = 1/\sqrt{2}, so |e_2\rangle = |u_2\rangle \cdot \sqrt{2} = (|0\rangle - |1\rangle)/\sqrt{2} = |{-}\rangle. The procedure has produced the X-basis \{|+\rangle, |{-}\rangle\} from the non-orthogonal pair \{|+\rangle \cdot \sqrt{2}, |0\rangle\}.

Gram-Schmidt is how you would build an orthonormal basis from scratch given any linearly independent spanning set. In quantum computing it rarely comes up explicitly — the bases you meet are usually already orthonormal — but it is the theoretical guarantee that orthonormal bases exist for every Hilbert space.

The completeness relation as a resolution of the identity

The trick \sum_i|i\rangle\langle i| = I is called a resolution of the identity because it decomposes I into a sum of rank-1 projectors. Its real power is in expanding operators.

Take any operator A. Insert the identity on both sides:

A = I \cdot A \cdot I = \Bigl(\sum_i |i\rangle\langle i|\Bigr) A \Bigl(\sum_j |j\rangle\langle j|\Bigr) = \sum_{i, j} |i\rangle \langle i|A|j\rangle \langle j| = \sum_{i, j} A_{ij}\,|i\rangle\langle j|,

where A_{ij} = \langle i|A|j\rangle are the matrix elements of A in the basis \{|i\rangle\}.

Why this is useful: any operator can be rebuilt from its matrix elements A_{ij} and the outer products |i\rangle\langle j|. The matrix elements are numbers; the outer products are fixed, basis-dependent objects. Together they reconstruct the operator. This is the formal statement that "operators in quantum mechanics are matrices in a basis" — the completeness relation is the bookkeeping that makes the translation precise.

Every computation in Parts 6-10 of this track uses this move. Whenever you see a sum over basis states with |i\rangle\langle j| or |i\rangle\langle i| buried inside a derivation, the completeness relation is what put it there.

Inner products in infinite-dimensional spaces

The formulas in this chapter generalise to infinite-dimensional Hilbert spaces without any essential change — you only replace sums by integrals. The state of a particle on a line is a wavefunction \psi(x), a complex-valued function of position, and the ket |\psi\rangle is identified with the function itself. The inner product of two wavefunctions is

\langle\phi|\psi\rangle = \int_{-\infty}^{\infty} \phi^*(x)\,\psi(x)\,dx.

Orthonormality becomes

\langle\phi|\psi\rangle = \delta_{mn} \quad\text{(discrete basis)} \qquad \text{or} \qquad \langle x|x'\rangle = \delta(x - x') \quad\text{(continuous basis)}

where \delta(x - x') is the Dirac delta function. Normalisation becomes

\int_{-\infty}^{\infty} |\psi(x)|^2\,dx = 1,

which says the probability of finding the particle somewhere in space is 1. Completeness becomes

\int_{-\infty}^{\infty} |x\rangle\langle x|\,dx = I.

Every identity you have met in this chapter has an infinite-dimensional version. Dirac notation runs over them unchanged — which is why the formalism is so widely used. You will meet these continuous versions in Part 9 when the track covers position and momentum observables.

An Indian-context aside — Bose's counting

The word statistics in quantum mechanics usually means "how do you count states." Photons — identical bosons — have a specific rule for how indistinguishable copies must be counted, and that rule was derived by Satyendra Nath Bose in 1924. The counting relies on the inner product: two photon states that look different in symbol form but are related by a particle swap give the same state (inner product 1 with each other), and the counting of distinct physical states must reflect that. Without the inner-product rule and the orthogonality condition on basis states, there is no way to state what "identical bosons" means precisely — and without Bose's counting, quantum mechanics cannot describe a laser, a Bose-Einstein condensate, or the photon statistics from a distant star. The machinery this chapter sets up is what makes Bose's 1924 argument work.

Where this leads next

References

  1. Nielsen and Chuang, Quantum Computation and Quantum InformationCambridge University Press, §2.1.4.
  2. John Preskill, Lecture Notes on Quantum Computationtheory.caltech.edu/~preskill/ph229, Chapter 2.
  3. Wikipedia, Inner product space.
  4. Wikipedia, Bra–ket notation — the overlap \langle\phi|\psi\rangle in situ.
  5. Qiskit Textbook, Linear algebra for quantum computing — inner-product worked examples with qubit states.
  6. Wikipedia, Satyendra Nath Bose — context for the Bose-counting aside above.