Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Inner Products and Orthogonal Projections

    A variational calculation often starts with trial states that overlap. Their overlaps are not their expansion coefficients. The Gram matrix corrects for that overlap and turns “the closest trial state” into an explicit calculation.

    Preparation: Linear Maps, Dual Spaces, and Change of Basis. This page uses finite-dimensional complex spaces with positive inner products, conjugate-linear in the bra and linear in the ket.

    The Gram matrix records the geometry

    For a basis ∣ea⟩|e_a\rangle, define Gab=⟨ea∣eb⟩G_{ab}=\langle e_a|e_b\rangle. Then

    ⟨v∣w⟩=v†Gw,G=G†>0.\langle v|w\rangle=v^\dagger Gw,\qquad G=G^\dagger>0.

    Positivity means v†Gv>0v^\dagger Gv>0 for every nonzero vv. It implies a norm ∥v∥=⟨v∣v⟩\|v\|=\sqrt{\langle v|v\rangle}. Minimizing ∥w−cv∥2\|w-cv\|^2 over c∈Cc\in\mathbb C gives c=⟨v∣w⟩/⟨v∣v⟩c=\langle v|w\rangle/\langle v|v\rangle; the nonnegative minimum proves

    ∣⟨v∣w⟩∣2≤∥v∥2∥w∥2.|\langle v|w\rangle|^2\leq\|v\|^2\|w\|^2.

    This is the Cauchy–Schwarz inequality. Its equality case is linear dependence. Positivity is essential: a Lorentzian form with signature (+−−−)(+---) is not the inner product used here.

    Under e′=eMe'=eM, the Gram matrix changes as G′=M†GMG'=M^\dagger GM. The adjoint of an operator is fixed by ⟨v∣Aw⟩=⟨A†v∣w⟩\langle v|Aw\rangle=\langle A^\dagger v|w\rangle; in this basis its component matrix is G−1A†matGG^{-1}A^{\dagger_{\mathrm{mat}}}G. Ordinary conjugate transpose is the adjoint matrix only when the basis is orthonormal.

    Projection without orthonormalizing first

    Let u1,…,uku_1,\ldots,u_k be independent trial vectors in an ambient space with an orthonormal basis. Put their columns in a matrix UU and form their Gram matrix G=U†UG=U^\dagger U. We seek UcUc closest to an ambient vector vv. Orthogonality of the residual to each trial vector gives

    U†(v−Uc)=0,c=G−1U†v.U^\dagger(v-Uc)=0, \qquad c=G^{-1}U^\dagger v.

    Thus the orthogonal projector onto their span is

    P=U(U†U)−1U†.P=U(U^\dagger U)^{-1}U^\dagger.

    Direct multiplication gives P2=PP^2=P and P†=PP^\dagger=P. It also proves the minimizing property: for any trial vector ww,

    ∥v−w∥2=∥v−Pv∥2+∥Pv−w∥2.\|v-w\|^2=\|v-Pv\|^2+\|Pv-w\|^2.

    The cross term vanishes because v−Pvv-Pv is perpendicular to the trial subspace. This is the geometric content of Axler, §6C, 6.55–6.61 (PDF), expressed directly in a nonorthogonal basis.

    If an ambient coordinate basis has metric H>0H>0, replace U†UU^\dagger U by U†HUU^\dagger HU and the last U†U^\dagger by U†HU^\dagger H. If the trial list is dependent, its Gram matrix is singular; remove redundant vectors or use a suitably defined pseudoinverse. An ordinary inverse is then invalid.

    A trial plane in three dimensions

    In R3\mathbb R^3 with its usual inner product choose

    u1=(100),u2=(110),v=(123).u_1=\begin{pmatrix}1\\0\\0\end{pmatrix},\quad u_2=\begin{pmatrix}1\\1\\0\end{pmatrix},\quad v=\begin{pmatrix}1\\2\\3\end{pmatrix}.

    The overlap vector and Gram matrix are

    UTv=(13),G=(1112),G−1=(2−1−11).U^{\mathsf T}v=\begin{pmatrix}1\\3\end{pmatrix},\qquad G=\begin{pmatrix}1&1\\1&2\end{pmatrix},\qquad G^{-1}=\begin{pmatrix}2&-1\\-1&1\end{pmatrix}.

    Therefore c=(−1,2)Tc=(-1,2)^{\mathsf T}, Pv=(1,2,0)TPv=(1,2,0)^{\mathsf T}, and the residual is (0,0,3)T(0,0,3)^{\mathsf T}. Using the overlap vector itself as coefficients would instead give (4,3,0)T(4,3,0)^{\mathsf T}, which is not a projection. Here

    P=diag⁡(1,1,0).P=\operatorname{diag}(1,1,0).

    Gram–Schmidt reaches the same answer: normalize u1u_1, subtract u1⟨u1∣u2⟩u_1\langle u_1|u_2\rangle from u2u_2, and normalize the remainder. The resulting orthonormal basis is (1,0,0)(1,0,0), (0,1,0)(0,1,0).

    An observable supplies another useful comparison. Let A=diag⁡(1,2,4)A=\operatorname{diag}(1,2,4) and normalize the projected state, ψ=Pv/5\psi=Pv/\sqrt5. Its expectation is

    ⟨A⟩ψ=95.\langle A\rangle_\psi=\frac95.

    In the trial basis the matrix of matrix elements is

    H=UTAU=(1113).H=U^{\mathsf T}AU=\begin{pmatrix}1&1\\1&3\end{pmatrix}.

    The identical answer is cTHc/(cTGc)=9/5c^{\mathsf T}Hc/(c^{\mathsf T}Gc)=9/5. Notice that HH is a form matrix; the operator acting on trial coefficients is G−1HG^{-1}H.

    Summary

    The inverse Gram matrix converts overlaps into coefficients. Orthogonal projection is defined by the geometry, and its answer is unchanged by choosing another basis of the same subspace. These facts lead to the variational generalized eigenvalue problem.

    Exercises

    1. Replace u2u_2 by (1,ε,0)T(1,\varepsilon,0)^{\mathsf T}, with real ε≠0\varepsilon\neq0. Project the same vv. What happens as ε→0\varepsilon\to0?

      Solution

      Solving c1+c2=1c_1+c_2=1 and εc2=2\varepsilon c_2=2 gives c2=2/εc_2=2/\varepsilon, c1=1−2/εc_1=1-2/\varepsilon. The projected vector stays (1,2,0)T(1,2,0)^{\mathsf T} while its coefficients become large. Also det⁡G=ε2\det G=\varepsilon^2. At ε=0\varepsilon=0 the span collapses to a line and the projection becomes (1,0,0)T(1,0,0)^{\mathsf T}. Large coordinates near dependence signal numerical sensitivity, not a large physical projected vector.

    2. Show that replacing UU by USUS with invertible SS leaves PP unchanged.

      Solution

      The new Gram matrix is S†GSS^\dagger GS, whose inverse is S−1G−1(S†)−1S^{-1}G^{-1}(S^\dagger)^{-1}. Substitution into US(S†GS)−1S†U†US(S^\dagger GS)^{-1}S^\dagger U^\dagger cancels all factors of SS, leaving UG−1U†UG^{-1}U^\dagger. The basis changes but the subspace does not.

    References

    • Sheldon Axler, Linear Algebra Done Right, 4th ed., Springer, 2024, §§6A–6C and §7A. Author's open-access PDF. The inner-product slot convention is translated to conjugate-linearity in the bra.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.