Lesson 3 · 60 min · core
Inner Products, Norms & Gram–Schmidt
The inner product on (antilinear in the first slot), norms and normalisation, full proofs of Cauchy–Schwarz, the triangle inequality and Pythagoras, orthonormal bases with Parseval's identity, and the Gram–Schmidt procedure with worked and examples.
Prerequisites: Complex Vector Spaces $\mathbb{C}^n$
Objectives and key results
Compute on , conjugating the entries of the first argument.
Compute norms and normalise vectors so that .
Prove and apply the Cauchy–Schwarz inequality and the triangle inequality.
Orthonormalise a list of vectors with the Gram–Schmidt procedure and expand vectors in an orthonormal basis using .
- definition · Standard inner product on C^n
- theorem · Cauchy–Schwarz inequality
- theorem · Triangle inequality
- algorithm · Gram–Schmidt
- identity · Parseval
The inner product on $\mathbb{C}^n$#
A vector space tells us how to add and scale states; an inner product adds geometry: lengths, angles and, above all, overlaps. In quantum mechanics the overlap between two states is the amplitude for finding a system prepared in in the state , and its modulus squared is a probability. Getting the inner product exactly right, including where the complex conjugate goes, is therefore not a matter of taste.
On the dot product gives . On the naive formula fails: for we would get for a nonzero vector. The fix is to conjugate one argument, because .
Definition
Standard inner product and norm
For the inner product is , where is the conjugate transpose (a row vector). The norm is . A vector with is a unit vector (normalised); two vectors with are orthogonal.
The inner-product axioms hold on
For all and : (i) conjugate symmetry ; (ii) linearity in the second slot ; (iii) positive-definiteness with equality only for . Consequently the first slot is antilinear: .
Proof (7 steps)
- Step 1:(i) Conjugation respects sums and products, , and multiplication commutes.
- Step 2:(ii) Distribute inside each term and pull the constants out of the sums.
- Step 3:Recognise the two sums as inner products.
- Step 4:(iii) Each term is a modulus squared, a non-negative real number.
- Step 5:A sum of non-negative reals vanishes only when every term does, and only for .
- Step 6:Antilinearity: flip the arguments with (i), then use (ii).
- Step 7:Conjugation respects sums and products; apply (i) once more.
∎
Worked example (an inner product). Let and . Conjugate the entries of first: . Then
Swapping the arguments conjugates the answer: , as axiom (i) demands.
Worked example (normalisation). For , , so the normalised vector is . As a qubit state this is , with outcome probabilities and . Note also : these two vectors are orthogonal although neither has a zero entry.
Cauchy–Schwarz, the triangle inequality and Pythagoras#
The Cauchy–Schwarz inequality is the most useful inequality in quantum information. It says that an overlap can never exceed the product of the lengths, and it is the reason that the fidelity between two unit vectors is a number between and . The proof below projects onto , removes that component, and observes that what is left has non-negative squared length.
Cauchy–Schwarz inequality
For all : , with equality if and only if and are linearly dependent (one is a complex multiple of the other).
Proof (9 steps)
- Step 1:If both sides vanish (linearity in the second slot gives ) and are dependent, so assume from now on.
- Step 2:Define the component of along and the remainder ; by positive-definiteness.
- Step 3:Linearity in the second slot; the remainder is orthogonal to . Taking conjugates, too.
- Step 4:Write and expand: linear in the second slot, antilinear in the first.
- Step 5:The cross terms vanish by orthogonality; substitute .
- Step 6:Rearrange; a squared norm is non-negative.
- Step 7:Multiply by ; conjugate symmetry gives .
- Step 8:Both sides are non-negative, so take square roots.
- Step 9:Equality holds exactly when the discarded term is zero, i.e. when is a multiple of ; conversely if then .
∎
Numerical check. With , from above: , while and , so . The inequality holds with plenty of room, as it should for vectors that are far from parallel.
Triangle inequality
For all : .
Proof (5 steps)
- Step 1:Expand using linearity in the second slot and antilinearity in the first (all coefficients are ).
- Step 2:Conjugate symmetry, and .
- Step 3:for every complex , since .
- Step 4:Cauchy–Schwarz, then recognise a perfect square.
- Step 5:Take non-negative square roots.
∎
Pythagorean theorem
If then . More generally, for pairwise orthogonal : .
Proof (3 steps)
- Step 1:First two lines of the triangle-inequality proof.
- Step 2:Orthogonality kills the cross term.
- Step 3:Expand the double sum; all terms with vanish by pairwise orthogonality.
∎
Orthonormal bases and Parseval#
Definition
Orthonormal basis
A list is orthonormal if (Kronecker delta: if , otherwise). An orthonormal list is automatically linearly independent: if , taking the inner product with gives . An orthonormal list of length is therefore an orthonormal basis. The computational basis and the basis are both orthonormal bases of .
Coefficients and Parseval’s identity
If is an orthonormal basis, then every satisfies and .
Proof (4 steps)
- Step 1:Expand in the basis (coordinates exist and are unique).
- Step 2:Take the inner product with , use linearity in the second slot and orthonormality.
- Step 3:Substitute back into the expansion.
- Step 4:The vectors are pairwise orthogonal, so Pythagoras applies; and .
∎
Worked example. Using the basis, the coefficients of from the previous lesson are and . Parseval predicts , and directly . The coefficients were computed as inner products, , which is much faster than inverting a change-of-basis matrix; this shortcut works precisely because the basis is orthonormal.
The Gram–Schmidt procedure#
Orthonormal bases are so convenient that we want to be able to manufacture one from any linearly independent list. The Gram–Schmidt procedure does this one vector at a time: take the next vector, subtract its components along the directions already built, and normalise what remains. The order of the input vectors matters, and with our convention the projection coefficient is with the already-built vector conjugated.
Gram–Schmidt orthonormalisation
Let be linearly independent. Define recursively and . Then for every : , the list is orthonormal, and .
Proof (8 steps)
- Step 1:Base case: an independent list contains no zero vector, and a nonzero multiple spans the same line.
- Step 2:Induction hypothesis for .
- Step 3:If the remainder vanished, would be a combination of earlier , hence (hypothesis) of earlier , contradicting independence. So and is well defined with .
- Step 4:Take the inner product of with an earlier ; linearity in the second slot.
- Step 5:Orthonormality of leaves only the term.
- Step 6:Scaling by the positive real ; hence is orthonormal.
- Step 7:Each with lies in by hypothesis, so .
- Step 8:Solve the definition of for ; together with the hypothesis this gives the reverse inclusion, so the spans are equal. Induction completes the proof.
∎
Worked example in : ,
- Step 1:Normalise the first vector.
- Step 2:Projection coefficient; the entries of are conjugated ( multiplies here).
- Step 3:Subtract the component along .
- Step 4:; divide by .
- Step 5:Verify orthogonality: . The result is the circular basis .
Worked example in : , ,
- Step 1:.
- Step 2:The entries of are real, so conjugation changes nothing here.
- Step 3:Subtract .
- Step 4:and .
- Step 5:Only the first entry of is nonzero; conjugating gives .
- Step 6:, and , , .
- Step 7:Divide by , i.e. multiply by .
- Step 8:Conjugate the entries of to ; the three terms cancel.
Unitary verified: (max deviation 2.2e-16)
Check your understanding#
Quick check
Compute (decimal).
Quick check
For and , what is ?
Quick check
With the physicists' convention, what is ?
Quick check
For unit vectors with , what can you conclude?
References
- M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.1.4 (inner products, orthonormal bases, Gram–Schmidt; Box 2.1 on the Cauchy–Schwarz inequality).
- S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), Ch. 6 §6A–6B (inner products, norms, Cauchy–Schwarz, orthonormal bases, Gram–Schmidt).linear.axler.net
- R. A. Horn, C. R. Johnson, Matrix Analysis, 2nd ed., Cambridge University Press (2013), §0.6 and §5.1 (inner products and norms).
Hands-on labs
Gram–Schmidt in C^3
1 step · auto-gradedOpen labOrthonormalise and with Gram–Schmidt, using the conjugate-linear inner product .