Inner Products & Norms
Inner Products & Norms
The inner product is how quantum mechanics measures overlap between states — and overlap is probability. The Born rule, orthogonality of distinguishable outcomes, normalization of states, and the geometry of the Bloch sphere all reduce to the single structure we build here. Get the conjugate-linear convention right and everything downstream is clean.
Learning Objectives
After this lesson you will be able to:
- State the axioms of a complex inner product and compute on .
- Prove and apply the Cauchy–Schwarz and triangle inequalities.
- Test vectors for orthogonality and normalize them.
- Run Gram–Schmidt to produce an orthonormal basis.
- Expand a vector in an orthonormal basis via projection, and state Parseval's identity.
Intuition
In the dot product measures how much two vectors "agree": it's largest when they point the same way, zero when perpendicular. It also defines length: .
Over we need a twist. If we naïvely used , the "length squared" of would be — nonsense for a length. The fix is to conjugate one factor: . That single conjugation is the whole story of complex inner products, and it's exactly what makes a valid probability later.
Theory
Definition: complex inner product
An inner product on a complex vector space is a map $\langle\cdot,\cdot\rangle : V\times V \to \mathbb{C}u,v,w \in Va \in \mathbb{C}$:
Convention (physics / this program). We make the inner product linear in the second argument and conjugate-linear in the first: , which follows from (I1)+(I2). This matches Dirac notation (next lesson) and [NC]. Many mathematics texts (e.g. [Axl]) put linearity in the first argument instead — be alert when reading across sources. See Appendix C.
A vector space with an inner product is an inner product space. (Finite-dimensional inner product spaces over are automatically complete, hence are Hilbert spaces — the term you'll hear constantly. Completeness only bites in infinite dimensions, which we avoid.)
The standard inner product on
where is the conjugate transpose (a row vector). Check the axioms: (I1) $\overline{\langle v,u\rangle} = \overline{\sum \overline{v_k} u_k} = \sum v_k \overline{u_k} = \langle u,v\ranglev\langle v,v\rangle = \sum |v_k|^2 \ge 0$ with equality iff every .
⚠️ NumPy:
np.vdot(u, v)conjugates its first argument, matching our convention exactly.np.dotdoes not conjugate — wrong for complex vectors.
Norm
The inner product induces a norm (length):
A vector with is a unit vector; normalizing means . Physical quantum states are unit vectors — this is the normalization condition you'll impose in Term 1.
Cauchy–Schwarz inequality
For all in an inner product space,
with equality iff and are linearly dependent.
Proof. If both sides are . Otherwise, for any , . Expand using the axioms:
Choose (the projection coefficient). Using , the cross terms combine and simplify to
Taking square roots gives the result. Equality holds iff , i.e. are dependent. ∎
Cauchy–Schwarz is the workhorse inequality of quantum information — it bounds state overlaps, underlies the uncertainty principle (Term 1.3), and guarantees fidelities lie in .
Triangle inequality
. Proof: $|u+v|^2 = |u|^2 + 2,\mathrm{Re}\langle u,v\rangle + |v|^2 \le |u|^2 + 2|\langle u,v\rangle| + |v|^2 \le |u|^2 + 2|u||v| + |v|^2 = (|u|+|v|)^2$, using then Cauchy–Schwarz. ∎
Orthogonality and orthonormal bases
- (orthogonal) means . Physically, orthogonal states are perfectly distinguishable by a measurement.
- A set is orthonormal if (orthogonal and each of unit norm).
- Orthonormal sets are automatically independent, so an orthonormal spanning set is an orthonormal basis (ONB).
Expansion in an ONB. If is an ONB, then for any ,
The coordinate is just the projection — no linear system to solve. This is why orthonormal bases are so convenient, and why the computational basis is chosen orthonormal. The squared coordinates obey Parseval's identity:
For a normalized state and a measurement basis , the terms are exactly the Born-rule probabilities and Parseval says they sum to .
Gram–Schmidt orthonormalization
Any basis can be turned into an orthonormal one. Given independent , define
Each step subtracts off the components already accounted for, leaving a vector orthogonal to the previous , then normalizes. The result is an ONB with the same span.
Worked Examples
Example 1 — Inner product, norm, and a probability
Let and the measurement basis .
Norm: So is already normalized. The overlap with is , so the probability of outcome "1" is . By Parseval the two outcome probabilities are and sum to . ✓
Example 2 — Gram–Schmidt in
Orthonormalize , .
. Then
Norm , so . The ONB is exactly . Check: . ✓
Hands-on (Python)
import numpy as np
def inner(u, v):
"""⟨u, v⟩ with our convention: conjugate-linear in u, linear in v."""
return np.vdot(u, v) # vdot conjugates its FIRST argument — exactly right
def norm(v):
return np.sqrt(np.real(inner(v, v))) # ⟨v,v⟩ is real & ≥ 0; drop tiny imaginary noise
def normalize(v):
return v / norm(v)
psi = normalize(np.array([1, 1j], dtype=complex))
print(norm(psi)) # 1.0
ket1 = np.array([0, 1], dtype=complex)
print(abs(inner(ket1, psi))**2) # 0.4999... = Born probability of outcome "1"def gram_schmidt(vectors):
"""Return an orthonormal basis spanning the same space (modified Gram–Schmidt)."""
basis = []
for v in vectors:
w = v.astype(complex).copy()
for e in basis:
w = w - inner(e, v) * e # subtract projections onto earlier vectors
n = norm(w)
if n > 1e-12: # skip vectors that are (numerically) dependent
basis.append(w / n)
return basis
E = gram_schmidt([np.array([1, 1]), np.array([1, 0])])
for e in E:
print(np.round(e, 3))
# [0.707+0.j 0.707+0.j] -> |+>
# [ 0.707+0.j -0.707+0.j] -> |->
# Verify orthonormality: the Gram matrix G[i,j] = ⟨e_i, e_j⟩ should be the identity.
G = np.array([[inner(a, b) for b in E] for a in E])
print(np.allclose(G, np.eye(len(E)))) # True# Expansion in an ONB via projection (no linear solve needed):
v = np.array([2, 3j], dtype=complex)
coords = [inner(e, v) for e in E] # ⟨e_k, v⟩
recon = sum(c * e for c, e in zip(coords, E))
print(np.allclose(recon, v)) # True
print(np.isclose(norm(v)**2, sum(abs(c)**2 for c in coords))) # Parseval: TrueExercises
E1 (easy). Compute , , and for , , and verify Cauchy–Schwarz numerically.
Solution
. , . Then $|\langle u,v\rangle| = 1 \le \sqrt{10} = |u||v|$. ✓
E2 (easy). Show and form an ONB, and expand in it.
Solution
and both have norm , so they're an ONB. Coordinates: , . Hence . (Born check: each outcome probability is , summing to 1.)
E3 (medium). Prove the parallelogram law from the inner-product axioms.
Solution
Expand both: . Adding the and versions cancels the cross terms, leaving . ∎
E4 (medium). When does equality hold? Prove your claim and give the physical meaning for normalized quantum states.
Solution
Equality iff for the in the Cauchy–Schwarz proof, i.e. are linearly dependent (). For normalized states means $|\psi\rangle = e^{i\theta}|\phi\rangle$ — they are the same physical state up to global phase and are indistinguishable by any measurement.
E5 (hard). Let be an ONB and define the Gram matrix of vectors by . Prove is linearly independent iff is invertible.
Solution
Suppose for some coefficients . Take of both
sides: for all , i.e. ... more carefully, with our
convention , so .
If is invertible the only solution is ⇒ independence. Conversely if the are dependent,
a nonzero gives , hence with , so is singular. ∎
(This is exactly the matrix_rank independence test, recast through the inner product.)
Checkpoint
- Why must a complex inner product conjugate one argument? What goes wrong otherwise?
- State Cauchy–Schwarz and its equality condition; what does equality mean for quantum states?
- What does it mean physically for two states to be orthogonal?
- Why is expanding a vector in an orthonormal basis easier than in a general basis?
- State Parseval's identity and connect it to the Born rule summing to .
Answers
- Without conjugation could be negative/complex (e.g. gives ), so it couldn't define a length or a probability. Conjugating gives .
- , equality iff dependent; for normalized states equality means equal up to global phase — physically identical, indistinguishable.
- Orthogonal states are perfectly distinguishable: a measurement can tell them apart with certainty.
- Coordinates are projections — no linear system to solve — and Parseval gives the norm instantly.
- . For a normalized state the right side is the sum of Born probabilities, which equals .
Further Reading
- [Axl] Axler, Linear Algebra Done Right, Ch. 6 — inner product spaces, Gram–Schmidt (note: linear in the first argument there).
- [NC] Nielsen & Chuang, §2.1.4 — inner products, Gram–Schmidt, our conjugate convention.
- [Pre] Preskill, Ph219, Ch. 2 — Hilbert spaces.
← Prev: Complex Vector Spaces · Up: Term 0 · Next: Dirac Notation →