The axioms of a vector space over the real or complex scalars, and the facts that make coordinates possible: a finitely spanned space has a basis, all its bases have the same size, and coordinates in a fixed ordered basis are unique.
Definition(Vector space and subspace)AdaptedAdapted from Lee (2013), App. B, p. 617; Kreyszig (1978), §2.1, Def. 2.1-1, pp. 50–51, and subspace, p. 53
Write F for the scalar field, which in this handbook is R or C unless stated otherwise.
A vector space over F is a set V carrying an addition V×V→V and a scalar multiplication F×V→V subject to three groups of axioms:
V is an abelian group under addition: u+v=v+u and (u+v)+w=u+(v+w) for all u,v,w∈V, there is an element 0∈V with v+0=v for all v, and each v∈V has an inverse −v with v+(−v)=0;
a(bv)=(ab)v and 1v=v for all a,b∈F and v∈V;
(a+b)v=av+bv and a(v+w)=av+aw for all a,b∈F and v,w∈V.
Members of V are vectors. The axioms force 0v=0, a0=0 and (−1)v=−v.
A subspace of V is a nonempty subset W⊆V with av+bw∈W whenever v,w∈W and a,b∈F. With the restricted operations W is then a vector space over F in its own right, and 0∈W.
Definition(Span, independence, basis, dimension)AdaptedAdapted from Lee (2013), App. B, pp. 618–619; Kreyszig (1978), §2.1, Def. 2.1-6, p. 53, Def. 2.1-7, p. 54; Hassani (2013), §2.1, Thm 2.1.6, p. 22, and Defs. 2.1.7–2.1.9, p. 23
Let V be a vector space over F and let S⊆V.
A linear combination of S is a finite sum ∑i=1kaivi with k≥0, ai∈F and v1,…,vk distinct elements of S; the empty sum is 0. The set spanS of all of them is a subspace, indeed the smallest subspace containing S, and span∅={0}. If spanS=V we say SspansV.
S is linearly dependent if ∑i=1kaivi=0 for some distinct v1,…,vk∈S and some scalars ai that are not all zero, and linearly independent otherwise. So ∅ is independent, and any S containing 0 is dependent.
An ordered tuple (v1,…,vk) of elements of V is linearly independent if ∑i=1kaivi=0 holds only for a1=⋯=ak=0. A repeated entry makes a tuple dependent, although the underlying set may be independent.
A basis of V is a linearly independent subset that spans V; an ordered basis is a basis together with a choice of ordering, written (e1,…,en). V is finite-dimensional if it has a finite basis and infinite-dimensional otherwise.
Definition(Standard spaces)AdaptedAdapted from Hassani (2013), §2.1, Example 2.1.2, pp. 20–21; Kreyszig (1978), §2.1, Examples 2.1-2 to 2.1-5, pp. 52–53
The spaces used throughout, all with pointwise operations:
Space
Elements
Dimension over F
Fn
n-tuples (x1,…,xn)
n
Mm×n(F)
m×n matrices
mn
Pn(F)
polynomials of degree ≤n
n+1
P(F)
all polynomials
infinite
Ck([a,b],F), 0≤k≤∞
k times continuously differentiable functions on [a,b]
infinite
ℓ2(F)
sequences (xn)n∈N with ∑n∣xn∣2<∞
infinite
A function space is a subspace of the space of all functions from a set X to F; the last three rows are of this kind. Here a<b are real and [a,b] is the closed interval.
Definition(Bases and dimension)AdaptedAdapted from Lee (2013), App. B, Lemma B.2 and Prop. B.3, pp. 619–620, Exercises B.4–B.5, p. 620; Dummit & Foote (2004), §11.1, Prop. 1 and Cor. 2, pp. 409–410; Kreyszig (1978), §2.1, p. 55 and Thm 2.1-8, p. 55; Riley, Hobson & Bence (2006), §8.1.1, eqs. (8.10)–(8.11), pp. 243–244
Let V be a vector space over F.
Exchange bound. If some set of n vectors spans V, then every subset of V with more than n elements is linearly dependent.
Every finite spanning set of V contains a basis of V. In particular, if V is spanned by finitely many vectors then V is finite-dimensional.
Invariance of dimension. If V is finite-dimensional, all its bases are finite and have the same number of elements. That number is the dimensiondimFV, and dimFV=0 exactly when V={0}.
Coordinates. If (e1,…,en) is an ordered basis of V, then for each v∈V there is exactly one tuple (x1,…,xn)∈Fn with v=∑i=1nxiei. The xi are the components of v in that basis.
Suppose dimFV=n<∞. Any independent set in V can be enlarged to a basis of V by adjoining further vectors. Every subspace W⊆V is again finite-dimensional, with dimFW≤n, and dimFW=n holds if and only if W=V.
Every vector space has a basis, and any two bases of the same vector space have the same cardinality. For infinite-dimensional V the proof uses Zorn's lemma.
Idea of the proofOriginal
Two mechanisms carry all six items. The first is an exchange move: if a list of n vectors spans V, then any vector of an independent set can be traded for one of the listed vectors without losing the spanning property, because when it is expanded in the current list some listed vector must occur with a nonzero coefficient - otherwise the new vector would be a combination of the independent vectors already traded in, which independence forbids. After n trades the independent vectors alone span, and the (n+1)-st is then a combination of them, which is the contradiction behind part 1. The second mechanism is minimality: a spanning set with as few members as possible has to be independent, since a dependency would let one member be discarded. Part 2 is that observation, parts 3 and 5 are part 1 used to count, part 4 is the definition of independence read as a uniqueness statement, and part 6 replaces "as few as possible" by "maximal", which is what Zorn's lemma supplies.
ProofAdaptedAdapted from Lee (2013), App. B, Lemma B.2 and Prop. B.3, pp. 619–620, and Exercises B.4–B.5, p. 620; Dummit & Foote (2004), §11.1, Prop. 1, Cor. 2 and Thm 3, pp. 409–410; Kreyszig (1978), §2.1, p. 55 and Thm 2.1-8, p. 55
1, the exchange bound. Let S={v1,…,vn} span V and let W⊆V have more than n elements. A set with a dependent subset is itself dependent, the same relation serving both, so it is enough to produce a dependency among n+1 distinct members w1,…,wn+1 of W. Suppose instead that {w1,…,wn+1} is independent.
We show by induction on k that for k=0,1,…,n there is an index set Jk⊆{1,…,n} with n−k elements such that {w1,…,wk}∪{vj:j∈Jk} spans V. For k=0 take J0={1,…,n}, where the assertion is the hypothesis on S.
Assume it for some k with 0≤k≤n−1, so that Jk has n−k≥1 elements, and expand the next of the w's in the current spanning set:
wk+1=i=1∑kaiwi+j∈Jk∑bjvj.
Not every bj can vanish: otherwise wk+1−∑i≤kaiwi=0 would be a relation among the distinct vectors w1,…,wk+1 whose coefficient at wk+1 is 1, contradicting independence. Fix m∈Jk with bm=0 and solve:
vm=bm−1(wk+1−i=1∑kaiwi−j∈Jk,j=m∑bjvj).
So vm lies in the span of T={w1,…,wk+1}∪{vj:j∈Jk∖{m}}. Every other member of the old spanning set lies in T itself, so spanT contains the old spanning set and hence contains its span, which is V. Taking Jk+1=Jk∖{m} completes the induction step.
At k=n the set Jn is empty and {w1,…,wn} spans V. Then wn+1=∑i≤nciwi for some scalars, which is again a nontrivial relation among w1,…,wn+1. This contradiction shows {w1,…,wn+1} is dependent, and with it W.
2, a finite spanning set contains a basis. Let S be finite with spanS=V. The subsets of S that span V are finite in number and include S, so one of them, B, has fewest elements. If B were dependent there would be distinct b1,…,bk∈B and scalars ai, not all zero, with ∑iaibi=0; choosing aj=0 gives bj=−aj−1∑i=jaibi, so bj∈span(B∖{bj}). Then B∖{bj} has every member of B in its span, so it spans V as well, and it is smaller than B - impossible. Hence B is independent and spans: a basis. In particular a space spanned by finitely many vectors has a finite basis and is finite-dimensional. (For V={0} the smallest spanning subset is ∅, which is independent with span∅={0}.)
3, invariance of dimension. Let V be finite-dimensional and let E be a finite basis, with n elements. Since E spans V, part 1 makes every subset of V with more than n elements dependent; a basis is independent, so no basis has more than n elements, and in particular every basis is finite. If F is a basis with m elements then m≤n; exchanging the roles of E and F in the same sentence gives n≤m. So all bases have n elements, and dimFV=n is well defined. Finally ∅ is a basis of {0}, so dimF{0}=0; and if dimFV=0 then some basis is empty, whence V=span∅={0}.
4, coordinates. The basis spans, so v is a linear combination of distinct basis vectors; adding the missing basis vectors with coefficient 0 writes v=∑i=1nxiei. If also v=∑iyiei then ∑i(xi−yi)ei=0. The entries of an ordered basis are distinct, so (e1,…,en) is an independent tuple, and therefore every coefficient xi−yi vanishes.
5, enlarging an independent set. Let dimFV=n and let A⊆V be independent; by part 1, A has at most n elements. If spanA=V, choose v∈V∖spanA. Then A∪{v} is independent: in a relation ∑iaiui+cv=0 with distinct ui∈A, the coefficient c must vanish, since otherwise v=−c−1∑iaiui would lie in spanA, and with c=0 independence of A kills the remaining coefficients. The enlarged set has one more element, and sizes cannot exceed n, so after at most n−∣A∣ such steps the set spans V and is a basis containing A.
5, subspaces. Let W⊆V be a subspace. An independent subset of W is independent in V, hence has at most n elements, so among the independent subsets of W there is one, A, of greatest size. It spans W: otherwise the previous paragraph, applied inside W to a vector of W∖spanA, would produce a larger independent subset of W. So W is finite-dimensional with dimFW=∣A∣≤n. If dimFW=n, take a basis B of W: it is an independent subset of V with n elements, so enlarging it to a basis of V adds nothing, every basis of V having exactly n elements by part 3; hence B is a basis of V and W=spanB=V. The converse is immediate.
6, existence of a basis. Partially order the independent subsets of V by inclusion. The collection is nonempty, containing ∅. A chain C of independent sets has its union U as an upper bound, and U is independent: a relation involves finitely many distinct vectors of U, each lying in some member of C, and since C is totally ordered the largest of those finitely many members contains all of them, so independence there forces the coefficients to vanish. By Zorn's lemma there is a maximal independent B⊆V. It spans: a vector outside spanB could be adjoined with independence preserved, by the computation in part 5, contradicting maximality. So B is a basis. □
Note(The one part proved only in finite dimensions)AdaptedAdapted from Kreyszig (1978), §2.1, p. 55; Lee (2013), App. B, Exercise B.5(b), p. 620
The second half of part 6 - that any two bases of the same space have the same cardinality, infinite cardinalities included - is taken from the sources and not proved here. Kreyszig records it on p. 55 as a statement whose proof needs more set theory than he develops, referring to the literature; Lee poses it as Exercise B.5(b), p. 620, with a hint sketching the argument. Part 3 above proves the finite-dimensional case, which is what the rest of the handbook uses.
Note(What it means)Original
These axioms isolate exactly what is needed to add objects and rescale them, so that one argument covers arrows in space, n-tuples of numbers, matrices, and functions at once. Parts 3 and 4 are what let you replace a vector by a column of numbers without ambiguity: a basis turns abstract vectors into coordinates, and a different basis gives different coordinates for the same vector. Reach for this unit whenever you need to know that a set of objects you can add is "n-dimensional", or that a representation in coordinates is unique.
Remark(Where the hypotheses are used, and conventions)AdaptedAdapted from Hassani (2013), §2.1, Example 2.1.2 items 2–4, p. 20, Example 2.1.5, p. 22, and Def. 2.1.9, p. 23; Kreyszig (1978), §2.1, p. 55; Stakgold & Holst (2011), §4.6, pp. 276–277
The scalar field is part of the data.C is one-dimensional over C but two-dimensional over R, with basis {1,i}. Hassani therefore writes dimC and dimR, and we keep the subscript whenever both are in play. Also, R is not a vector space over C: scalar multiplication would leave the set.
Where finiteness enters. Parts 1 and 2 each assume a finite spanning set, and for different reasons: part 1 needs the number n to count against, and part 2 needs the subsets of the spanning set to be finite in number, so that a smallest spanning one can be selected. Parts 3 and 5 then rest on part 1, which is what caps the size of an independent set; part 4 needs only that the ordered basis it is given is finite. Part 6 drops finiteness altogether and pays for it with Zorn's lemma, which is why the cardinality half of it is harder than part 3. The exchange step used in part 1 is the replacement argument of Dummit and Foote (Dummit & Foote (2004), §11.1, Thm 3, p. 410), which swaps independent vectors into a basis one at a time.
Two meanings of "basis" in infinite dimensions. The basis defined here allows only finite linear combinations; Kreyszig calls it a Hamel basis. A Schauder basis of a normed space instead expands each vector as a convergent infinite series. The sequences en=(0,…,0,1,0,…) form a Schauder basis of ℓ2 but not a Hamel basis, because their finite combinations give only the sequences with finitely many nonzero terms. The distinction matters from normed and Banach spaces onwards; see also orthonormal bases.
Subspaces. An intersection of subspaces is a subspace, but a union need not be: the two coordinate axes in R2 are subspaces whose union is not closed under addition. Requiring a subspace to be nonempty is not cosmetic: ∅ satisfies the closure condition vacuously yet is not a vector space, since it has no zero element.
Example(A basis of the cubic polynomials, and the coordinates it assigns)Original
Work in P3(R), the real polynomials of degree at most 3, and take the ordered list
B=(1+x,x+x2,x2+x3,x3).
B is a basis, by solving once and for all. Let p(x)=p0+p1x+p2x2+p3x3 be arbitrary and look for a,b,c,d with a(1+x)+b(x+x2)+c(x2+x3)+dx3=p. Comparing coefficients of 1,x,x2,x3 gives the system
a=p0,a+b=p1,b+c=p2,c+d=p3,
which is solved from the top down, with no choice at any stage:
a=p0,b=p1−p0,c=p2−p1+p0,d=p3−p2+p1−p0.
A solution exists for every p, so B spans; taking p=0 gives a=b=c=d=0, so B is independent. Hence B is a basis of P3(R), and part 3 confirms the entry n+1=4 of the table of standard spaces, since the obvious basis (1,x,x2,x3) also has four elements.
Coordinates of one polynomial. For p(x)=2−3x+x2+5x3 the formulas give a=2, b=−3−2=−5, c=1+3+2=6 and d=5−1−3−2=−1, so the component tuple of p in the ordered basis B is (2,−5,6,−1). Expanding back:
Five vectors must be dependent, and here is the relation. Since P3(R) is spanned by four vectors, part 1 says that any five of its elements are dependent - before any computation. Take
q1=1,q2=1+x,q3=1+x+x2,q4=1+x+x2+x3,q5=x3.
The first four are independent (the same top-down solve applies), yet the five together satisfy q4−q3−q5=0, because q4−q3=x3=q5. One relation is all that part 1 predicts, and one is what appears.
Example(The same set of vectors, two scalar fields, two dimensions)Original
Regard C as a vector space and consider {1+i,1−i}.
Over R it is a basis, so dimRC=2. Independence: a(1+i)+b(1−i)=(a+b)+(a−b)i vanishes only if a+b=0 and a−b=0, that is a=b=0. Spanning: given z=x+iy with x,y∈R, the choice a=(x+y)/2, b=(x−y)/2 works. For z=3+5i this gives a=4 and b=−1, and indeed 4(1+i)−(1−i)=3+5i.
Over C it is dependent, and dimCC=1. Now −i is an admissible scalar, and −i(1+i)=−i−i2=1−i, so (1−i)−(−i)(1+i)=0 is a nontrivial relation. The single vector 1+i already spans, since z=(z/(1+i))(1+i), and it is independent as a nonzero vector, so {1+i} is a basis over C.
The underlying set of vectors never changed; what changed is which coefficients are allowed. This is why the subscript on dimF is not decoration.
ApplicationOriginal
Counting modes before solving anything. The small displacements of an N-atom molecule form a real vector space of dimension 3N, one coordinate per atom per direction. Inside it, the rigid motions span a subspace of dimension 6 for a bent molecule - three translations and three rotations - and 5 for a linear one, a rotation about the molecular axis producing no displacement. The vibrations are what is left, so a bent molecule has 3N−6 vibrational modes and a linear one 3N−5: three for water and four for carbon dioxide, both with N=3. These numbers are dimensions, fixed by part 3 before any frequency is computed, and they tell a spectroscopist how many lines to look for. See Normal modes.
Why there is no third independent harmonic solution. The solutions of y¨+ω2y=0 form a vector space with basis (cosωt,sinωt), of dimension 2. The amplitude-phase form cos(ωt−φ) is a solution too, and part 1 says in advance that it cannot be independent of the first two: a space spanned by two vectors has every three-element subset dependent. The explicit relation is the addition formula, cos(ωt−φ)=cosφcosωt+sinφsinωt. More generally, for a linear homogeneous equation of order n the solution space has dimension n, so n independent solutions give every solution and any n+1 of them satisfy a relation. See Linear ODE theory.
Coordinates are what make a computer able to solve a field problem. A Galerkin or finite-element method replaces an infinite-dimensional function space by a subspace of dimension n with a chosen basis; part 4 is what makes the vector of n coefficients an unambiguous name for the approximate field, and part 3 is what makes "n degrees of freedom" independent of which basis the implementation happens to use. The warning in the remark above belongs here too: in the infinite-dimensional space itself, finite combinations of a basis in the present sense do not exhaust the space, which is why the convergence of the approximation is a separate question from the algebra. See Finite elements and orthonormal bases.
The scalar field is physics, not convention. A quantum state space is a complex vector space: a spin-j particle has dimC=2j+1, which is 2 for a spin-21 particle. Regarded over R the same space has twice that dimension, and the extra real parameters are the relative phases, which interference experiments measure. Writing dimC rather than dim is thus a statement that multiplication by i is part of the structure being used.
Linear maps, their kernel and image, the matrix of a map in a chosen pair of ordered bases, and the rules by which composition becomes matrix multiplication and a change of basis becomes a similarity transformation.
Fix the scalar field F (R or C), and let V and W both be vector spaces over it. A map T:V→W is linear if
T(av+bw)=aTv+bTwfor all v,w∈V and a,b∈F.
The same scalars must act on both sides, so V and W having a common scalar field is part of the definition. We write Tv rather than T(v) except where brackets are needed for grouping.
The kernel is kerT={v∈V:Tv=0} and the image is imT={Tv:v∈V}. Both are subspaces, of V and of W respectively, and T is injective if and only if kerT={0}.
T is an isomorphism if it is linear and bijective; then T−1 is linear as well, and V and W are isomorphic.
A linear map V→V is a linear operator on V, or an endomorphism of V; a linear map V→F is a linear functional.
L(V,W) denotes the set of linear maps V→W. With (S+T)v=Sv+Tv and (cT)v=c(Tv) it is itself a vector space over F.
Definition(The matrix of a linear map)AdaptedAdapted from Lee (2013), App. B, pp. 623–624; Riley, Hobson & Bence (2006), §8.2, eqs. (8.23)–(8.24), pp. 247–248
Let E=(e1,…,en) be an ordered basis of V and F=(f1,…,fm) one of W, and let T∈L(V,W). Each Tej expands uniquely in F, and the coefficients define the matrix of T in the bases E and F, written [T]F←E=A∈Mm×n(F):
Tej=i=1∑mAijfi(j=1,…,n).
So the jth column of A holds the components of Tej. Writing [v]E∈Fn for the column of components of v in E,
[Tv]F=A[v]E,that is(Tv)i=j=1∑nAijvj.
For an operator on V we take F=E and write [T]E. The product of A∈Mm×n(F) and B∈Mn×p(F) is (AB)ik=∑j=1nAijBjk, and In is the matrix with 1 on the diagonal and 0 elsewhere. A square matrix A is invertible (nonsingular) if AB=BA=In for some B, which is then unique and written A−1.
Definition(Matrices represent linear maps faithfully)AdaptedAdapted from Lee (2013), App. B, pp. 623–626, Exercises B.13 and B.19, pp. 623, 625; Hassani (2013), §2.3, Box 2.3.6, p. 40
Let V, W and U be finite-dimensional over F, carrying ordered bases E, F and G of lengths n, m and p.
A linear map is determined by its values on a basis: given any w1,…,wn∈W there is exactly one T∈L(V,W) with Tej=wj for j=1,…,n.
T↦[T]F←E is an isomorphism of vector spaces L(V,W)→Mm×n(F). In particular dimFL(V,W)=mn.
Composition is multiplication. If T∈L(V,W) and S∈L(W,U) then [S∘T]G←E=[S]G←F[T]F←E, and [idV]E=In.
For n=m, T∈L(V,W) is an isomorphism if and only if [T]F←E is invertible, and then [T−1]E←F=([T]F←E)−1.
Idea of the proofOriginal
Two facts do all the work. A vector has exactly one expansion in a given basis, so "a vector of V" and "a column of n scalars" carry the same information; and a linear map respects linear combinations, so "a map V→W" and "a list of n vectors of W", namely the images of the basis, also carry the same information. Compose the two translations and a map becomes a table of mn scalars. Only part 3 needs a calculation, and that calculation is just the definition of the matrix product read backwards; parts 2 and 4 then follow because a bijection that respects addition, scalars and composition must carry invertibility to invertibility.
ProofAdaptedAdapted from Lee (2013), App. B, pp. 623–624, Exercises B.13 and B.19, pp. 623, 625; Hassani (2013), §2.3, Box 2.3.6, p. 40
Throughout, write A=[T]F←E, and recall that every v∈V has one and only one expansion v=∑jvjej because E is a basis (Vector spaces and bases).
Step 0: the matrix acts on components. Apply T to that expansion. Linearity, used n−1 times, gives Tv=∑jvjTej, and inserting Tej=∑iAijfi and collecting the coefficient of each fi gives
Tv=i=1∑m(j=1∑nAijvj)fi.
Since the expansion in F is unique, the ith component of Tv is ∑jAijvj, which is the identity [Tv]F=A[v]E asserted in the definition. Every part below rests on it.
Part 1, uniqueness. If S,T∈L(V,W) satisfy Sej=Tej for all j, then for any v=∑jvjej linearity gives Sv=∑jvjSej=∑jvjTej=Tv, so S=T. Only linearity and the spanning half of "basis" were used here.
Part 1, existence. Given w1,…,wn∈W, define T by Tv=∑jvjwj, where (v1,…,vn) are the components of v in E. This is a well-defined map because those components exist and are unique. It is linear because components are: the components of av+bv′ are avj+bvj′, whence T(av+bv′)=∑j(avj+bvj′)wj=aTv+bTv′. Finally ej has components δkj, so Tej=wj.
Part 2. Write Φ(T)=[T]F←E. It is linear: (aS+bT)ej=aSej+bTej by the definition of the operations on L(V,W), and expanding both sides in F and using uniqueness of the expansion gives Φ(aS+bT)=aΦ(S)+bΦ(T) entry by entry. It is injective: if Φ(T)=0 then Tej=0 for every j, and the zero map also sends every ej to 0, so T=0 by the uniqueness half of part 1. It is surjective: given A∈Mm×n(F), apply the existence half of part 1 to wj=∑iAijfi; the resulting T has Φ(T)=A. Hence Φ is an isomorphism. The mn matrices with a single entry 1 and the rest 0 are a basis of Mm×n(F) — they span it, since A=∑i,jAij times the (i,j) one, and a vanishing combination has every coefficient zero because each coefficient is an entry of the combination — so dimFMm×n(F)=mn, and an isomorphism preserves dimension.
the second equality by linearity of S and the last by exchanging two finite sums. The bracket is (BA)kj, so by uniqueness of the expansion in G the matrix of S∘T is BA, which is the claim. For the identity, idVej=ej=∑iδijei, so [idV]E=In.
Part 4, forwards. Let T be an isomorphism, so T−1 exists and is linear. Apply part 3 to T−1∘T=idV and to T∘T−1=idW:
[T−1]E←FA=In,A[T−1]E←F=Im.
With n=m these say that A is invertible with A−1=[T−1]E←F.
Part 4, backwards. Let A be invertible. By the surjectivity shown in part 2, applied to the pair of bases F and E, there is an S∈L(W,V) with [S]E←F=A−1. Part 3 gives [S∘T]E=A−1A=In=[idV]E and [T∘S]F=AA−1=Im=[idW]F, so by the injectivity shown in part 2 we get S∘T=idV and T∘S=idW. Hence T is bijective, with inverse S. The hypothesis n=m entered when A was required to be square. □
Definition(Change of basis and similarity)AdaptedAdapted from Riley, Hobson & Bence (2006), §8.15, eqs. (8.90)–(8.94), pp. 283–284; Lee (2013), App. B, Change of Basis, eqs. (B.1)–(B.2), pp. 625–626
Let E~=(e~1,…,e~n) be a second ordered basis of V and define the transition matrixP∈Mn×n(F) by expanding the new basis in the old one,
e~j=i=1∑nPijei(j=1,…,n).
Then P is invertible, and:
[v]E=P[v]E~ for every v∈V; equivalently [v]E~=P−1[v]E. Components therefore transform by P−1 while the basis vectors transform by P.
If F~ is a second ordered basis of W with transition matrix Q, then for every T∈L(V,W)
[T]F~←E~=Q−1[T]F←EP.
For an operator T on V, taking the same change of basis in domain and codomain gives [T]E~=P−1[T]EP. Two matrices A,A~∈Mn×n(F) are called similar when A~=P−1AP for some invertible P, and the passage from A to P−1AP is a similarity transformation. So the matrices representing one operator in different bases are exactly the matrices similar to any one of them.
Idea of the proofOriginal
A change of basis changes no vector and no map; it changes only the dictionary used to write them down. The dictionary itself is a map — the identity of V, read from the new basis into the old one — so the transition matrix P is nothing but [idV]E←E~. Once that is seen, there is nothing left to prove: insert identity maps on either side of T and apply the composition rule of the previous statement. The inverse P−1 appears on the domain side because the dictionary has to be read backwards there.
The transition matrix is the matrix of the identity, and is invertible. The defining relation e~j=∑iPijei says exactly that idVe~j expands in E with coefficients Pij, that is,
P=[idV]E←E~.
Since idV is an isomorphism and both bases have the same length n, part 4 of the previous statement makes P invertible, with P−1=[idV]E~←E.
Part 1. By Step 0 of the previous proof applied to idV with domain basis E~ and codomain basis E,
[v]E=[idVv]E=[idV]E←E~[v]E~=P[v]E~,
and multiplying on the left by P−1 gives the second form. The contrast with the display defining P is the whole content of the last sentence of part 1: the same matrix P sends new basis vectors to old-basis data and old components to new components only after inversion.
Part 2. Write T=idW∘T∘idV and read each factor in the bases that make the composition rule applicable:
using part 3 of the previous statement twice, and then the identification of the two outer factors as Q−1 and P established above. Nothing here requires n=m.
Part 3, the formula. Put W=V, F=E and F~=E~, so Q=P.
Part 3, "exactly the matrices similar to it". One inclusion is the formula just proved: any two matrices of one operator T, in bases E and E~, are related by [T]E~=P−1[T]EP, hence similar. For the other, let A=[T]E and let P be any invertible matrix; we must produce a basis in which T has matrix P−1AP. Define e~j=∑iPijei. These n vectors are linearly independent: if ∑jcje~j=0 then ∑i(∑jPijcj)ei=0, so Pc=0 by uniqueness of the expansion in E, so c=0 because P is invertible. Being n=dimV independent vectors, they are a basis (Vector spaces and bases), their transition matrix is P by construction, and part 3 gives [T]E~=P−1AP. □
Note(What it means)Original
Linearity is the property that lets you compute a map's effect on any vector from its effect on n basis vectors, and the matrix is just the table of those n answers. Everything matrices do they do because of this: multiplying matrices is doing one map after another, and inverting a matrix is undoing a map. The change-of-basis rule is the other half of the story: a matrix is a map plus a choice of coordinates, so the matrix changes when the coordinates do while the map does not. Quantities built from a matrix that survive A↦P−1AP — the determinant, the trace, the eigenvalues — belong to the operator itself.
Remark(Conventions that differ between books)AdaptedAdapted from Riley, Hobson & Bence (2006), §8.2, eq. (8.23), p. 248, and §8.15, eqs. (8.90), (8.94), pp. 283–284; Lee (2013), App. B, eqs. (B.1)–(B.2), pp. 624–626; Hassani (2013), §2.3, p. 39
Index placement. We write Aij for the entry in row i and column j, as Riley, Hobson and Bence (Riley, Hobson & Bence (2006), §8.3, p. 249) do. Lee writes Aji, with the row index raised, to fit the summation convention of tensor analysis; the matrix is the same. This handbook raises indices only in the tensor units.
Direction of the transition matrix. The formulas above depend on which basis is expanded in which. We expand the new basis in the old one, so e~j=∑iPijei and [T]E~=P−1[T]EP; this is the convention of Riley, Hobson and Bence (Riley, Hobson & Bence (2006), §8.15, eqs. (8.90), (8.94), pp. 283–284), whose S is our P. Lee's transition matrix B goes the other way, ei=∑jBije~j, so Lee's change-of-basis formula reads A~=BAB−1. The two matrices are inverse to each other, and quoting either formula with the other book's P gives the wrong answer. Check which convention a source uses before substituting.
Operator versus matrix. Riley, Hobson and Bence distinguish the operator A from its matrix A of components in a basis; Hassani calls an operator on V an endomorphism. We keep the distinction in the notation [T]F←E, because the change-of-basis statement is about it.
Infinite dimensions. Parts 2–4 of the representation statement use finite bases and fail without them: an injective linear operator on an infinite-dimensional space need not be surjective (shifting a sequence one place to the right), so "injective implies invertible" is a finite-dimensional fact. See bounded operators.
Example(Two operators on quadratic polynomials, in two bases)Original
Let V be the real polynomials of degree at most 2, with the ordered basis E=(1,t,t2), and let
Tp=(1+t)p′+p,Sp=p′.
Both send V to V: p′ has degree at most 1, so (1+t)p′ has degree at most 2. Both are linear, since differentiation and multiplication by a fixed polynomial are.
Step 1: the matrices in E. Apply each operator to the three basis vectors and read off the coefficients, which by the definition are the columns:
Step 2: composition is the product. Directly, (S∘T)1=S1=0, (S∘T)t=S(1+2t)=2 and (S∘T)t2=S(2t+3t2)=2+6t, so
[S∘T]E=000200260,
and multiplying the two matrices of step 1 in the order [S]E[T]E gives the rows (0,2,2), (0,0,6), (0,0,0) — the same matrix. The reversed product [T]E[S]E has first row (0,1,2) and is a different matrix, as it must be, because T∘S=S∘T here: (T∘S)t2=T(2t)=2+4t while (S∘T)t2=2+6t.
Step 3: a second basis. Take E~=(1,1+t,(1+t)2). Expanding the new basis in the old one, 1+t=1+t and (1+t)2=1+2t+t2, so
P=100110121,P−1=100−1101−21,
the inverse being checked by multiplying out. In the variable s=1+t we have d/dt=d/ds and 1+t=s, so T acts on sk by Tsk=s⋅ksk−1+sk=(k+1)sk: the new basis vectors are eigenvectors, and
[T]E~=100020003.
The change-of-basis statement predicts this from [T]E alone. Computing P−1[T]EP: first
as claimed. Note tr=6 and det=6 for both matrices, while the matrices themselves differ.
Step 4: a vector, both ways. Let v=3−t+2t2, so [v]E=(3,−1,2)T. Then P−1[v]E=(3+1+2,−1−4,2)T=(6,−5,2)T, which is right: substituting t=s−1 gives v=6−5s+2s2. Now compute Tv in each description. In E,
[T]E[v]E=(3−1,−2+4,6)T=(2,2,6)T⟷2+2t+6t2,
which agrees with Tv=(1+t)(−1+4t)+(3−t+2t2)=(−1+3t+4t2)+(3−t+2t2). In E~,
and expanding 6−10(1+t)+6(1+t)2=2+2t+6t2 recovers the same polynomial. The two matrices are different tables; the map they tabulate is one map.
ApplicationOriginal
Optical systems multiply. In the paraxial approximation a light ray crossing a reference plane is described by two numbers, its height y above the axis and its slope θ, and every element of a rotationally symmetric system acts linearly on the pair (y,θ). Free propagation through a distance d and a thin lens of focal length f have the ray-transfer matrices
F(d)=(10d1),L(f)=(1−1/f01),
the first because y grows by dθ while θ is unchanged, the second because a thin lens bends the ray without displacing it. Because composition of maps is multiplication of matrices, a whole instrument is the ordered product of its elements' matrices — right to left, in the order the light meets them. For an object at distance u in front of the lens and a screen at distance v behind it,
F(v)L(f)F(u)=(1−v/f−1/fu+v−uv/f1−u/f).
A sharp image means that the final height does not depend on the initial slope — all rays leaving one object point arrive at one screen point — that is, that the top-right entry vanishes. Dividing u+v−uv/f=0 by uv gives the thin-lens equation 1/u+1/v=1/f, and at that setting the top-left entry becomes 1−v/f=−v/u, the transverse magnification. With f=10 cm and u=15 cm this gives v=30 cm and a magnification of −2: twice the size, inverted. The handbook's "composition is multiplication" is thus the whole design calculus for lens systems, and the same algebra, with other 2×2 matrices, is how laser resonators, electron-optical columns and beam transport lines in accelerators are analysed.
Why physical tensors are given by their transformation law. The moment of inertia of a rigid body is an operator I on R3: it sends an angular velocity to the corresponding angular momentum, L=Iω. That is a statement about the body, not about anyone's coordinate axes. Choosing orthonormal axes turns it into a matrix of nine numbers, and rotating the axes replaces that matrix by P−1[I]P — which is why textbooks define a Cartesian tensor by how its components change, and why the familiar questions about a body are asked in the similarity-invariant language of this unit. The principal moments are the eigenvalues of I, the principal axes a basis in which [I] is diagonal, and the rotational kinetic energy 21(ω,Iω) a basis-independent number. The same remark applies verbatim to the stress and strain tensors of continuum mechanics, to the dielectric tensor of an anisotropic crystal, and — with unitary rather than merely invertible P — to a change of basis in quantum mechanics, where the matrix of an observable changes but its spectrum does not.
The determinant as the unique alternating multilinear function of the columns taking the value one at the identity, with its behaviour under transposition, elementary operations, cofactor expansion and products, the non-vanishing criterion for invertibility, and its reading as a signed volume.
Definition(Sign of a permutation, and the determinant)AdaptedAdapted from Lee (2013), App. B, Prop. B.26 and eq. (B.3), pp. 628–629, and Props. B.35–B.37 (minor, cofactor, transposed cofactor matrix, upper triangular), pp. 633–634; Arfken, Weber & Harris (2013), §2.1, pp. 85–86; Dummit & Foote (2004), §11.4, p. 436 (alternating multilinear) and p. 437 (the determinant axioms); Riley, Hobson & Bence (2006), §8.9 (minor, cofactor, Laplace expansion), pp. 259–260
Let Sn be the group of bijections of {1,…,n} under composition. Every σ∈Sn is a composition of finitely many transpositions, and the number of factors is even for every such decomposition or odd for every such decomposition; accordingly sgnσ=+1 or −1. The map sgn:Sn→{±1} is a group homomorphism.
For A∈Mn×n(F), with F=R or C, the determinant is
detA=σ∈Sn∑(sgnσ)A1σ(1)A2σ(2)⋯Anσ(n).
When it is the columns that matter we write det(a1,…,an), meaning detA for the A whose jth column is aj∈Fn; ∣A∣ is another common notation for detA. For n=0 the sum is not empty: S0 has exactly one element, the empty bijection, whose empty product of entries is 1, so detA=1.
Auxiliary notions. A function D:(Fn)n→F is multilinear if it is linear in each argument when the others are held fixed, and alternating if D(a1,…,an)=0 whenever ai=aj for some i=j. For A∈Mn×n(F) and 1≤i,j≤n, the minorMij is the (n−1)×(n−1) matrix left after deleting row i and column j of A, and the cofactor is Cij=(−1)i+jdetMij. The adjugateadjA is the n×n matrix with entries (adjA)ij=Cji. The matrix A is upper triangular if Aij=0 whenever i>j.
Theorem(Properties of the determinant)AdaptedAdapted from Dummit & Foote (2004), §11.4, Thm 24, p. 437, Cor. 25, p. 438, Cor. 27, pp. 438–439, Thms 28–29, p. 439; Lee (2013), App. B, Prop. B.28, pp. 629–631, Thm B.31 and Cors. B.32–B.34, p. 632, p. 633, Props. B.35–B.37, pp. 633–634; Riley, Hobson & Bence (2006), §8.9.1, properties (i)–(vii), pp. 261–262
Let A,B∈Mn×n(F) with n≥1.
Characterisation.(a1,…,an)↦det(a1,…,an) is multilinear and alternating, and detIn=1. It is the only function (Fn)n→F with these three properties.
Transpose.detAT=detA. Consequently every statement below about columns holds verbatim for rows.
Elementary operations. Multiplying one column of A by c∈F multiplies detA by c; interchanging two columns reverses the sign of detA; adding a scalar multiple of one column to a different column leaves detA unchanged. Hence det(cA)=cndetA, and detA=0 if A has a zero column or two equal columns.
Triangular matrices. If A is upper triangular (or lower triangular), then detA=A11A22⋯Ann.
Cofactor (Laplace) expansion. For each fixed row index i and each fixed column index j,
detA=k=1∑nAikCik=k=1∑nAkjCkj.
Product rule.det(AB)=(detA)(detB), hence also det(AB)=det(BA).
Invertibility. The following are equivalent: A is invertible; detA=0; the columns of A are linearly independent. When detA=0,
A−1=detA1adjA,det(A−1)=detA1,
and in general AadjA=(adjA)A=(detA)In whether or not A is invertible.
Similarity invariance.det(PAP−1)=detA for every invertible P∈Mn×n(F). Therefore, if V is a vector space over F with dimFV=n<∞ and T is a linear operator on V, the number detT:=det[T]E is the same for every ordered basis E of V, and T is an isomorphism if and only if detT=0.
Idea of the proofOriginal
Three properties are read straight off the defining sum: it is linear in each column, because each of its n! terms takes exactly one factor from each column; it reverses sign when two columns are swapped, because swapping composes every permutation with one transposition; and it equals 1 at the identity, because only the identity permutation contributes. Four more parts are read off the same sum with no extra machinery: reindexing it by σ−1 gives the transpose rule, the three elementary operations are the first two properties plus one cancellation, a triangular matrix kills every permutation but the identity, and the cofactor expansion is column linearity, followed by the observation that a last column equal to en may simply be deleted and a count of the interchanges that move a chosen row and column into that position. Two parts need an idea beyond the sum, and both come from one lemma: a multilinear alternating function of n columns is completely determined by its value on the standard basis, since expanding each column in that basis and discarding the terms with a repeated basis vector leaves exactly the permutation sum. Uniqueness is the lemma applied to a rival determinant function and the product rule is the lemma applied to (b1,…,bn)↦det(Ab1,…,Abn); the adjugate identity, the inverse and the invertibility criterion are then bookkeeping with the cofactor expansion.
ProofAdaptedAdapted from Lee (2013), App. B, Prop. B.28, pp. 629–631, Thm B.31, p. 632, Props. B.35 and B.37, pp. 633–634; Dummit & Foote (2004), §11.4, Props. 22–23, pp. 436–437, Thm 24, p. 437, Cor. 25, p. 438, Thms 28–30, pp. 439–440
Step 1: the sum is linear in each column. Fix q and a permutation σ. Among the factors A1σ(1),…,Anσ(n) of the corresponding term, exactly one comes from column q, namely Aσ−1(q)q, because σ is a bijection. The term is therefore that entry times a product of entries from the other columns, so it is a linear function of column q with the remaining columns fixed; a sum of such functions is again one.
Step 2: detIn=1. If σ=id there is an i with σ(i)=i, and then the factor (In)iσ(i) is 0. Only σ=id survives, contributing sgn(id)⋅1⋯1=1.
Step 3: interchanging two columns reverses the sign. Let τ∈Sn be the transposition of p=q and let A′ be A with columns p and q exchanged, so that Aij′=Aiτ(j) for all i,j. Then
detA′=σ∈Sn∑(sgnσ)i=1∏nAiτ(σ(i)).
Substitute ρ=τσ. As σ runs once through Sn, so does ρ, and sgnσ=sgn(τ−1ρ)=(sgnτ)(sgnρ)=−sgnρ, because sgn is a homomorphism and a transposition is odd. The sum becomes −detA.
Step 4: equal columns give 0. If columns p=q of A coincide, then exchanging them returns the same matrix, so step 3 gives detA=−detA, that is 2detA=0. Here the hypothesis F=R or C is used: 2 is invertible, so detA=0. With steps 1 and 2 this proves the first sentence of part 1.
Step 5: part 2. By definition (AT)ij=Aji, so
detAT=σ∑(sgnσ)i=1∏nAσ(i)i.
In each product reindex the factors by j=σ(i), which is legitimate because multiplication in F is commutative and σ is a bijection: the product equals ∏jAjσ−1(j). Writing τ=σ−1 and using (sgnσ)(sgnσ−1)=sgn(id)=1 with values in {±1}, so that sgnτ=sgnσ, and letting τ run through Sn in place of σ, the sum becomes detA.
Step 6 (the key lemma): a multilinear alternating function is its value at the standard basis, times the determinant. Let D:(Fn)n→F be multilinear and alternating. First, D reverses sign when two arguments are exchanged: with all other arguments fixed and x,y in slots p and q, expanding 0=D(…,x+y,…,x+y,…) by linearity in both slots gives
whose first and last terms vanish because D is alternating. Consequently D(eσ(1),…,eσ(n))=(sgnσ)D(e1,…,en): write σ as a composition of transpositions and apply the sign reversal once per factor, the parity of the count being well defined by the definition of sgn. Now expand each argument of D(a1,…,an) in the standard basis, aj=∑iAijei, and use multilinearity in each slot in turn:
Every term in which two of the indices agree has two equal arguments and so vanishes; the surviving index tuples are precisely (σ(1),…,σ(n)) for σ∈Sn. Hence
Step 7: part 1, uniqueness. If D is multilinear, alternating and D(In)=D(e1,…,en)=1, step 6 gives D(A)=detA for every A. So no second such function exists.
Step 8: part 3. Scaling column i by c multiplies detA by c, by linearity in that slot (step 1); doing it to all n columns gives det(cA)=cndetA, and taking c=0 in one column shows that a zero column forces detA=0. The sign change under an interchange is step 3 and the vanishing for two equal columns is step 4. Finally, for q=p, linearity in slot q gives
and the second determinant has columns p and q equal, so it is 0 by step 4. The restriction q=p is essential: adding c times a column to itself is scaling by 1+c.
Step 9: part 4. Let A be upper triangular, so Aij=0 whenever i>j. A term of the defining sum is nonzero only if Aiσ(i)=0 for every i, hence only if σ(i)≥i for every i. Summing these n inequalities gives ∑iσ(i)≥∑ii, with the two sides equal because σ permutes {1,…,n}; so every inequality is an equality and σ=id. The single surviving term is A11⋯Ann. If instead A is lower triangular, AT is upper triangular with the same diagonal, and step 5 applies.
Step 10: part 5.(a) A last column equal to en may be deleted. Let B be n×n with Bin=δin. The factor of a term that comes from column n is Bσ−1(n)n, which vanishes unless σ(n)=n; and for such σ that factor is 1. The permutations fixing n are exactly those of {1,…,n−1}, with the same sign computed there, so detB equals the determinant of B with its last row and last column removed.
(b) Expansion along a column. Fix j and expand aj=∑iAijei in the jth slot. By step 1,
detA=i=1∑nAijdetYij,
where Yij is A with its jth column replaced by ei.
(c) Identifying detYij. Move column j of Yij to the last position by n−j interchanges of adjacent columns, then move row i to the last position by n−i interchanges of adjacent rows. Each column interchange reverses the sign by step 3; each row interchange does too, by step 3 applied to the transpose together with step 5. None of these moves changes the relative order of the other rows and columns, so the result is a matrix whose last column is en and whose first n−1 rows and columns form exactly A with row i and column j deleted, that is Mij. By (a) its determinant is detMij, so
Substituting into (b) gives detA=∑kAkjCkj, the expansion along column j. For the expansion along a row, note from the definitions that Mij(AT)=(Mji(A))T, so by step 5 the cofactors satisfy Cij(AT)=Cji(A); expanding detAT along its column i and using step 5 once more yields detA=∑kAikCik.
Step 11: part 6. Fix A and define D(b1,…,bn)=det(Ab1,…,Abn). It is multilinear, because b↦Ab is linear and det is multilinear, and alternating, because bp=bq forces Abp=Abq and step 4 applies. The jth column of AB is Abj, so D(B)=det(AB), while step 6 gives
since Aej is the jth column of A. Hence det(AB)=(detA)(detB), and the right-hand side is symmetric in A and B, so det(AB)=det(BA).
Step 12: part 7.(a) The adjugate identity. Fix i and j and consider ∑kAikCjk. For i=j this is the row expansion of step 10, namely detA. For i=j, let A′ be A with row j replaced by a copy of row i. Then A′ has two equal rows, so detA′=0 by steps 4 and 5. The minors Mjk delete row j — the only row that was altered — so A′ and A have the same cofactors along row j, while Ajk′=Aik. Expanding detA′ along its row j therefore gives 0=∑kAikCjk. In both cases
k∑AikCjk=δijdetA,
and since (adjA)kj=Cjk the left-hand side is (AadjA)ij. Hence AadjA=(detA)In for every A. Applying this to AT, and using Cij(AT)=Cji(A) from step 10 — which says adj(AT)=(adjA)T — and transposing, gives (adjA)A=(detA)In.
(b) detA=0 implies A invertible. Divide (a) by detA: the matrix (detA)−1adjA is a two-sided inverse, so A is invertible and A−1=(detA)−1adjA.
(c) A invertible implies detA=0. By part 6 and step 2, (detA)(detA−1)=det(AA−1)=detIn=1, so neither factor is zero and det(A−1)=(detA)−1.
(d) Dependent columns give detA=0. If aq=∑p=qcpap, then linearity in slot q writes detA as ∑p=qcp times determinants each of which has the column ap in two different slots; all vanish by step 4.
(e) Independent columns give detA=0. The n columns are then n independent vectors in the n-dimensional space Fn, hence a basis of it (Vector spaces and bases). So each standard basis vector expands as ei=∑jBjiaj for some scalars Bji; comparing columns, this says AB=In for B=(Bji). By part 6, (detA)(detB)=1, so detA=0.
Items (b)–(e) give the three-way equivalence of part 7.
Step 13: part 8. By part 6 and step 12(c), det(PAP−1)=(detP)(detA)(detP)−1=detA. By part 3 of the change-of-basis statement in Linear maps and matrices, any two matrices of one operator T in ordered bases of V are similar, so det[T]E does not depend on the basis and detT is well defined. Finally T is an isomorphism exactly when [T]E is invertible (part 4 of the representation statement there), which by part 7 is exactly when detT=0. □
Work over F=R and let λn be Lebesgue measure on Rn.
For a1,…,an∈Rn, the parallelepiped they span,
P(a1,…,an)={∑i=1ntiai:0≤ti≤1},
satisfies λn(P(a1,…,an))=∣det(a1,…,an)∣. It has zero volume exactly when the ai are linearly dependent.
More generally, if T:Rn→Rn is linear and E⊆Rn is Lebesgue measurable, then T(E) is measurable and λn(T(E))=∣detT∣λn(E), read with the convention 0⋅∞=0 in the one case where it is needed, detT=0 and λn(E)=∞. So ∣detT∣ is the factor by which T scales every volume, and the sign of detT records whether T preserves or reverses orientation.
For n=3, if a, b, c are the rows of A (or, equally, its columns), then detA=a⋅(b×c), the scalar triple product, which is the signed volume of P(a,b,c).
Idea of the proofOriginal
A linear map is its own derivative, so the change-of-variables formula applies to it with a constant Jacobian factor and immediately gives part 2 for invertible T: the integral that measures T(E) is ∣detT∣ times the one that measures E. A singular T squashes space into a hyperplane, which has no volume at all, so both sides vanish. Part 1 is then the special case E=[0,1]n, because the parallelepiped spanned by the columns of A is precisely the image of the unit cube under A. Part 3 is a two-line computation with the cofactor expansion.
ProofAdaptedAdapted from Folland (1999), §2.6, Thm 2.44, pp. 73–74
Throughout, identify the linear map T with its matrix in the standard basis of Rn (Linear maps and matrices), so that detT is the determinant of that matrix, its jth column is Tej, and its image is the span of those columns; part 8 of the properties statement says the number detT does not depend on this choice of basis.
Part 2, the invertible case. Suppose detT=0. As a map Rn→Rn, T is of class C1 (its components are linear in the coordinates), it is bijective — part 7 of the properties statement makes the matrix T invertible, and the linear map given by T−1 is then a two-sided inverse of it — and its derivative at every point is T itself, because a linear map is already its own best linear approximation. So T is a C1 diffeomorphism of Rn onto Rn with detDuT=detT for every u. The volume rule of Multiple integrals and change of variables then says that T(E) is Lebesgue measurable for measurable E and
λn(T(E))=∫E∣detDuT∣dnu=∣detT∣λn(E),
the integrand being the constant ∣detT∣. This is Folland's Theorem 2.44, whose proof factors T into elementary maps and treats each with the Fubini-Tonelli theorem.
Part 2, the singular case. Suppose detT=0. By part 7 of the properties statement the columns of T are dependent, so imT has dimension at most n−1 and is contained in the span H of some n−1 independent vectors b1,…,bn−1, which may be extended by a bn to a basis of Rn (Vector spaces and bases). Let R be the invertible linear map with Rbi=ei, so that R(H)={x:xn=0}. That hyperplane is Lebesgue null: for every N∈N and every ε>0 the set {x:xn=0,∣xi∣≤N} sits inside the box [−N,N]n−1×[−ε,ε], of measure (2N)n−12ε, so by monotonicity its measure is 0; and {xn=0} is the countable union over N of these sets, so it too is null (Lebesgue measure). Applying the invertible case to R−1 gives λn(H)=∣detR−1∣⋅0=0. Hence T(E)⊆imT⊆H is a subset of a null set, so it is measurable with λn(T(E))=0, while ∣detT∣λn(E)=0⋅λn(E)=0 as well, with the usual convention 0⋅∞=0 when E has infinite measure.
Part 2, the orientation clause. Call an ordered basis (v1,…,vn) of Rn positively oriented when det(v1,…,vn)>0, which is the standard convention and makes (e1,…,en) positively oriented. If T is invertible then (Tv1,…,Tvn) is again a basis, and the jth column of the matrix T⋅(v1⋯vn) is Tvj, so the product rule gives
det(Tv1,…,Tvn)=(detT)det(v1,…,vn).
Thus T preserves the orientation of every basis when detT>0 and reverses the orientation of every basis when detT<0 — which is the content of the clause.
Part 1. Let A be the matrix with columns a1,…,an. For t∈Rn the vector At is ∑itiai, so P(a1,…,an)=A([0,1]n). The unit cube is measurable with λn([0,1]n)=1, so part 2 gives λn(P)=∣detA∣. By part 7 of the properties statement this vanishes exactly when the columns a1,…,an are linearly dependent.
Part 3. Let a,b,c be the rows of A. Expanding along the first row (part 5 of the properties statement) and writing the three 2×2 minors out,
The three brackets, with the signs as shown, are the components (b×c)1, (b×c)2, (b×c)3 of the cross product (Vector algebra and index notation), so the right-hand side is a⋅(b×c). Reading the same three vectors as the columns of a matrix gives the transpose, whose determinant is the same by part 2 of the properties statement. Finally, ∣detA∣ is the volume of P(a,b,c) by part 1, and its sign is the orientation of the triple (a,b,c) by the clause just proved, so detA is the signed volume. □
Note(What it means)Original
A single number decides whether a square system can be solved: detA=0 says the columns of A are independent, so A is invertible. The reason one number can do this is part 1 — demanding multilinearity, vanishing on repeated columns, and the value 1 at the identity leaves no freedom at all, so every identity about determinants is forced. Geometrically ∣detA∣ is the volume of the box spanned by the columns, which is why it vanishes exactly when the box is flat. Reach for the determinant for small matrices, for symbolic work, for the characteristic polynomial, and for Jacobians in change-of-variables formulas — not for deciding numerically whether a large matrix is close to singular.
Remark(Where the hypotheses are used, and conventions)AdaptedAdapted from Dummit & Foote (2004), §11.4, the definition of alternating and Prop. 22(1),(3), p. 436, the determinant axioms, p. 437, and Cor. 27, pp. 438–439; Arfken, Weber & Harris (2013), §2.1, eq. (2.10), p. 86; Lee (2013), App. B, eq. (B.3), p. 629
Which "alternating". We take alternating to mean vanishing whenever two arguments coincide. Dummit and Foote (Dummit & Foote (2004), §11.4, p. 436) define the word by the apparently weaker requirement that the value vanish whenever two consecutive arguments are equal, and then derive the any-pair form as part (3) of their Prop. 22 on the same page; it is in that sense that the word enters their determinant axioms on p. 437. For a multilinear function the two requirements are therefore the same condition, and we use the any-pair form as the axiom in part 1. Over R and C it is in turn equivalent to changing sign under an interchange of two arguments — step 6 of the proof derives the sign change from the vanishing, and setting x=y in the sign change recovers 2D=0 and so the vanishing. The last equivalence fails over a field of characteristic 2, where −1=1 makes every symmetric function sign-changing and only the vanishing condition gives the determinant.
Scalars. Everything above except part 7 holds verbatim over any commutative ring, which is the setting of Dummit and Foote. There part 7 reads: A is invertible if and only if detA is a unit of the ring. Over an integral domain, detA=0 still holds exactly when the columns are linearly dependent. Our restriction to F=R,C loses nothing here.
Which index runs over the permutation. We sum over permutations of the column index with the row index ascending. So does Arfken, Weber and Harris (Arfken, Weber & Harris (2013), §2.1, eq. (2.10), p. 86), whose Dn=∑ij…εij…a1ia2j⋯ is our sum written with the Levi-Civita symbol εij… in place of sgnσ, and with the indices allowed to range freely because ε kills the non-permutations. Dummit and Foote (Dummit & Foote (2004), §11.4, Thm 24, p. 437) do the opposite, permuting the row index: detA=∑σε(σ)Aσ(1)1⋯Aσ(n)n. That is the one genuine difference, and it changes nothing, by part 2.
Part 5 at n=1 needs the convention det()=1 for the empty 0×0 matrix; with it, the expansion of a 1×1 determinant reads det(a)=a.
Not a numerical tool. The defining sum has n! terms and cofactor expansion is nearly as expensive, so determinants of large matrices are computed from an LU factorisation (see Linear systems and rank). The size of detA is also a bad proxy for conditioning: Arfken, Weber and Harris (Arfken, Weber & Harris (2013), §2.1, p. 86) exhibit a 3×3 integer matrix with entries near 10 whose determinant is 1, and det(εIn)=εn is tiny for a perfectly well-conditioned matrix. Use the singular value decomposition or a condition number instead.
Example(A 3×3 determinant four ways, and a 4×4 by elimination)Original
Part A: the matrix
B=2101−13021.
From the definition. With n=3 there are 3!=6 terms. Writing each as (sgnσ)B1σ(1)B2σ(2)B3σ(3) and listing σ by its values (σ(1),σ(2),σ(3)):
which is exactly the row of cofactors just computed — as part 3 of the volume statement says it must be — and a⋅(b×c)=−14−1+0=−15. So the parallelepiped on a,b,c has volume 15, and the triple is negatively oriented.
Multiplying out, BadjB=adjBB=−15I3, confirming part 7 and giving
B−1=−151adjB=15171−31−26−243.
Part B: a 4×4 determinant by elimination. Let
A=21041−130021131−21.
Row-reduce with partial pivoting, counting interchanges. Column 1: the largest entry in modulus is 4, in row 4, so interchange rows 1 and 4 (first interchange). Subtracting 41 and 21 of the new first row from rows 2 and 4 clears the column:
40000−13117/41−1/213/4−25/2.
Column 2: the largest remaining entry is 3, in row 3, so interchange rows 2 and 3 (second interchange), then add 31 of the new second row to row 3 and subtract 31 of it from row 4:
400003001125/12−5/61−21/1219/6.
Column 3: ∣25/12∣>∣−5/6∣, so no interchange; adding 52 of row 3 to row 4 gives the last entry 619+52⋅121=619+301=516. The result is upper triangular with diagonal 4,3,1225,516.
By part 3, the determinant is left alone when a multiple of some row is added to a different row, and it flips sign at every interchange; by part 4, a triangular matrix has the product of its diagonal for determinant. Two interchanges were used, so the two sign flips cancel and
detA=(−1)2⋅4⋅3⋅1225⋅516=80.
As a check, expand along the first row of A. Deleting row 1 and columns 1, 2, 4 gives minors of determinant −6, −17 and −25 (column 3 need not be touched, since A13=0), so C11=−6, C12=+17, C14=+25 and
detA=2(−6)+1(17)+0+3(25)=−12+17+75=80.
The two routes agree. They cost very differently. Elimination needed one multiplier per row cleared, five in all here, and a handful of multiply-and-subtract steps; its general cost is of order n3. The defining sum for a 4×4 already has 4!=24 signed products, and cofactor expansion is no better asymptotically. At n=20 the comparison is 20!≈2.4×1018 terms against a few thousand arithmetic operations, which is why determinants of anything but small matrices are computed by elimination.
ApplicationOriginal
The Jacobian factor in every change of variables is a determinant because volume is. Part 2 of the volume statement is the linear case of the rule that an integral picks up the factor ∣detDuG∣ under a substitution x=G(u) (Multiple integrals and change of variables): a smooth map is locally linear, and the determinant of its derivative is the local volume stretch. That is the whole reason that dxdy=rdrdφ in the plane and d3x=r2sinθdrdθdφ in space — the numbers r and r2sinθ are determinants — and why a vanishing Jacobian flags a coordinate system that has collapsed, as spherical coordinates do on the polar axis. The same reading explains the sign: orientation-reversing substitutions are exactly those with negative determinant, which is why the absolute value appears in volume formulas but not in the oriented integrals of differential forms.
Antisymmetry of fermions is the alternating property. The state of N identical fermions must change sign when any two particles are exchanged. Given N one-particle orbitals φ1,…,φN and particle coordinates x1,…,xN (position and spin), the Slater determinant
Ψ(x1,…,xN)=N!1det[φi(xj)]i,j=1N
does exactly that: exchanging two particles exchanges two columns, and part 3 says the value changes sign. The Pauli exclusion principle is then not an extra postulate but part 3 again — if two orbitals are equal, two rows coincide and Ψ≡0, so that state does not exist. The product rule has a physical reading too: a change of the one-particle basis, φ↦Uφ, replaces the matrix [φi(xj)] by U[φi(xj)], so part 6 multiplies Ψ by detU, and with U unitary ∣detU∣=1 leaves the state unchanged up to a phase — which is why a Slater determinant describes an occupied subspace rather than a particular list of orbitals.
Determinants decide when a homogeneous problem has a non-trivial solution. Setting a determinant to zero is the standard route to an eigenvalue condition: the frequencies of a vibrating system come from a secular determinant det(K−ω2M)=0 (Generalized eigenproblems and normal modes), the allowed modes of a waveguide or the energy levels in a tight-binding model come from the same kind of condition, and the independence of solutions of a linear differential equation is tested by the Wronskian determinant (Structure of linear equations and the Wronskian). In each case the underlying fact is part 7: a square homogeneous system has a solution other than zero exactly when its determinant vanishes.
Gaussian elimination with partial pivoting as a recipe for the rank and the complete solution set of Ax = b, together with the rank-nullity law and the Fredholm alternative that say in advance how many solutions and how many consistency conditions there are.
Let F=R or C, let A∈Mm×n(F) and read A as the linear map Fn→Fm, x↦Ax.
The rank of A is rankA=dimFimA and its nullity is dimFkerA. Riley, Hobson and Bence call imA the range and kerA the null space. The column rank is the dimension of the span of the columns of A in Fm, the row rank that of the span of its rows in Fn.
For b∈Fm the augmented matrix[A∣b]∈Mm×(n+1)(F) is A with b appended as an extra column. The system Ax=b is homogeneous if b=0 and inhomogeneous otherwise, and consistent if it has at least one solution.
The three elementary row operations are: interchanging two rows; scaling a row by a nonzero scalar; adding a scalar multiple of some row to a different row.
A matrix is in row echelon form if every zero row lies below every nonzero row and, in each nonzero row, the first nonzero entry (its pivot) stands strictly to the right of the pivot of the row above. A variable xj is free if column j holds no pivot.
A∗∈Mn×m(F) is the adjoint (conjugate transpose) of A, (A∗)ji=Aij; for real A it is AT. On Fk we use (u,v)=∑i=1kuivi, and S⊥={v:(v,s)=0 for all s∈S}.
Method(Rank and the rank-nullity law)AdaptedAdapted from Lee (2013), App. B, Cor. B.21, p. 627, Exercise B.22, p. 627, Prop. B.24, p. 627, Prop. B.25, p. 628; Riley, Hobson & Bence (2006), §8.18.1, eq. (8.119), p. 293
Let A∈Mm×n(F) and put r=rankA.
Rank-nullity.r+dimFkerA=n. More generally, if T:V→W is linear and dimFV<∞, then dimFimT+dimFkerT=dimFV; note that it is the dimension of the domain that is split, with no hypothesis on W.
Row rank equals column rank, and both equal r; hence rankAT=rankA∗=r.
r≤min(m,n), with r=n exactly when A is injective and r=m exactly when A is surjective.
r≥k if and only if some k×k submatrix of A (chosen by deleting rows and columns) has nonzero determinant.
Elementary row operations change neither the rank of a matrix nor the solution set of the system it represents when they are applied to [A∣b]. If [U∣c] is any row echelon form reached from [A∣b], then rankA is the number of pivots of U.
Idea of the proofOriginal
The rank-nullity law is one basis construction: glue a basis of the kernel to vectors whose images form a basis of the image, and check that the glued list is a basis of the domain. Dimension then has nowhere else to go. The other parts are that law seen from different sides. Row rank meets column rank by factoring A through its own image, which writes A as a product of a tall and a wide matrix and bounds the rank of the transpose. And an elementary row operation is multiplication on the left by an invertible matrix, which can change neither the kernel nor the solution set — so elimination may be trusted to report the rank, which in echelon form is visible as the number of pivots.
ProofAdaptedAdapted from Lee (2013), App. B, Thm B.20 and Cor. B.21, pp. 626–627, Prop. B.24, pp. 627–628, Prop. B.25, p. 628; Riley, Hobson & Bence (2006), §8.18.1, pp. 293–294
Part 1. Let T:V→W be linear with dimFV=N<∞. For any basis (z1,…,zN) of V, linearity gives imT=span(Tz1,…,TzN), so imT is finite-dimensional; write r=dimimT and k=dimkerT. Choose a basis (u1,…,uk) of kerT and a basis (w1,…,wr) of imT, and for each i pick vi∈V with Tvi=wi, which is possible by the definition of the image. We claim (v1,…,vr,u1,…,uk) is a basis of V.
Independence. Suppose ∑iaivi+∑jbjuj=0. Applying T and using Tuj=0 gives ∑iaiwi=0, so every ai=0 because the wi are independent. The relation collapses to ∑jbjuj=0, so every bj=0 because the uj are independent.
Spanning. Let v∈V. Since Tv∈imT, write Tv=∑iciwi and put v′=∑icivi. Then T(v−v′)=0, so v−v′∈kerT is a combination of the uj, and v=v′+(v−v′) is a combination of the whole list.
Hence N=r+k, which is the general form; taking T to be x↦Ax on V=Fn gives r+dimkerA=n. The argument never mentioned dimW, which is the point of the closing remark of part 1.
Part 2. The columns of A are the vectors Aej, so they span imA and the column rank is rankA=r. Choose a basis of the r-dimensional subspace imA. Writing the map x↦Ax as the composition of A~:Fn→imA (the same formula, with the codomain cut down) and the inclusion ι:imA→Fm, the composition rule of Linear maps and matrices gives a factorisation
A=BC,C∈Mr×n(F),B∈Mm×r(F),
with C the matrix of A~ and B the matrix of ι in the chosen basis. Transposing, AT=CTBT. Now im(CTBT)⊆imCT, and imCT is spanned by the r columns of CT, so rankAT≤r=rankA. Applying this inequality to AT in place of A gives rankA=rank(AT)T≤rankAT, so the two are equal. The row rank of A is by definition the column rank of AT, that is rankAT=r. Finally A∗ is obtained from AT by conjugating every entry, and conjugating a vanishing linear combination conjugates its coefficients, so a family of vectors in Ck is independent exactly when the conjugated family is; hence rankA∗=rankAT=r.
Part 3. Part 1 gives r=n−dimkerA≤n, with equality exactly when kerA={0}, which is exactly injectivity (Linear maps and matrices). And imA is a subspace of Fm, so r≤m, with equality exactly when imA=Fm — a subspace of the same finite dimension as the ambient space is the whole space (Vector spaces and bases) — which is surjectivity.
Part 4. Suppose r≥k. Then A has k independent columns; the m×k submatrix A′ they form has rank k, so by part 2 it has k independent rows. The k×k submatrix A′′ cut from those rows has row rank k, hence by part 2 again column rank k, so its columns are independent and detA′′=0 by part 7 of the properties statement in Determinants. Conversely, let some k×k submatrix A′′ have detA′′=0; its k columns are then independent, by the same part 7. The k columns of A it was cut from are independent too: a vanishing combination of them restricts, on the chosen rows, to a vanishing combination of the columns of A′′, forcing all coefficients to be zero. Hence r≥k.
Part 5. Each elementary row operation on a matrix with m rows is left multiplication by an invertible E∈Mm×m(F): interchanging rows p,q uses the E got from Im by that interchange, which is its own inverse; scaling row p by c=0 uses the diagonal E with c in place p, whose inverse has c−1 there; and adding c times row p to row q=p uses E=Im+cF, where F has a single entry 1 in position (q,p), whose inverse is Im−cF because F2=0 when q=p. Since E is invertible, EAx=0 holds exactly when Ax=0, so ker(EA)=kerA and part 1 gives rank(EA)=n−dimker(EA)=rankA. Likewise Ax=b and (EA)x=Eb have the same solutions, and applying the operation to the augmented matrix produces exactly [EA∣Eb]. Finitely many operations compose, so both invariances survive.
For the pivot count, let [U∣c] be a row echelon form obtained from [A∣b]; deleting the last column commutes with row operations, so U is obtained from A by the same operations and rankU=rankA. The nonzero rows of U are independent. Indeed, suppose a vanishing combination ∑iλi(row i)=0 had some λi=0; let i0 be the smallest index with λi0=0 — necessarily a nonzero row — and let j0 be the column of its pivot. Every nonzero row below i0 has its first nonzero entry strictly to the right of column j0, by the echelon condition, so its entry in column j0 vanishes; the rows above i0 carry coefficient 0; and zero rows contribute nothing. So the entry of the combination in column j0 is λi0Ui0j0=0, a contradiction. Hence the row rank of U is its number of nonzero rows, which is its number of pivots, and by part 2 this equals rankU=rankA. □
Ax=b is consistent exactly when b∈imA, equivalently when rank[A∣b]=r. In the remaining case rank[A∣b]=r+1 and no solution exists.
If xp is one solution, the solution set is exactly the coset xp+kerA, so it is an affine subspace of Fn of dimension n−r. It is a single point when r=n and is infinite when r<n.
The homogeneous system Ax=0 always has the solution x=0, and has a nonzero solution if and only if r<n. If m<n then r≤m<n, so a homogeneous system with fewer equations than unknowns always has nonzero solutions.
For a square system (m=n) the following are equivalent: r=n; detA=0; kerA={0}; Ax=b has exactly one solution for every b∈Fn. If instead detA=0, then for each b the system has either no solution or infinitely many.
Idea of the proofOriginal
Read the system columnwise: Ax=b says that b is the combination of the columns of A with coefficients x. Existence then asks whether b lies in the column span, which is why appending b as an extra column and comparing ranks settles it. Uniqueness asks whether the columns satisfy a relation, that is whether kerA is trivial, and rank-nullity converts that into the count n−r. The square case is special only because a single number, the determinant, detects r=n.
Part 1. Writing a1,…,an for the columns of A, the definition of the matrix product gives Ax=∑jxjaj. So the right-hand sides that can be achieved are exactly the elements of span(a1,…,an)=imA: the system is consistent precisely when b∈imA. The columns of [A∣b] span span(a1,…,an,b). If b∈imA this is imA, of dimension r. If b∈/imA then b is independent of a basis of imA — a relation would express b in terms of it — so adjoining it raises the dimension by exactly one and rank[A∣b]=r+1.
Part 2. Let Axp=b. For any x, linearity gives Ax−b=A(x−xp), so Ax=b holds exactly when x−xp∈kerA, that is exactly when x∈xp+kerA. This coset is an affine subspace whose dimension is dimkerA=n−r by rank-nullity. If r=n then kerA={0} and the coset is the single point xp. If r<n then kerA contains a nonzero y, hence all its scalar multiples ty, t∈F, which are distinct because F is infinite; so the solution set is infinite.
Part 3.A0=0, so the homogeneous system is always consistent. A nonzero solution exists exactly when kerA={0}, that is when n−r>0 by rank-nullity. If m<n then part 3 of the rank statement gives r≤m<n, so this happens automatically.
Part 4. Let m=n. By rank-nullity, r=n is equivalent to kerA={0}. By part 7 of the properties statement in Determinants, detA=0 is equivalent to the n columns of A being independent, which — the columns spanning imA — is equivalent to r=n. If r=n then A is invertible, so x=A−1b solves the system and is its only solution by part 2; conversely, if for some b there is exactly one solution, then by part 2 the coset xp+kerA is a single point, so kerA={0} and r=n. Finally, if detA=0 then r<n and kerA={0}; for a given b, either b∈/imA and there is no solution, or b∈imA and part 2 makes the solution set an infinite coset. □
Method(The Fredholm alternative in finite dimensions)AdaptedAdapted from Stakgold & Holst (2011), §3.4, Alternative Theorem, pp. 206–208
Let A∈Mm×n(F) and b∈Fm.
Adjoint identity.(Ax,v)=(x,A∗v) for all x∈Fn and v∈Fm, and A∗ is the only matrix with this property.
imA=(kerA∗)⊥. Hence Ax=b is consistent if and only if(b,v)=0 for every v∈Fm satisfying A∗v=0. These m−rankA independent consistency conditions are the whole obstruction.
The alternative. Exactly one of the following holds: (i) Ax=b has a solution; (ii) there exists v∈Fm with A∗v=0 and (b,v)=0.
For m=n, either A∗v=0 forces v=0, in which case Ax=b has exactly one solution for every b; or A∗v=0 has d≥1 independent solutions, in which case Ax=b is solvable precisely for the b in a subspace of dimension n−d, and then has a d-dimensional set of solutions.
Idea of the proofOriginal
One identity carries the whole theorem: (Ax,v)=(x,A∗v). Read from left to right it says that any v annihilated by A∗ is orthogonal to everything A can produce, so a v with A∗v=0 and (b,v)=0 is a certificate that Ax=b has no solution. What has to be proved is that there are no obstructions beyond these, and that is a dimension count: the orthogonal complement of the image of a matrix is the kernel of its adjoint, and taking the complement of a subspace twice returns something of the original dimension, hence the original subspace.
ProofAdaptedAdapted from Stakgold & Holst (2011), §3.4, Alternative Theorem and its proof, pp. 207–208
Part 1. With the convention (u,v)=∑iuivi fixed in the definition block,
the middle step being the exchange of two finite sums together with zw=zw and the definition (A∗)ji=Aij. For uniqueness, suppose B∈Mn×m(F) also satisfies (Ax,v)=(x,Bv) for all x,v. Subtracting, (x,(A∗−B)v)=0 for all x and v; taking x=(A∗−B)v gives ∑j∣((A∗−B)v)j∣2=0, so (A∗−B)v=0 for every v, that is B=A∗.
A lemma on orthogonal complements.For every subspace S of Fk, dimS⊥=k−dimS and (S⊥)⊥=S. Put s=dimS, choose a basis of S and let C∈Mk×s(F) have those vectors as its columns, so that S=imC. A vector v lies in S⊥ exactly when (v,Cx)=0 for all x∈Fs, equivalently — conjugating — when (Cx,v)=0 for all x, which by part 1 is (x,C∗v)=0 for all x, which as above means C∗v=0. So
S⊥=kerC∗,
and rank-nullity applied to C∗∈Ms×k(F), together with rankC∗=rankC=s (part 2 of the rank statement), gives dimS⊥=k−s. Next, S⊆(S⊥)⊥: if y∈S and v∈S⊥ then (v,y)=0 by definition of S⊥, hence (y,v)=(v,y)=0. Applying the dimension formula twice, dim(S⊥)⊥=k−(k−s)=s=dimS, and a subspace of the same finite dimension as the space containing it is that space, so (S⊥)⊥=S.
Part 2. Taking C=A in the lemma's computation gives (imA)⊥=kerA∗. Taking complements and using the lemma with S=imA,
imA=((imA)⊥)⊥=(kerA∗)⊥.
Combined with part 1 of the solvability statement, Ax=b is consistent exactly when b∈(kerA∗)⊥, that is exactly when (b,v)=0 for every v with A∗v=0. Let v(1),…,v(d) be a basis of kerA∗; since (b,v) is linear in b and conjugate-linear in v, the whole family of conditions is equivalent to the d equations (b,v(i))=0. Here d=m−rankA∗=m−rankA by rank-nullity and part 2 of the rank statement. These d conditions are independent: the map b↦((b,v(1)),…,(b,v(d))) is linear from Fm to Fd with matrix V∗, where V has the v(i) as columns, and rankV∗=rankV=d, so it is surjective and no condition is implied by the others.
Part 3. By part 2, statement (i) fails exactly when some v∈kerA∗ has (b,v)=0, which is statement (ii). So (i) and (ii) are negations of each other and exactly one holds.
Part 4. Let m=n. If A∗v=0 forces v=0 then kerA∗={0}, so rankA∗=n by rank-nullity and rankA=n by part 2 of the rank statement; part 4 of the solvability statement then gives exactly one solution for every b. Otherwise d=dimkerA∗≥1. By part 2 the solvable right-hand sides are exactly those in (kerA∗)⊥=imA, a subspace of dimension n−d by the lemma. For such a b, part 2 of the solvability statement makes the solution set a coset of kerA, whose dimension is n−rankA=n−(n−d)=d. □
Method(Gaussian elimination with partial pivoting)AdaptedAdapted from Riley, Hobson & Bence (2006), §27.3.1, pp. 995–996, and §8.18.1, pp. 293–295
Given A∈Mm×n(F) and b∈Fm, this returns rankA and the complete solution set of Ax=b. Work on the augmented matrix [A∣b] throughout, so that every row operation is applied to b as well.
Set the current row i←1 and the current column j←1.
Choose a pivot. Among rows i,…,m pick one, say row k, whose entry in column j has the largest modulus. If that modulus is zero, column j carries no pivot: set j←j+1 and repeat this step (stop the elimination if j>n).
Interchange. Swap rows i and k. The entry p in position (i,j) is now nonzero; it is the pivot of row i.
Eliminate. For each k>i, replace row k by (row k) −(Akj/p)⋅(row i). Column j is now zero below row i.
Set i←i+1, j←j+1 and go back to step 2, stopping when i>m or j>n.
Read the rank. The result [U∣c] is in row echelon form. The number r of pivots is rankA, and the pivot columns j1<⋯<jr identify r linearly independent columns of the original A.
Test consistency. If some row of [U∣c] has all its first n entries zero but a nonzero last entry, then rank[A∣b]=r+1: there is no solution. Stop.
Back-substitute. Give the n−r free variables arbitrary values. Then for i=r,r−1,…,1 solve the ith pivot row for its pivot variable,
xji=Uiji1(ci−k>ji∑Uikxk),
every xk on the right being already known.
Describe all solutions. Running step 8 with all free variables 0 gives one solution xp. Running it with the homogeneous right-hand side, one free variable set to 1 and the rest to 0, gives n−r vectors that form a basis of kerA. By part 2 of the solvability statement, the solution set is xp plus their span.
When it works, and how it fails. In exact arithmetic over any field the recipe always terminates, after at most min(m,n) pivots and about 32n3 operations for a square system, and the rank and solution set it returns are exact; step 2 may then pick any nonzero entry. In floating point the choice in step 2 matters: a zero pivot halts plain elimination and a merely small one divides by a near-zero number, amplifying rounding error. Two failure modes survive pivoting. First, the computed rank is unreliable when A is close to a matrix of lower rank, since whether a pivot counts as zero is then a judgement about rounding noise; use the singular value decomposition. Second, partial pivoting holds every multiplier to ∣Akj/p∣≤1 yet still permits the entries of U to grow by a factor 2n−1 over those of A, and matrices attaining that bound exist; such growth is essentially never seen in practice, but it does mean the method is not unconditionally stable. See Numerical linear systems and Matrix norms and conditioning.
Note(What it means)Original
The rank is the number of genuinely independent equations in the system, and the rank-nullity law turns it into a count: n−r dimensions' worth of freedom in the unknowns, m−r conditions the data must satisfy. The Fredholm alternative names those conditions explicitly — the right-hand side must be orthogonal to every solution of the homogeneous adjoint system — and that form of the answer is what generalises, unchanged in spirit, to differential and integral operators. Elimination is the way all of this is actually computed: one sweep produces the rank, the consistency test and a basis of the null space at once.
Real versus complex adjoint. Stakgold and Holst state the alternative for real matrices, where A∗ is the transpose. Over C the conjugate is required: with the convention (u,v)=∑iuivi used here, (Ax,v)=(x,A∗v) holds for the conjugate transpose and fails for the plain transpose. Taking the transpose by mistake gives wrong consistency conditions as soon as A has non-real entries.
Finite dimensions. Part 2 of the Fredholm statement uses that imA is finite-dimensional, hence closed. For operators on infinite-dimensional spaces the clean equality imA=(kerA∗)⊥ becomes imA=(kerA∗)⊥, and a closed-range hypothesis is needed to recover the finite-dimensional form; this is the content of the Fredholm theory of compact operators.
"Fewer equations than unknowns" is about rank, not shape. Part 3 of the solvability statement uses m<n only through r≤m. A system with many more equations than unknowns can still be underdetermined, if its rank is small.
The square case is not the general case. The determinant test in part 4 of the solvability statement needs m=n; for rectangular A its determinantal substitute is part 4 of the rank statement.
Cramer's rule is not a method.Arfken, Weber and Harris (Arfken, Weber & Harris (2013), §2.1, pp. 83–84) solve small systems by ratios of determinants, which suits 2×2 and 3×3 systems and symbolic work; its cost grows factorially, so beyond that elimination is the method.
Example(Three equations, five unknowns, one consistency condition)Original
Take F=R and
A=123246−1−1−2011358,b=134.
(The third row of A is the sum of the first two, which is what will make the system degenerate; the recipe does not need to be told this.)
Steps 1–3: the first pivot. In column 1 the entry of largest modulus among rows 1,2,3 is the 3 in row 3, so interchange rows 1 and 3 of [A∣b]:
321642−2−1−1110853431.
Step 4: eliminate. Subtract 32 of the first row from the second and 31 of it from the third:
300600−21/3−1/311/3−1/38−1/31/341/3−1/3.
Step 2 again: a column with no pivot. Column 2 is now zero in rows 2 and 3, so it carries no pivot and we move to column 3. There the two candidates 1/3 and −1/3 have equal modulus; take the first, in row 2, as the pivot. Adding row 2 to row 3 clears it:
[U∣c]=300600−21/3011/308−1/3041/30.
Step 6: the rank.U is in row echelon form with two pivots, so rankA=2 by part 5 of the rank statement, and the pivot columns j1=1, j2=3 pick out two independent columns of the original A, namely (1,2,3)T and (−1,−1,−2)T. Rank-nullity then predicts dimkerA=5−2=3 before any solving is done, and part 4 of the rank statement gives an independent check: the 2×2 submatrix of A in rows 1,2 and columns 1,3 is (12−1−1) with determinant 1=0, so rankA≥2, while rankA=2 says every 3×3 submatrix is singular.
Step 7: consistency. The zero row of U has a zero entry in the last column, so the system is consistent.
Step 8: back-substitution. The free variables are x2, x4, x5 — the non-pivot columns. The second pivot row gives
Step 9: all solutions. Setting the free variables to zero gives xp=(2,0,1,0,0)T, and indeed Axp=(2−1,4−1,6−2)T=(1,3,4)T=b. Setting one free variable to 1 and the others to 0 with b replaced by 0 gives three kernel vectors,
k1=−21000,k2=−10−110,k3=−20101,
so the solution set is {xp+t1k1+t2k2+t3k3:ti∈R}, a three-dimensional affine subspace of R5 as predicted. Checking k2: Ak2=(−1+1+0,−2+1+1,−3+2+1)T=0. The three are independent because their last three entries form the identity pattern (1,0,0), (0,1,0), (0,0,1) in the free positions.
The consistency condition, found two ways. Since A is real, A∗=AT, and ATv=0 says v1ρ1+v2ρ2+v3ρ3=0 for the rows ρi of A. As ρ3=ρ1+ρ2 and ρ1,ρ2 are independent, this forces v1=v2=−v3, so kerAT=span{(1,1,−1)T} — of dimension m−r=3−2=1, as part 2 of the Fredholm statement requires. The single consistency condition is therefore
(b,v)=b1+b2−b3=0,
satisfied by b=(1,3,4)T. Elimination finds the same covector by itself: tracking the operations, the final zero row was formed as ρ1+ρ2−ρ3, so the last entry of that row is exactly b1+b2−b3. Replace b by (1,3,5)T, for which b1+b2−b3=−1, and the same elimination ends with the row (00000∣−1): step 7 reports no solution, with rank[A∣b]=3=r+1.
ApplicationOriginal
A resistor network: why the ground node must be chosen, and why the currents must balance. Join each pair of three nodes by a 1Ω resistor and inject currents I1,I2,I3 from outside. Ohm's law on each resistor and current conservation at each node give, for the node potentials vi,
Lv=I,L=2−1−1−12−1−1−12,
the ith equation being ∑j=i(vi−vj)=Ii. Every row of L sums to zero, so L(1,1,1)T=0: the matrix is singular, and the physics says why — adding the same constant to every potential changes no current. Part 2 of the solvability statement is then the statement that the potentials are determined exactly up to that one constant, which is what "choosing a ground" means. Because L is symmetric, kerL∗=kerL=span{(1,1,1)T}, and the Fredholm alternative gives the solvability condition
(I,(1,1,1)T)=I1+I2+I3=0:
Kirchhoff's current law for the network as a whole. Inject I=(1,0,−1)T, which satisfies it. By the symmetry v↦−v under swapping nodes 1 and 3, try v=(a,0,−a)T; the first equation reads a+2a=1, so a=31 and v=(31,0,−31)T, which satisfies all three equations. The effective resistance between nodes 1 and 3 is (v1−v3)/1=32Ω — correct, since the direct 1Ω resistor is in parallel with the 2Ω path through node 2, giving (1⋅2)/(1+2). The whole pattern — a one-dimensional kernel, one consistency condition, a solution fixed up to a gauge choice — is generic for a connected network, and L is its graph Laplacian.
The same alternative, for differential operators. The shape of the answer here is what survives into infinite dimensions, and it is the reason the Fredholm alternative is stated at all rather than just "row-reduce and see". The Neumann problem ∇2u=f in Ω with ∂u/∂n=g on ∂Ω has constants in the kernel of its adjoint, so it is solvable only if ∫ΩfdV=∮∂ΩgdS, and then only up to an additive constant (Green's identities); a Fredholm integral equation with a degenerate kernel reduces to exactly the finite system treated here (Separable kernels); and for compact operators the alternative holds in the same form, with a closed-range hypothesis replacing finite dimension (Compact operators). In each case the consistency conditions are orthogonality to the solutions of the homogeneous adjoint problem.
When the conditions fail: measurement data. An overdetermined system Ax=b built from measurements almost never satisfies its m−r consistency conditions, because b carries noise. The Fredholm alternative then says plainly that no solution exists, and the practical response is to replace "solve" by "minimise ∥Ax−b∥", which projects b onto imA along kerA∗ — the same two subspaces, now used constructively (Orthogonal projection and least squares).
Real and complex inner products in the convention used throughout this handbook, the norm they induce, and the Cauchy-Schwarz and triangle inequalities with their exact cases of equality.
Definition(Inner product space)AdaptedAdapted from Kreyszig (1978), §3.1, Def. 3.1-1, pp. 128–129, and p. 130; Lee (2013), App. B, pp. 635–636; Reed & Simon (1980), §II.1, p. 36; Hassani (2013), §2.2, p. 31 (the words sesquilinear and hermitian)
Let V be a vector space over F, where F=R or C. An inner product on V is a map V×V→F, written (x,y), with, for all x,y,z∈V and a∈F:
The third condition makes (x,x) real, so the fourth is well posed; a vector space with a chosen inner product is an inner product space. Combining the first three conditions,
(ax+by,z)=a(x,z)+b(y,z),(x,ay+bz)=a(x,y)+b(x,z),
so the product is linear in its first slot and conjugate-linear in its second — sesquilinear, or hermitian. Over R the bars vanish: the third condition becomes symmetry, (x,y)=(y,x), and the product is bilinear.
Definition(Norm, orthogonality, orthogonal complement)AdaptedAdapted from Lee (2013), App. B, pp. 636–637; Kreyszig (1978), §3.1, eq. (1), p. 129, and Def. 3.1-2, p. 131; Hassani (2013), §2.2, Def. 2.2.4, p. 32; Stakgold & Holst (2011), §4.5, pp. 264–266
A norm on a vector space V over F is a map ∥⋅∥:V→R with: ∥x∥≥0 and ∥x∥=0 only for x=0; ∥ax∥=∣a∣∥x∥ for a∈F; and ∥x+y∥≤∥x∥+∥y∥. A vector space with a chosen norm is a normed space, metrized by d(x,y)=∥x−y∥.
On an inner product space the induced norm is ∥x∥=(x,x)1/2; part 3 below shows it is a norm. In the real case ∥x∥ is the length of x, and the angleθ∈[0,π] between nonzero x,y is fixed by cosθ=(x,y)/(∥x∥∥y∥), legitimate because Cauchy-Schwarz confines that quotient to [−1,1].
Vectors x,y are orthogonal, written x⊥y, if (x,y)=0; a set is orthogonal if its elements are pairwise orthogonal, and orthonormal if in addition every element has norm 1. For S⊆V the orthogonal complement is
S⊥={v∈V:(v,s)=0for every s∈S},
always a subspace of V, whatever S is. An inner product space that is complete in the induced metric is a Hilbert space; completeness is not assumed here.
Definition(The standard inner products)AdaptedAdapted from Kreyszig (1978), §3.1, Examples 3.1-3 and 3.1-4, eqs. (5)–(6), pp. 131–132; Hassani (2013), §2.2, Example 2.2.3, eq. (2.10), pp. 31–32
On Fn: (x,y)=∑i=1nxiyi. For F=R this is the Euclidean dot product, and the induced norm is ∥x∥=(∑i∣xi∣2)1/2.
On a space of F-valued functions on an interval, a weighted inner product
(f,g)=∫abw(t)f(t)g(t)dt,
where the weightw is real-valued, continuous and strictly positive on (a,b), and the space is small enough that the integral converges for all its members. Two cases where it does: C([a,b],F) with −∞<a<b<∞ and w integrable on [a,b]; and the polynomials, with a weight whose moments ∫abw(t)∣t∣kdt all converge, k=0,1,2,… — for instance w(t)=e−t on (0,∞), where the k-th moment is k!. Strict positivity of w on the open interval is what makes (f,f)=0 force f=0. Different weights give different inner products.
Definition(The induced norm and the two basic inequalities)AdaptedAdapted from Kreyszig (1978), §3.2, Lemma 3.2-1, pp. 136–138, p. 130, and Lemma 3.2-2, p. 138; Stakgold & Holst (2011), §4.5, p. 264; Reed & Simon (1980), §II.1, p. 37, and Problem 4, p. 63; Lee (2013), App. B, Exercise B.39, p. 636
Let V be an inner product space over F and ∥x∥=(x,x)1/2. Parts 1–3, 5 and 6 hold for all x,y∈V, and so does the first sentence of part 4, whose second sentence covers every finite family x1,…,xN∈V, N∈N. Parts 7 and 8 carry their own hypotheses: part 7 is about a vector space W over F equipped with an arbitrary norm, not assumed to come from an inner product, and part 8 is about sequences in V.
Expansion.∥x+y∥2=∥x∥2+2Re(x,y)+∥y∥2.
Cauchy-Schwarz inequality.∣(x,y)∣≤∥x∥∥y∥, with equality exactly when one of x,y is a scalar multiple of the other, that is, when y=0 or x=cy for some c∈F.
Triangle inequality.∥x+y∥≤∥x∥+∥y∥, with equality exactly when y=0, or else x=cy for some real c≥0. Consequently ∥⋅∥ is a norm on V.
Pythagoras. If x⊥y then ∥x+y∥2=∥x∥2+∥y∥2. More generally, if x1,…,xN∈V are pairwise orthogonal, with N∈N, then ∑n=1Nxn2=∑n=1N∥xn∥2.
Parallelogram law.∥x+y∥2+∥x−y∥2=2∥x∥2+2∥y∥2.
Polarization identity. The inner product is recovered from the norm: over C,
4(x,y)=(∥x+y∥2−∥x−y∥2)+i(∥x+iy∥2−∥x−iy∥2),
and over R, 4(x,y)=∥x+y∥2−∥x−y∥2. In particular two inner products with the same induced norm are equal.
Characterisation by the parallelogram law. A norm on a vector space W over F is induced by some inner product on W if and only if it satisfies the identity of part 5 for all x,y∈W.
Continuity. If xn→x and yn→y in the induced metric, then (xn,yn)→(x,y).
Idea of the proofOriginal
One expansion does most of the work: ∥x+y∥2 opened out by sesquilinearity is part 1, and parts 4, 5 and 6 are that same expansion with y replaced by −y, by iy, or by orthogonal pieces. Cauchy-Schwarz comes from applying it to x−ay and choosing the a that makes the result smallest — geometrically, subtracting from x its component along y, leaving a vector whose squared length is the slack in the inequality. The triangle inequality is then Cauchy-Schwarz together with Rez≤∣z∣, and the two equality cases are exactly the two places where those steps can be tight: the leftover component must vanish, and the inner product must be real and non-negative. Part 7 is the one genuine converse, and it is proved by taking the formula of part 6 as a definition and checking the axioms, where the parallelogram law is what makes the candidate additive.
ProofAdaptedAdapted from Kreyszig (1978), §3.1, p. 130, §3.2, Lemma 3.2-1, pp. 136–138, and Lemma 3.2-2, p. 138; Reed & Simon (1980), §II.1, p. 37, and Problem 4, p. 63
Throughout, sesquilinearity means the two displayed identities of the first definition block: additive and homogeneous in the first slot, additive and conjugate-homogeneous in the second. Note first that (x,0)=0 for every x, because (x,0)=(x,0+0)=(x,0)+(x,0).
Part 1. Expanding by additivity in each slot and then using (y,x)=(x,y),
since z+z=2Rez. Replacing y by −y, which changes (x,y) into −(x,y) and leaves ∥y∥ alone, gives the companion identity
∥x−y∥2=∥x∥2−2Re(x,y)+∥y∥2,
used repeatedly below.
Part 2, the inequality. If y=0 both sides are 0. So let y=0, whence (y,y)>0 by strict positivity. For any a∈F, expanding as in part 1,
0≤∥x−ay∥2=(x,x)−a(x,y)−a(y,x)+∣a∣2(y,y),
where the first inequality is (u,u)≥0. Take a=(x,y)/(y,y), legitimate because (y,y)=0 and real. Then a(x,y)=a(y,x)=∣(x,y)∣2/(y,y) and ∣a∣2(y,y)=∣(x,y)∣2/(y,y), so three of the four terms collapse to one:
0≤∥x∥2−∥y∥2∣(x,y)∣2.
Multiplying by ∥y∥2>0 and taking non-negative square roots gives ∣(x,y)∣≤∥x∥∥y∥.
Part 2, the equality case. With y=0 and a as chosen, the display is an equality exactly when ∥x−ay∥2=0, which by strict definiteness means x=ay — so equality forces x to be a multiple of y. Conversely, if y=0 equality holds, and if x=cy then ∣(x,y)∣=∣c∣∥y∥2 while ∥x∥∥y∥=∣c∣∥y∥2 by homogeneity, so equality holds again. This is the condition as stated: y=0, or x=cy for some c∈F.
Part 3, the inequality and the norm axioms. By part 1, then Rez≤∣z∣, then part 2,
and taking square roots of non-negative numbers gives the triangle inequality. For the remaining norm axioms: ∥x∥=(x,x)1/2≥0, and it vanishes only for x=0 by strict definiteness — this is the one clause of part 3 that needs more than (x,x)≥0 — while
∥ax∥2=(ax,ax)=aa(x,x)=∣a∣2∥x∥2
by homogeneity in the first slot and conjugate-homogeneity in the second.
Part 3, the equality case. Equality in the triangle inequality forces equality at both steps above, that is Re(x,y)=∣(x,y)∣ and ∣(x,y)∣=∥x∥∥y∥. By part 2 the second gives y=0 or x=cy. Suppose y=0 and x=cy; then (x,y)=c∥y∥2, so the first condition says Rec=∣c∣, which holds exactly when c is real and ≥0. Conversely y=0, or x=cy with c real and ≥0, makes both steps equalities. So equality holds exactly when y=0 or x=cy with c≥0 real.
Part 4. If (x,y)=0 then Re(x,y)=0 and part 1 gives ∥x+y∥2=∥x∥2+∥y∥2. For a finite pairwise-orthogonal family, additivity in each slot expands the square of the norm into N2 terms,
n=1∑Nxn2=n=1∑Nk=1∑N(xn,xk),
and every term with n=k vanishes: (xn,xk)=0 by hypothesis when n<k, and (xk,xn)=(xn,xk)=0 as well. The diagonal leaves ∑n∥xn∥2. Finiteness is what allows the expansion; no convergence question arises.
Part 5. Add the two identities of part 1: the terms ±2Re(x,y) cancel, leaving ∥x+y∥2+∥x−y∥2=2∥x∥2+2∥y∥2.
Part 6. Subtracting the two identities of part 1 gives
∥x+y∥2−∥x−y∥2=4Re(x,y),
which over R is already the claim, since there (x,y) is real. Over C, apply the same identity with iy in place of y and use conjugate-homogeneity, (x,iy)=i(x,y)=−i(x,y):
∥x+iy∥2−∥x−iy∥2=4Re(−i(x,y))=4Im(x,y),
because −i(u+iv)=v−iu has real part v. Adding i times the second display to the first gives 4Re(x,y)+4iIm(x,y)=4(x,y). For the last clause, if two inner products induce the same norm then the right-hand sides agree, so the products agree.
Part 7, the easy direction. A norm induced by an inner product satisfies the identity of part 5, which was just proved from the axioms alone.
Part 7, the converse: the real case. This is the Jordan-von Neumann theorem, stated as Problem 4(b) of Reed and Simon (Reed & Simon (1980), p. 63); here is the construction. Let ∥⋅∥ be a norm on W satisfying the parallelogram identity, and define the real-valued
s(x,y)=41(∥x+y∥2−∥x−y∥2),
which is the expression part 6 would have to give. Then s(x,x)=41∥2x∥2=∥x∥2, so s is positive and vanishes only at 0; and s is symmetric, since ∥y−x∥=∥−(x−y)∥=∥x−y∥ by homogeneity. Also s(0,y)=0.
Additivity. The parallelogram identity in the form ∥u∥2+∥v∥2=21(∥u+v∥2+∥u−v∥2), applied once with u=x+z, v=y+z and once with u=x−z, v=y−z, gives
Putting y=0 in this and using s(0,z)=0 gives s(x,2z)=2s(x,z) for all x,z; substituting that back into the right-hand side turns it into 4s(x+y,z). Hence s(x+y,z)=s(x,z)+s(y,z).
Homogeneity. Additivity gives s(kx,y)=ks(x,y) for k∈N by induction, and s(−x,y)=−s(x,y) because s(x,y)+s(−x,y)=s(0,y)=0, so the identity holds for every k∈Z. For q=p/k with p∈Z, k∈N, applying it twice gives ks(qx,y)=s(px,y)=ps(x,y), so s(qx,y)=qs(x,y) for every rational q. Finally c↦s(cx,y) is continuous, because ∣∥u∥−∥v∥∣≤∥u−v∥ (a consequence of the triangle inequality) makes c↦∥cx±y∥ continuous; two continuous functions of c that agree on the dense set Q agree everywhere, so s(cx,y)=cs(x,y) for all real c. Over R, then, s is a symmetric positive-definite bilinear form with s(x,x)=∥x∥2: an inner product inducing the given norm.
Part 7, the converse: the complex case. Let W be over C. Viewing it as a real vector space, the previous paragraphs give a real-bilinear symmetric s with s(x,x)=∥x∥2. Homogeneity of the norm gives ∥iu∥=∥u∥, hence s(ix,iy)=s(x,y) for all x,y. Define
(x,y):=s(x,y)+is(x,iy).
Four checks finish the proof.
s(x,ix)=41(∣1+i∣2−∣1−i∣2)∥x∥2=0, so (x,x)=∥x∥2, which is ≥0 and vanishes only at x=0.
(x,y) is additive in the first slot and (cx,y)=c(x,y) for real c, both inherited from s.
The sequence ∥xn∥ is bounded, since ∥xn∥≤∥x∥+∥xn−x∥ and the last term tends to 0; and ∥yn−y∥→0, ∥xn−x∥→0 by hypothesis. So the right-hand side tends to 0. □
Note(What it means)Original
An inner product is the least extra structure that lets you speak of length, angle and perpendicularity, so Euclidean geometry carries over to matrices, functions and sequences. Cauchy-Schwarz is the one inequality that makes this work: it bounds cosθ by 1, yields the triangle inequality, and makes the inner product continuous. The equality cases say when such an estimate is sharp.
Which slot is linear. This handbook follows Kreyszig (Kreyszig (1978), §3.1, p. 130): linear in the first slot, conjugate-linear in the second. Much of the physics literature is the reverse — Hassani (Hassani (2013), §2.2, p. 31), Riley, Hobson and Bence (Riley, Hobson & Bence (2006), §8.1.2, p. 244) and Reed and Simon (Reed & Simon (1980), §II.1, p. 37), who flag the clash explicitly. The two conventions give complex-conjugate values, so (x,y) here is ⟨y∣x⟩ in Dirac notation and part 6 appears conjugated in Reed and Simon's Problem 4(a). Over R they agree.
Equality in Cauchy-Schwarz.Kreyszig (Kreyszig (1978), §3.2, Lemma 3.2-1(a), p. 137) phrases this case as "{x,y} is a linearly dependent set"; part 2 puts it on the pair, because under the definition in Vector spaces and bases the singleton {x} with x=0 is independent, so the set form would wrongly exclude x=y=0. The pair condition is still symmetric in x and y (if y=cx with c=0 then x=c−1y), and still covers y=0, where both sides vanish. Part 3's condition is one-sided in appearance only: it too is symmetric, as Kreyszig (Kreyszig (1978), §3.2, footnote 2, p. 137) points out, since x=0 is the case c=0, and x=cy with c>0 gives y=c−1x with c−1>0. It has to be, because ∥x+y∥=∥x∥+∥y∥ is itself symmetric in x and y. Hassani (Hassani (2013), Thm 2.2.7, p. 35) states only the "holds when" direction, though his proof on the same page gives both; the "if and only if" as stated here is Kreyszig's.
How much positivity each part needs.(x,x)≥0 is what makes ∥x∥=(x,x)1/2 real, and it is all that parts 1, 4, 5 and 6 need — they are algebraic identities in a hermitian sesquilinear form — and all that the two inequalities of parts 2 and 3 need. The proof below does not quite show the last point, since it divides by (y,y), but one extra line closes the gap. Suppose the form is only semi-definite and y=0 has (y,y)=0; we may assume (x,y)=0, or there is nothing to prove. In the display of the proof of part 2 the term ∣a∣2(y,y) now vanishes, so taking a=t(x,y)/∣(x,y)∣ with t>0 real, for which a(x,y)=t∣(x,y)∣ is real, leaves 0≤∥x∥2−2t∣(x,y)∣ for every t>0 — impossible unless ∣(x,y)∣=0. Hence ∣(x,y)∣=0=∥x∥∥y∥, Schwarz holds (with equality), and part 3's inequality follows from it and part 1 exactly as written. Strict definiteness is needed in exactly three places: the clause "∥⋅∥ is a norm" in part 3, and the two equality characterisations in parts 2 and 3. The proof of part 2 also calls on it for convenience, at "whence (y,y)>0 by strict positivity", to divide by (y,y); that is the step the preceding sentences replace. Riley, Hobson and Bence (Riley, Hobson & Bence (2006), §8.1.3, p. 246) introduce Schwarz and the triangle inequality for "a linear vector space in which ⟨a∣a⟩≥0 for all a", but this is not a statement under semi-definiteness alone: on p. 244, cited in the first bullet above, they attach to that very condition the assertion that ⟨a∣a⟩=0 implies a=0, so strict definiteness is in force by the time they reach the inequalities. Take the semi-definite form (x,y)=x1y1 on F2: there ∥(0,1)∥=0, and x=(1,0), y=(1,5) give ∣(x,y)∣=1=∥x∥∥y∥ with neither vector a multiple of the other. Parts 7 and 8 presuppose a norm and the induced metric, so they need it too.
What actually breaks Cauchy-Schwarz is indefiniteness. If (x,x) is allowed to be negative, the inequality itself fails: for (x,y)=x1y1−x2y2 on R2, the vectors x=(1,21) and y=(1,−21) give (x,y)=45 against ((x,x)(y,y))1/2=43. These are Hassani (Hassani (2013), §2.2, p. 31)'s pseudo-Euclidean products; as his footnote 8 there notes, in the space-time of relativity a nonzero vector can have (x,x)=0. In such a space ∥⋅∥ is not a norm, and cosθ is undefined.
Not every norm comes from an inner product. Part 7 is the test: on F2 the norm ∣x1∣+∣x2∣ fails part 5 at x=(1,0), y=(0,1), where the left side is 22+22=8 and the right side 2+2=4.
Completeness is a separate hypothesis. Nothing above needs it: the polynomials with a weighted inner product form an incomplete inner product space. It enters only where limits must exist, as in the projection theorem; in Orthogonal projection and least squares finite dimension plays that role instead.
Example(Two polynomials under the weight e−t)Original
Let V be the real polynomials with the weighted inner product of the third definition block,
(f,g)=∫0∞e−tf(t)g(t)dt,
whose moments are ∫0∞e−ttkdt=k! for k=0,1,2,… (repeated integration by parts). Take
f(t)=t,g(t)=1+t.
Step 1: the three numbers. Expanding the integrands into powers of t and reading off factorials,
Step 2: Cauchy-Schwarz and the angle. Part 2 predicts 3=∣(f,g)∣≤2⋅5=10=3.162277…, and the inequality is strict, as the equality case requires: g is not a multiple of f, since g(0)=1 while f(0)=0. The angle between them is therefore well defined,
cosθ=103=0.9486832…,θ=arctan31=18.4349∘,
the second form because sinθ=1−9/10=1/10. Equality is attained for a multiple: with g~=4f, ∣(f,g~)∣=8=2⋅42.
Step 3: the triangle inequality. Here f+g=1+2t and f−g=−1, so
Thus ∥f+g∥=13=3.605551… against ∥f∥+∥g∥=2+5=3.650282…: strict, again as part 3 requires, since f is not a non-negative multiple of g.
Step 4: the two identities. The parallelogram law of part 5 reads 13+1=2⋅2+2⋅5, that is 14=14. The real polarization identity of part 6 recovers the product from the four norms already computed:
(f,g)=41(∥f+g∥2−∥f−g∥2)=41(13−1)=3,
matching step 1.
Step 5: Pythagoras, and the exact slack in Cauchy-Schwarz. Subtract from g its component along f:
h=g−∥f∥2(g,f)f=(1+t)−23t=1−2t.
Then (h,f)=∫0∞e−t(t−21t2)=1−1=0, so g=23f+h is an orthogonal decomposition and part 4 applies:
∥g∥2=49∥f∥2+∥h∥2=49⋅2+∥h∥2,
and indeed ∥h∥2=∫0∞e−t(1−t+41t2)=1−1+21=21, which gives 29+21=5, the value of ∥g∥2 from step 1. This ∥h∥2 is exactly the slack in the proof of part 2: there the key display was ∥x−ay∥2=∥x∥2−∣(x,y)∣2/∥y∥2, and here
∥h∥2=∥g∥2−∥f∥2(f,g)2=5−29=21.
Multiplying by ∥f∥2=2 turns this into ∥f∥2∥g∥2−(f,g)2=10−9=1: the inequality of part 2 misses equality by precisely the squared length of the orthogonal remainder.
ApplicationOriginal
The correlation coefficient cannot exceed one, and that is Cauchy-Schwarz. For two data series x,y∈RN with their means subtracted, the sample correlation is
so ∣r∣≤1 by part 2 — with r being exactly cosθ for the angle of the second definition block. The equality case is informative rather than a curiosity: ∣r∣=1 says y=cx, that is that the two series are related exactly linearly, which in practice flags a duplicated or rescaled variable rather than a discovery. The same statement for random variables, ∣Cov(X,Y)∣≤σXσY, is part 2 for the form (X,Y)=E[(X−EX)(Y−EY)], which is only positive semi-definite — its null vectors are the almost-surely constant variables — so the inequality holds while the equality characterisation needs the degenerate cases handled separately, exactly as the remark above describes.
Quantum mechanics needs both the inequality and its equality case. States are unit vectors in a complex inner product space, and the Born rule assigns the number ∣(ψ,φ)∣2 to a measurement outcome; part 2 is what keeps that number in [0,1], so probabilities are probabilities. The Robertson uncertainty relation goes further. Writing a=(A−⟨A⟩)ψ and b=(B−⟨B⟩)ψ for two observables, the variances are ∥a∥2 and ∥b∥2, and part 2 gives
σAσB=∥a∥∥b∥≥∣(a,b)∣≥∣Im(a,b)∣=21⟨[A,B]⟩,
which for position and momentum is σxσp≥ℏ/2. The states that achieve the bound are then read off from the equality cases: part 2 forces b=ca for a scalar c, and the second inequality forces c to be purely imaginary. For x and p that proportionality is a first-order differential equation whose solutions are the Gaussian wave packets — so the minimum-uncertainty states are identified by the equality clause, not by the inequality.
Why the parallelogram law matters in analysis. Part 7 is a sharp test that separates the inner-product norms from all others, and that separation has consequences: the L2 norm satisfies it and the Lp norms for p=2 do not. Every argument that projects a function onto a subspace and keeps the orthogonal remainder — least squares, Fourier coefficients as best approximations, the energy method for elliptic problems — runs on the geometry of this unit and is therefore available in L2 and not in L1 or L∞ (Hilbert spaces, Mean-square convergence and Parseval's identity). That is the practical reason the mean-square norm is the one physicists almost always choose.
The Gram-Schmidt recipe that turns a linearly independent list into an orthonormal one spanning the same nested subspaces, the expansion of a vector in an orthonormal basis, and the QR factorization the recipe produces.
Definition(Orthonormal sets and bases)AdaptedAdapted from Kreyszig (1978), §3.4, Def. 3.4-1, eqs. (1)–(2), p. 152; Hassani (2013), §2.2, Def. 2.2.4, eq. (2.11), p. 32; Lee (2013), App. B, p. 636
Let V be an inner product space over F=R or C, with the convention of Inner products and norms: (⋅,⋅) is linear in its first slot.
A family (eα)α∈I in V is orthogonal if (eα,eβ)=0 for α=β, and orthonormal if moreover each eα has norm 1, that is
(eα,eβ)=δαβ={10α=β,α=β,
δαβ being the Kronecker delta. An orthonormal basis of V is an orthonormal family that is also a basis of V in the sense of Vector spaces and bases.
For a finite orthonormal family (e1,…,en) and x∈V, the scalars (x,ei) are the Fourier coefficients of x with respect to it, and ∑i=1n(x,ei)ei is its Fourier sum.
A matrix R∈Mm×n(F), of any shape, is upper triangular if Rik=0 whenever i>k; for m=n this is the usual condition that everything below the diagonal vanishes. A matrix Q∈Mm×n(F) has orthonormal columns if Q∗Q=In, where Q∗ is the conjugate transpose; for m=n such a Q is called unitary (F=C) or orthogonal (F=R).
Method(Gram-Schmidt)AdaptedAdapted from Lee (2013), App. B, Prop. B.40, eqs. (B.12)–(B.13), p. 636, and Exercise B.41, p. 636 (existence and the nested spans); Kreyszig (1978), §3.4, pp. 157–158 (existence and the nested spans); Hassani (2013), §2.2.2, eq. (2.13), pp. 33–35 (existence)
Let V be an inner product space over F and let (a1,…,an) be a linearly independent n-tuple in V, with n≥1.
There is an orthonormal n-tuple (q1,…,qn) in V with
span{q1,…,qk}=span{a1,…,ak}for every k=1,…,n.
Each qk is a linear combination of a1,…,ak alone, and the method below constructs it.
Such a tuple is unique up to replacing each qk by λkqk with ∣λk∣=1: any two tuples with the property in part 1 differ by such a rescaling, and conversely every such rescaling of one of them is again orthonormal with the same nested spans. Imposing in addition that (ak,qk) be real and positive for every k makes it unique, and the method below produces that one.
Consequently every inner product space V with 1≤dimFV=n<∞ has an orthonormal basis, and any orthonormal basis of a subspace W⊆V extends to one of V.
Note(What is ours in that statement)Original
Part 1, and the first clause of part 3, are the content of the propositions cited on the block: Lee's Proposition B.40 and Exercise B.41, and the treatments in Kreyszig and Hassani, each of which gives the construction with its nested spans and, in finite dimensions, the existence of an orthonormal basis. Two things in the statement are not in any of them. The first is part 2: the uniqueness up to unit scalars and the normalisation (ak,qk)>0 that pins the output down. The second is the extension clause of part 3, that an orthonormal basis of a subspace extends to one of V; it is obtained here by feeding an extended basis to the method and checking that the method reproduces an orthonormal initial segment unchanged. Both, and their proofs below, are the handbook's own. Part 2 is what the uniqueness half of the QR factorization statement rests on, and the extension clause is used in part 3 of that statement and twice in the proof of the spectral theorem for Hermitian matrices.
Idea of the proofOriginal
The recipe does all the work; the proof has only to check three things at each stage, in this order: the new remainder is not zero, it is perpendicular to everything built so far, and it has not escaped the span of the inputs read so far. A zero remainder would exhibit ak inside the span of its predecessors, which linear independence forbids. Perpendicularity is one line of algebra, and it is short precisely because what gets subtracted is a combination of vectors that are already orthonormal. The spans match because every stage only adds and subtracts multiples of vectors already available. Uniqueness runs the same way: once the kth span is fixed, qk can only be the unit vector in it perpendicular to the (k−1)st span, and that leaves a scalar of modulus one free.
ProofAdaptedAdapted from Kreyszig (1978), §3.4, eqs. (13)–(14) and the nested-span property, pp. 157–158, with Lemma 3.4-2, p. 153; Lee (2013), App. B, Prop. B.40 and eq. (B.13), p. 636, and Exercise B.41, p. 636
Part 1: the method produces such a tuple. Write q~k, Rik, qk for the quantities the method below produces. We prove by induction on k that for every k=1,…,n:
(i) q~k=0, so Rkk>0 and qk is defined;
(ii) (q1,…,qk) is orthonormal;
(iii) qk∈span{a1,…,ak};
(iv) span{q1,…,qk}=span{a1,…,ak}.
Start. A list one of whose entries is the zero vector is linearly dependent, so the hypothesis that (a1,…,an) is linearly independent gives a1=0 and therefore R11=∥a1∥>0. Then q1=a1/R11 has norm 1, lies in span{a1}, and spans it, since a1=R11q1.
Step. Let 2≤k≤n and assume (i)–(iv) for all smaller indices.
Nothing vanishes. If q~k were 0, step 2b would read ak=∑i<kRikqi, placing ak in span{q1,…,qk−1}, which is span{a1,…,ak−1} by (iv) at k−1. An entry of the list lying in the span of its predecessors contradicts linear independence. This is the only use of that hypothesis in the inductive step; it is used once more, in the form a1=0, in the Start paragraph. Hence Rkk=∥q~k∥>0, and qk=q~k/Rkk has norm 1.
Orthogonality. Fix j<k. The inner product is linear in its first slot, so
where the middle equality is orthonormality of (q1,…,qk−1), which annihilates every term but i=j, and the last is the definition Rjk=(ak,qj) of step 2a. Dividing by the positive number Rkk gives (qk,qj)=0. Together with (ii) at k−1 and ∥qk∥=1, this is (ii) at k.
Spans. By step 2b, qk=Rkk−1(ak−∑i<kRikqi), and each qi with i<k lies in span{a1,…,ai} by (iii); hence qk∈span{a1,…,ak}, which is (iii) at k, and consequently span{q1,…,qk}⊆span{a1,…,ak}. Conversely ak=Rkkqk+∑i<kRikqi lies in span{q1,…,qk}, and ai∈span{q1,…,qk−1} for i<k by (iv) at k−1. This is (iv) at k.
Since each qk is a combination of a1,…,ak by (iii), part 1 is proved.
Part 2: uniqueness up to unit scalars. Let (q1′,…,qn′) be any orthonormal tuple with span{q1′,…,qk′}=span{a1,…,ak} for every k; we show by induction that qk′=λkqk with ∣λk∣=1.
At k=1, q1′ lies in span{a1}=span{q1}, so q1′=λ1q1, and ∣λ1∣=∥q1′∥=1.
Assume qi′=λiqi with ∣λi∣=1 for all i<k; then qi=λiqi′, because a scalar of modulus one has λi−1=λi. By (iv), qk′∈span{a1,…,ak}=span{q1,…,qk}, so qk′=∑i≤kciqi for some scalars; pairing with qj and using orthonormality of the unprimed tuple gives cj=(qk′,qj). For j<k, conjugate-linearity in the second slot and orthonormality of the primed tuple give
(qk′,qj)=(qk′,λjqj′)=λj(qk′,qj′)=0.
So qk′=ckqk with ∣ck∣=∥qk′∥=1, completing the induction.
Conversely, every such rescaling is admissible: if ∣λk∣=1 for each k then (λiqi,λjqj)=λiλjδij=δij, so (λ1q1,…,λnqn) is orthonormal, and span{λ1q1,…,λkqk}=span{q1,…,qk} for every k because each λk is a non-zero scalar. The tuples with the property of part 1 are therefore exactly the unit-scalar rescalings of any one of them.
It remains to see that the extra normalisation selects the method's tuple. By step 2b and orthonormality, (ak,qk)=(q~k+∑i<kRikqi,qk)=(q~k,qk)=Rkk>0, so the method's output does satisfy it. Any admissible tuple has (ak,qk′)=(ak,λkqk)=λkRkk, which is real and positive exactly when λk>0, that is when λk=1. So exactly one admissible tuple survives the extra condition, and it is the method's.
Part 3: orthonormal bases and extensions. Let 1≤dimFV=n<∞ and pick any basis (a1,…,an) of V, which exists by Vector spaces and bases. Part 1 converts it into an orthonormal (q1,…,qn) with span{q1,…,qn}=span{a1,…,an}=V; an orthonormal spanning family is a basis, being linearly independent (part 1 of the expansion statement below), so V has an orthonormal basis.
Now let W⊆V be a subspace with an orthonormal basis (e1,…,ek), where k=0 and the empty list are allowed if W={0}. Extend it to a basis (e1,…,ek,bk+1,…,bn) of V, again by Vector spaces and bases, and feed that list to the method. We claim qi=ei for i≤k, by induction on i: granted qj=ej for j<i, step 2a gives Rji=(ei,ej)=0 for j<i because the e's are orthonormal, so q~i=ei and Rii=∥ei∥=1, whence qi=ei. The method's output is therefore an orthonormal basis of V whose first k members are e1,…,ek. □
Method(Expansion in an orthonormal family)AdaptedAdapted from Kreyszig (1978), §3.4, eqs. (3)–(4) and Lemma 3.4-2, pp. 152–153, eqs. (6)–(11), pp. 155–156, and Thm 3.4-6, p. 157; Reed & Simon (1980), §II.1, Thm II.1 and its corollary, pp. 37–38; Stakgold & Holst (2011), §4.6, eqs. (4.6.2) and (4.6.5), pp. 277–278
Let V be an inner product space over F.
Every orthonormal family in V is linearly independent. Hence an orthonormal family in a space of dimension n has at most n members, and an orthonormal family of exactly n members there is an orthonormal basis.
Pythagoras and Bessel. Let (e1,…,eN) be orthonormal and x∈V. Put y=∑i=1N(x,ei)ei. Then x−y⊥ei for every i, hence x−y⊥y, and
So in an orthonormal basis the components of a vector are obtained by taking n inner products, with no linear system to solve, and the inner product takes the standard form of Fn. Neither holds in a basis that is not orthonormal.
Idea of the proofOriginal
One computation carries all three parts: subtract the Fourier sum and what is left over is perpendicular to every member of the family. Linear independence follows because pairing a vanishing combination with one member of the family reads off that member's coefficient. Pythagoras applied to the splitting of x into the part the family captures and the part it misses gives the norm identity, and Bessel's inequality is nothing but the remark that the missed part has non-negative length. Part 3 is the case in which nothing can be missed.
ProofAdaptedAdapted from Kreyszig (1978), §3.4, Lemma 3.4-2, p. 153, and eqs. (8)–(12), pp. 155–157; Stakgold & Holst (2011), §4.6, eqs. (4.6.2) and (4.6.4)–(4.6.5), pp. 277–278; Reed & Simon (1980), §II.1, Thm II.1 and its corollary, pp. 37–38
Part 1. Let (eα)α∈I be orthonormal and let ∑i=1Ncieαi=0 with α1,…,αN distinct. Pairing with eαj and using linearity in the first slot,
0=(i=1∑Ncieαi,eαj)=i=1∑Nciδαiαj=cj,
so every coefficient vanishes: the family is linearly independent. In a space of dimension n a linearly independent family has at most n members, and n linearly independent vectors there form a basis (Vector spaces and bases), so an orthonormal family of exactly n members is an orthonormal basis.
Part 2. Put y=∑i=1N(x,ei)ei. For each j≤N, by linearity in the first slot and orthonormality,
which is the claim x−y⊥ej. Because y is a combination of the ej and the inner product is conjugate-linear in its second slot,
(x−y,y)=j=1∑N(x,ej)(x−y,ej)=0,
so x−y⊥y as well. Expanding ∥x∥2=(y+(x−y),y+(x−y)) and discarding the two cross terms, which vanish by the previous line, gives ∥x∥2=∥y∥2+∥x−y∥2. The first term is
by orthonormality again. This is the displayed identity, and the inequality follows from ∥x−y∥2≥0.
For the equality case: equality forces ∥x−y∥=0, hence x=y∈span{e1,…,eN}. Conversely, if x∈span{e1,…,eN}, write x=∑iciei; pairing with ej gives cj=(x,ej), so x=y and the remainder is 0.
Part 3. Let (e1,…,en) be an orthonormal basis of V. Every x∈V lies in span{e1,…,en}, so the equality case of part 2 gives both x=∑i(x,ei)ei and ∥x∥2=∑i∣(x,ei)∣2. For the third identity, substitute the expansion of y and use conjugate-linearity in the second slot:
Let A∈Mm×n(F) with m≥n, and give Fm its standard inner product.
If rankA=n, there are unique matrices Q∈Mm×n(F) with Q∗Q=In and R∈Mn×n(F) upper triangular with all diagonal entries real and positive, such that A=QR. Running the method below on the columns a1,…,an of A produces them: the kth column of Q is qk, and Rik=(ak,qi) for i<k while Rkk=∥ak−∑i<k(ak,qi)qi∥.
Then span{q1,…,qk} is the span of the first k columns of A for each k; in particular the columns of Q are an orthonormal basis of imA.
Without the rank hypothesis a factorization A=QR with Q∈Mm×m(F) satisfying Q∗Q=Im — unitary, or orthogonal when F=R — and R∈Mm×n(F) upper triangular still exists. This wider form is never unique, whatever the rank of A: the diagonal of R is not required to be real and positive here, so (Q,R) may always be replaced by (QD,D∗R) with D diagonal and unimodular, and for m>n the last m−n columns of Q do not enter the product at all. It is the rank hypothesis together with the shape of Q and the positive diagonal of R that pin down the factorization of part 1.
Idea of the proofOriginal
Part 1 is the Gram-Schmidt statement rewritten as one matrix equation. The relation ak=∑i≤kRikqi that the recipe leaves behind is, read column by column, exactly A=QR; orthonormality of the outputs is Q∗Q=In; and the fact that only indices i≤k occur is upper triangularity. Uniqueness is the uniqueness clause of that statement, once one checks that any such factorization forces the columns of Q to have the nested spans and the positive inner products it asks for. Part 3 has no independence to lean on, so instead of building Q one column at a time we clear one column of A at a time: a single unitary matrix sends the first column to a multiple of the first standard basis vector and leaves a smaller problem of the same shape.
ProofOriginal
Part 1. If rankA=n then the n columns a1,…,an of A are linearly independent (Linear systems and rank), so the method applies to them. It returns an orthonormal (q1,…,qn) in Fm and scalars Rik with Rik=0 for i>k, with Rkk>0 real, and with ak=∑i=1kRikqi for every k (step 3). Let Q be the matrix whose columns are q1,…,qn and let R=(Rik). Then
(Q∗Q)ij=l=1∑mQliQlj=(qj,qi)=δij,
so Q∗Q=In, and the kth column of QR is ∑iRikqi=ak, so A=QR. This proves existence, with the formulas as stated.
For uniqueness, let A=QR be any factorization with Q∗Q=In and R upper triangular with real positive diagonal, and let q1,…,qn be the columns of Q, which are orthonormal because Q∗Q=In. Reading column k of A=QR gives ak=∑i≤kRikqi, so span{a1,…,ak}⊆span{q1,…,qk}. Both spans have dimension k — the ai because rankA=n, the qi because an orthonormal family is linearly independent by part 1 of the expansion statement — so the inclusion is an equality. Pairing the same relation with qk and using orthonormality gives (ak,qk)=Rkk>0. So (q1,…,qn) is an orthonormal tuple with the nested spans of the Gram-Schmidt statement and with (ak,qk) real and positive, and part 2 of that statement identifies it as the tuple the method produces. The entries of R are then forced as well: pairing ak=∑i≤kRikqi with qi gives Rik=(ak,qi) for i≤k, and in particular Rkk=(ak,qk)=∥ak−∑i<k(ak,qi)qi∥.
Part 2. The nested spans of the Gram-Schmidt statement say span{q1,…,qk}=span{a1,…,ak}, which is the span of the first k columns of A. At k=n that span is the column space imA, and q1,…,qn is an orthonormal family spanning it, hence an orthonormal basis of it.
Part 3. Throughout, "unitary" is short for Q∗Q=Im with Q square, which for F=R is the orthogonality of the definition block. First a construction used at every stage: given v∈Fm there is a unitary Q1∈Mm×m(F) with Q1∗v=∥v∥e1. For v=0 take Q1=Im. For v=0 set w1=v/∥v∥ and extend (w1) to an orthonormal basis (w1,…,wm) of Fm by part 3 of the Gram-Schmidt statement; let Q1 have columns w1,…,wm, so Q1∗Q1=Im. Its entries are (Q1∗v)i=(v,wi), which equals ∥v∥ for i=1 and 0 for i≥2 because v is a multiple of w1.
Now induct on the number of columns n, with m≥n throughout. For n=1 take Q=Q1 built from v=a1 and R=∥a1∥e1∈Mm×1(F), which is upper triangular; then QR=Q1Q1∗a1=a1=A, since Q1Q1∗=Im for a square matrix with Q1∗Q1=Im.
Let n≥2 and assume the claim for matrices with n−1 columns. Build Q1 from v=a1, the first column of A. The first column of Q1∗A is then ∥a1∥e1, so
Q1∗A=(r0cA′),r=∥a1∥,
where c is a row of length n−1 and A′∈M(m−1)×(n−1)(F) with m−1≥n−1. By the induction hypothesis A′=Q′R′ with Q′ unitary of size m−1 and R′∈M(m−1)×(n−1)(F) upper triangular. Put
Q=Q1(100Q′),R=(r0cR′).
Then Q is unitary, being a product of two unitary matrices; R is upper triangular, because the entry of R in row i+1 and column k+1 is Rik′, which vanishes for i>k; and
QR=Q1(r0cQ′R′)=Q1Q1∗A=A.
Uniqueness fails here for every A, not only for the rank-deficient ones, because nothing now constrains the diagonal of R. Let A=QR be a factorization of this form and let D=diag(d1,…,dm) with ∣di∣=1 for each i. Then (QD)∗(QD)=D∗Q∗QD=D∗D=Im; the matrix D∗R is again upper triangular, since (D∗R)ik=diRik vanishes wherever Rik does; and (QD)(D∗R)=QDD∗R=QR=A. A square Q with Q∗Q=Im is invertible, so QD=Q forces D=Im: every other choice of D gives a genuinely different pair. When m>n there is a second freedom. Rows n+1,…,m of an upper triangular R∈Mm×n(F) vanish, because i>n≥k implies i>k; so only the first n columns of Q contribute to QR, and the remaining m−n may be replaced by those of any other orthonormal completion.
Two small rank-deficient instances, for concreteness: for m=n=1 and A=(0), both Q=(1) and Q=(−1) serve with R=(0); and for A=(1000), both Q=I2 and Q=diag(1,−1) give A=QR with R=A. □
Input: a linearly independent tuple (a1,…,an) in an inner product space. Output: an orthonormal (q1,…,qn) with the nested spans of the statement above, and the coefficients Rik of the QR factorization.
Set q~1=a1, R11=∥q~1∥ and q1=q~1/R11. Here R11>0 because a1=0.
For k=2,3,…,n in turn:
a. compute the Fourier coefficients of ak along the vectors already produced, Rik=(ak,qi) for i=1,…,k−1;
b. subtract that part off: q~k=ak−∑i=1k−1Rikqi;
c. set Rkk=∥q~k∥ and qk=q~k/Rkk.
Set Rik=0 for i>k. Then ak=∑i=1kRikqi for each k, which is the factorization A=QR when the ak are the columns of a matrix A.
Step 2a projects onto the qi already computed rather than onto the original ai, which is what makes q~k orthogonal to all of q1,…,qk−1 in one subtraction: for j<k, (q~k,qj)=(ak,qj)−∑i<kRik(qi,qj)=(ak,qj)−Rjk=0 by orthonormality.
When it works, and how it fails.
Independence is exactly the hypothesis.Rkk=0 in step 2c if and only if ak∈span{a1,…,ak−1}, and then step 2c divides by zero. To orthonormalize a spanning list that is not independent, discard each ak for which q~k=0 and carry on; the surviving q's are an orthonormal basis of span{a1,…,an}, and there are dimFspan{a1,…,an} of them.
The output depends on the order of the inputs. Re-ordering (a1,…,an) generally produces a different orthonormal tuple, because the nested spans it must match are different. In particular q1 is always a multiple of a1.
Note(Numerical behaviour)Original
Everything above is exact arithmetic, which is all the three books cited on the method discuss. In floating point the recipe as written — classical Gram-Schmidt — loses orthogonality badly on ill-conditioned input: the departure of the computed Q∗Q from In grows like the square of the condition number of A. The modified form, in which step 2 is rewritten as v←ak followed by Rik←(v,qi), v←v−Rikqi for i=1,…,k−1 in sequence, is algebraically the same recipe but loses orthogonality only in proportion to the first power of the condition number, because each coefficient is taken against a vector from which the earlier components have already been removed. Where orthogonality must be guaranteed, QR is computed instead by Householder reflections, which build Q as a product of exactly unitary factors; see Numerical linear systems and Matrix norms and conditioning.
Note(What it means)Original
An orthonormal basis is the one kind of basis in which coordinates are free: each component is a single inner product, and lengths and inner products are computed as if the space were Fn. Gram-Schmidt says such a basis always exists and shows how to build one, processing the given vectors one at a time and never looking ahead, so that the first k outputs already span what the first k inputs spanned. Written in matrix form the same computation is the QR factorization, which is the workhorse behind least squares and behind orthogonal polynomial families.
Which slot the coefficient sits in. With the handbook's convention (linear in the first slot) the coefficient is Rik=(ak,qi), the new vector first. Arfken and Hassani, who are conjugate-linear in the first slot, write the same number as ⟨qi∣ak⟩ with the already-orthonormalised vector first. Using the wrong order introduces a complex conjugate and breaks the orthogonality in step 2 as soon as the scalars are not real.
Finite dimension in part 3 of the Gram-Schmidt statement. Lee's Proposition B.40 is an induction on dimV, so it gives an orthonormal basis only in finite dimensions. The recipe itself runs on any finite or countable independent list in any inner product space, as Hassani notes; what fails in infinite dimensions is the conclusion that the result spans, and recovering it needs completeness and a limit — see orthonormal bases.
Bessel is an equality plus a remainder. Part 2 of the expansion statement is stated as the identity ∥x∥2=∑i∣(x,ei)∣2+∥x−y∥2, from which the inequality follows; the identity is the more useful form, because it names the defect. Riley, Hobson and Bence (Riley, Hobson & Bence (2006), §8.1.3(iii), pp. 246–247) state it as an inequality that becomes an equality when all basis vectors are included.
Real versus complex. Lee states Proposition B.40 for a real inner product and then asks in Exercise B.41 for the hermitian case; both are covered above, with the conjugations placed by our convention. The uniqueness in part 2 is weaker over C than over R: there the free factors λk run over the whole unit circle, not just {±1}.
Example(QR of a four-point sampling matrix)Original
Work in R4 with the standard inner product (x,y)=∑i=14xiyi, and take the sample points t=1,2,3,4. Let
A=1111123414916,
whose columns a1,a2,a3 are the values of 1, t and t2 at those four points. They are linearly independent (a non-zero polynomial of degree ≤2 has at most two roots), so the method applies.
Checks. The three columns of Q have squared norms 4⋅41=1, 209+1+1+9=1 and 4⋅41=1; the three pairings are 45−3−1+1+3=0, 41−1−1+1=0 and 45−3+1−1+3=0. So QTQ=I3. The third column of QR is
and the other two columns check the same way. Finally ATA=RTR predicts
det(ATA)=(detR)2=(2⋅5⋅2)2=80,
which matches the direct computation from
ATA=41030103010030100354.
What the columns are. Column k of Q lists the values at t=1,2,3,4 of
21,252t−5,2t2−5t+5,
so running the recipe on the sampled monomials has produced a family of polynomials, of degrees 0,1,2 with positive leading coefficients, that are orthonormal for the sum over those four nodes. That is the discrete analogue of an orthogonal polynomial family, and the reason Gram-Schmidt and polynomial fitting keep meeting.
ApplicationOriginal
Fitting by polynomials, stably. The matrix of the example is what a least-squares fit of a quadratic to four measurements produces, and its Q and R are what the recommended algorithm for that fit uses: solving Rx=Q∗b instead of forming the normal equations avoids squaring the condition number. The connection is made precise in Orthogonal projection and least squares. In practice, fitting with the orthogonalised columns rather than with raw powers 1,t,t2,… is what keeps a high-degree fit from collapsing numerically, and it also means that adding one more term to the fit does not change the coefficients already computed, since the new basis vector is orthogonal to the old ones.
Orthogonal polynomial families. Run the recipe on the monomials 1,x,x2,… in an inner product (f,g)=∫−11f(x)g(x)w(x)dx and it manufactures the classical orthogonal family belonging to the weight w. Unit weight gives the Legendre polynomials, with the normalisation qn=(2n+1)/2Pn; this is Arfken, Weber and Harris (Arfken, Weber & Harris (2013), §5.2, Example 5.2.1 and eq. (5.41), pp. 270–271). Here we take instead the Chebyshev weight w(x)=(1−x2)−1/2, where x=cosθ turns every integral into one over θ: ∫−11xnw(x)dx=∫0πcosnθdθ, so the moments for n=0,1,…,6 are
π,0,2π,0,83π,0,165π.
Four stages, each using only those numbers and the vanishing of an odd moment:
∥1∥2=π, so q0=1/π.
(x,q0)=0 by parity and ∥x∥2=π/2, so q1=2/πx.
(x2,q0)=π/2 and (x2,q1)=0 by parity; the remainder is x2−21, whose squared norm is 83π−2π+4π=8π, so q2=8/π(x2−21).
(x3,q0)=(x3,q2)=0 by parity and (x3,q1)=2/π⋅83π=832π; the remainder is x3−43x, whose squared norm is 165π−23⋅83π+169⋅2π=32π, so q3=32/π(x3−43x).
Multiplying out the last two,
q2=π2(2x2−1),q3=π2(4x3−3x),
so the outputs are 1/πT0 and 2/πTn for n=1,2,3, where Tn is the Chebyshev polynomial of the first kind. Other weights produce the Hermite, Laguerre and Jacobi families the same way; see orthogonal polynomials. Physically these are the eigenfunction families in which a separable problem is expanded, and the nested-span property of the construction is what makes a truncated expansion the best approximation of its degree.
Orthonormalising a basis set. In electronic-structure calculations the trial orbitals supplied by chemistry are not orthogonal, and the overlap matrix Sij=(ϕj,ϕi) clutters every formula. Gram-Schmidt replaces them by an orthonormal set spanning the same space, after which the Hamiltonian matrix elements can be read off directly. If A is the matrix whose columns are the coefficients of the orbitals in some orthonormal reference set, then S=A∗A, so A=QR gives S=R∗R with R upper triangular and positive on the diagonal: Gram-Schmidt on the orbitals is the Cholesky factorization of their overlap matrix. The same step appears whenever a numerical scheme must keep a set of computed vectors from drifting into near-dependence: orthogonalising the Krylov vectors v,Av,A2v,… is the Arnoldi and Lanczos iteration, and repeated QR factorization is the standard algorithm for the eigenvalues of a dense matrix.
Orthogonal projection onto a finite-dimensional subspace, its characterisation as the nearest point of that subspace, and the normal equations that this turns into for the least-squares problem of minimising the norm of Ax minus b.
Let V be an inner product space over F=R or C, with (⋅,⋅) linear in its first slot, and let M⊆V be a subspace. Recall M⊥={v∈V:(v,u)=0 for all u∈M}, itself a subspace.
Suppose every x∈V can be written as x=p+w with p∈M and w∈M⊥, and that this decomposition is unique. Then p is the orthogonal projection of x on M, and the map
P:V→V,Px=p
is the orthogonal projection onto M. An operator P on V is idempotent if P2=P, and self-adjoint if (Px,y)=(x,Py) for all x,y∈V.
Given A∈Mm×n(F) and b∈Fm, a least-squares solution of Ax=b is any x∈Fn minimising ∥Ax−b∥ over Fn; the vector b−Ax is the residual. The normal equations are A∗Ax=A∗b, with A∗ the conjugate transpose (AT when F=R).
Theorem(Projection onto a finite-dimensional subspace)AdaptedAdapted from Kreyszig (1978), §3.3, Thm 3.3-1, pp. 144–145, Lemma 3.3-2, p. 145, Thm 3.3-4, pp. 146–147, and §9.5, Thm 9.5-1, pp. 480–481; Stakgold & Holst (2011), §4.5, Projection Theorem, pp. 266–267, and §4.6, p. 278; Lee (2013), App. B, Exercise B.45, p. 637
Let V be an inner product space over F and let M⊆V be a subspace with dimFM=k<∞. Completeness of V is not assumed.
Decomposition.V=M⊕M⊥: every x∈V is x=p+w with p∈M and w∈M⊥ in exactly one way. Hence the orthogonal projection P onto M is defined on all of V.
Best approximation.p=Px is the unique nearest point of M to x:
∥x−p∥=u∈Mmin∥x−u∥,
and p is the only u∈M attaining the minimum. Equivalently, u∈M attains it if and only if x−u⊥M.
Pythagoras.∥x∥2=∥Px∥2+∥x−Px∥2, so ∥Px∥≤∥x∥, with equality exactly when x∈M.
Formula. If (e1,…,ek) is an orthonormal basis of M, then Px=∑i=1k(x,ei)ei: the projection is the Fourier sum of x for that basis, and the value does not depend on which orthonormal basis of M is used.
Algebraic characterisation.P is linear with imP=M and kerP=M⊥, and it is idempotent and self-adjoint; I−P is the orthogonal projection onto M⊥. Conversely, if dimFV<∞ and a linear operator P on V is idempotent and self-adjoint, then P is the orthogonal projection onto imP.
Idea of the proofOriginal
Finite dimension of M buys an orthonormal basis of it, and with that basis in hand the projection can simply be written down as the Fourier sum, instead of being obtained as the limit of a minimising sequence. Everything else follows from one computation: subtracting the Fourier sum leaves a remainder perpendicular to every basis vector of M, hence to all of M. The decomposition V=M⊕M⊥ is then immediate, uniqueness comes from M∩M⊥={0}, and the nearest-point property is Pythagoras applied to the right-angled triangle with vertices x, p and a competitor u∈M: the distance to u exceeds the distance to p by exactly ∥p−u∥ in the squares. The algebraic characterisation is then bookkeeping with the same two facts.
ProofAdaptedAdapted from Kreyszig (1978), §3.3, Lemma 3.3-2, p. 145, Thm 3.3-4, pp. 146–147, and §9.5, Thm 9.5-1, pp. 480–481; Stakgold & Holst (2011), §4.5, Projection Theorem, part (c), p. 267, and §4.6, eqs. (4.6.4)–(4.6.5), p. 278
Throughout, dimFM=k<∞. If k=0 then M={0}, M⊥=V, P=0, and every assertion is immediate; so assume k≥1 and fix an orthonormal basis (e1,…,ek) of M, which exists by part 3 of the Gram-Schmidt statement in Orthonormal bases and Gram-Schmidt applied to the inner product space M. Note first that
M∩M⊥={0},
because z in both satisfies (z,z)=0, hence z=0 by definiteness of the inner product.
Parts 1 and 4. Given x∈V, set p=∑i=1k(x,ei)ei∈M and w=x−p. By part 2 of the expansion statement in Orthonormal bases and Gram-Schmidt, w⊥ei for every i; since every u∈M is a combination u=∑iciei and the inner product is conjugate-linear in its second slot, (w,u)=∑ici(w,ei)=0. So w∈M⊥ and x=p+w is a decomposition of the required kind. If x=p+w=p′+w′ are two of them, then p−p′=w′−w lies in M∩M⊥={0}, so p=p′ and w=w′. Hence V=M⊕M⊥, the projection P is defined on all of V, and Px=p is the Fourier sum, which is part 4. The value does not depend on the orthonormal basis chosen, because Px is characterised basis-free as the unique element of M with x−Px∈M⊥.
Part 2. Let u∈M. Then x−u=(x−p)+(p−u) with x−p∈M⊥ and p−u∈M, so the two summands are orthogonal and
∥x−u∥2=∥x−p∥2+∥p−u∥2≥∥x−p∥2,
with equality precisely when ∥p−u∥=0, that is when u=p. So p attains the minimum and is the only element of M that does. For the last clause: if u∈M attains the minimum then u=p by what was just shown, and x−p∈M⊥; conversely, if u∈M and x−u∈M⊥ then x=u+(x−u) is a decomposition of the required kind, so u=p by the uniqueness in part 1.
Part 3. Apply the same orthogonal splitting to u=0: x=Px+(x−Px) with the two terms orthogonal, so ∥x∥2=∥Px∥2+∥x−Px∥2. Hence ∥Px∥≤∥x∥, with equality exactly when ∥x−Px∥=0, that is when x=Px∈M.
Part 5. Linearity of P is linearity of each coefficient map x↦(x,ei), which holds because the inner product is linear in its first slot. P maps into M, and for u∈M part 3 of the expansion statement applied inside M gives u=∑i(u,ei)ei=Pu; so imP=M and, since Pu=u there, P2=P. Next, Px=0 holds if and only if all the coefficients (x,ei) vanish, which happens if and only if x⊥M; so kerP=M⊥. Self-adjointness is a two-line computation:
and these agree because (ei,y)=(y,ei). That I−P is the orthogonal projection onto M⊥ follows from the decomposition x=(x−Px)+Px with x−Px∈M⊥ and Px∈M⊆(M⊥)⊥, together with M⊥∩(M⊥)⊥={0}, which gives uniqueness as before.
For the converse, let dimFV<∞ and let P be linear, idempotent and self-adjoint; put N=imP, a subspace. For x∈V write x=Px+(x−Px). The first term is in N. For the second, take any u=Pv∈N; then, using self-adjointness and P2=P,
(x−Px,Pv)=(P(x−Px),v)=(Px−P2x,v)=0,
so x−Px∈N⊥. Uniqueness of the decomposition again follows from N∩N⊥={0}. Hence P is the orthogonal projection onto N=imP. □
Theorem(Least squares and the normal equations)AdaptedAdapted from Kreyszig (1978), §3.3, Thm 3.3-1 and Lemma 3.3-2, pp. 144–145; Stakgold & Holst (2011), §4.6, eqs. (4.6.4)–(4.6.5), p. 278
Let A∈Mm×n(F) and b∈Fm, let r=rankA, and let P be the orthogonal projection of Fm onto imA.
A minimiser always exists, because imA is a subspace of dimension r<∞ and part 2 of the projection statement applies to M=imA.
Characterisation. For x∈Fn the following are equivalent: x minimises ∥Ax−b∥; Ax=Pb; the residual satisfies b−Ax∈(imA)⊥=kerA∗; and x solves the normal equations A∗Ax=A∗b.
Solution set. The normal equations are always consistent, and the set of least-squares solutions is a coset x0+kerA of dimension n−r. The minimal residual b−Pb is the same for all of them, and ∥b∥2=∥Pb∥2+∥b−Pb∥2.
Uniqueness.ker(A∗A)=kerA, so A∗A is invertible if and only if r=n (which requires m≥n). In that case the least-squares solution is unique and
x=(A∗A)−1A∗b.
Via QR. If r=n and A=QR is the factorization of Orthonormal bases and Gram-Schmidt, with Q∗Q=In and R upper triangular with positive diagonal, then A∗A=R∗R and the normal equations reduce to the triangular system
Rx=Q∗b,with∥Ax−b∥2=∥b∥2−∥Q∗b∥2.
Idea of the proofOriginal
The minimisation is over the vectors Ax, and those are exactly the vectors of imA, a subspace of dimension r<∞. So the previous statement already answers the geometric question: the closest attainable vector is Pb, and the equation to solve is Ax=Pb. Everything after that is a translation of "the residual is perpendicular to imA" into matrix language, and the translation is the single identity (Ay,v)=(y,A∗v), which turns (imA)⊥ into kerA∗ and the orthogonality condition into A∗Ax=A∗b. The two refinements then come for free: A∗A has the same kernel as A, which decides uniqueness; and if A=QR then A∗A=R∗R, so the normal equations are a triangular system in disguise.
ProofAdaptedAdapted from Kreyszig (1978), §3.3, Thm 3.3-1 and Lemma 3.3-2, pp. 144–145; Stakgold & Holst (2011), §4.6, Problem of Best Approximation, eqs. (4.6.4)–(4.6.5), p. 278
Throughout we use the standard inner products on Fn and Fm and the identity
(Ay,v)=(y,A∗v)(y∈Fn,v∈Fm),
which holds because (x,y)=y∗x makes both sides equal to v∗Ay.
Part 1.imA is a subspace of Fm of dimension r=rankA<∞ (Linear systems and rank), so part 2 of the projection statement applies with M=imA and provides a unique nearest point Pb∈imA to b. Since {Ax:x∈Fn}=imA, the quantity ∥Ax−b∥ ranges over exactly the same values as ∥u−b∥ for u∈M; the minimum is therefore attained, at any x with Ax=Pb, and at least one such x exists because Pb∈imA.
Part 2. The chain of equivalences:
x minimises ∥Ax−b∥ if and only if Ax is the nearest point of imA to b, by the previous paragraph, and that nearest point is unique, so this holds if and only if Ax=Pb.
Ax=Pb holds exactly when b−Ax∈(imA)⊥. Indeed Ax∈imA always, so the last clause of part 2 of the projection statement makes Ax the nearest point precisely when b−Ax⊥imA.
(imA)⊥=kerA∗: a vector v has (Ay,v)=0 for every y∈Fn precisely when (y,A∗v)=0 for every such y, and the only vector orthogonal to the whole of Fn is 0; so the condition reads A∗v=0.
Finally b−Ax∈kerA∗ means A∗b−A∗Ax=0, which is the normal equations.
Part 3. By part 1 there is an x0 with Ax0=Pb, and by part 2 it solves the normal equations, which are therefore consistent. Again by part 2, x is a least-squares solution if and only if Ax=Pb=Ax0, that is A(x−x0)=0; so the solution set is the coset x0+kerA, whose dimension is n−r by rank-nullity. For every such x the residual is b−Ax=b−Pb, the same vector. Finally ∥b∥2=∥Pb∥2+∥b−Pb∥2 is part 3 of the projection statement.
Part 4. If Ax=0 then A∗Ax=0. Conversely, if A∗Ax=0 then
∥Ax∥2=(Ax,Ax)=(x,A∗Ax)=(x,0)=0,
so Ax=0. Hence ker(A∗A)=kerA. The matrix A∗A is n×n, so it is invertible if and only if its kernel is {0}, that is if and only if kerA={0}, that is r=n — which forces n=r≤m. In that case the unique solution of the normal equations is x=(A∗A)−1A∗b, and it is the unique least-squares solution by part 2.
Part 5. Let r=n and A=QR as in the QR statement, so Q∗Q=In and R is upper triangular with real positive diagonal. Then
A∗A=R∗Q∗QR=R∗R,
and A∗b=R∗Q∗b, so the normal equations read R∗(Rx−Q∗b)=0. Now detR=R11⋯Rnn>0, so R and hence R∗ are invertible, and the normal equations are equivalent to Rx=Q∗b, a triangular system solved by back substitution.
For the residual, the columns of Q are an orthonormal basis of imA by part 2 of the QR statement, so part 4 of the projection statement gives Pb=∑i=1n(b,qi)qi=QQ∗b. Hence Ax=QRx=QQ∗b=Pb for the least-squares solution, and
∥Ax−b∥2=∥b−Pb∥2=∥b∥2−∥Pb∥2=∥b∥2−∥Q∗b∥2,
the middle equality by part 3 of the projection statement and the last because ∥Qz∥2=z∗Q∗Qz=∥z∥2 for every z∈Fn. □
Note(What it means)Original
Dropping a perpendicular is the whole content of both statements. The nearest point of a subspace to a given vector is found by removing the component that sticks out, and "sticking out" means orthogonal to the subspace; part 4 says that with an orthonormal basis in hand this costs k inner products. The least-squares problem is the same picture in Fm with the subspace taken to be the column space of A: an inconsistent system Ax=b is replaced by the consistent system Ax=Pb, and demanding that the residual be orthogonal to every column of A is literally the normal equations. Reach for this whenever there are more measurements than parameters.
Remark(Where the hypotheses are used, and conventions)AdaptedAdapted from Stakgold & Holst (2011), §4.5, Projection Theorem and Remarks on the Proof 1–3, pp. 266–268; Kreyszig (1978), §3.3, Thm 3.3-1, pp. 144–145
Finite dimension of M is doing real work. A subspace of finite dimension is automatically closed, which is what makes the minimum in part 2 attained. Stakgold and Holst prove the projection theorem for a closed linear manifold of a complete space, and their first remark shows what goes wrong otherwise: in L2(a,b) take M to be the set of all polynomials, which is a linear manifold but is not closed. For a u∈L2 that is not a polynomial the infimum infz∈M∥u−z∥ is 0 and is attained by no element of M. So without closedness there may be no nearest point at all, and parts 1–5 all fail.
Only the parallelogram law makes the nearest point exist and be unique. Kreyszig's Theorem 3.3-1 obtains it from the parallelogram equality, which is special to inner product norms. Stakgold and Holst's second remark gives the Banach-space counterexample: in C[0,1] with the supremum norm, let M be the continuous functions vanishing at 0; the function u≡1 has no closest element in M.
Convexity, not linearity, is what the minimisation needs. Kreyszig's Theorem 3.3-1 assumes only that M is convex and complete; linearity is used afterwards, in Lemma 3.3-2, to get the orthogonality x−p⊥M. For a merely convex set the nearest point still exists and is unique, but the residual satisfies only a variational inequality.
Normal equations are not the recommended computation. Forming A∗A squares the condition number of A, so part 4 as written loses about twice as many digits as part 5, where R inherits the conditioning of A. Use the QR route, or the singular value decomposition when r<n: there the least-squares solutions form a positive-dimensional coset by part 3, and the pseudoinverse picks out the one of smallest norm. See also Matrix norms and conditioning.
Adjoint, not transpose. As in Linear systems and rank, the normal equations over C use the conjugate transpose; ATAx=ATb is the wrong system unless A and b are real. The projection is self-adjoint, P=P∗=P2, not merely symmetric.
Example(A straight line through four points, three ways)Original
Four measurements y are taken at the times t=0,1,2,3:
(t,y)=(0,1),(1,3),(2,2),(3,6).
Fitting y=c1+c2t means solving Ax=b with
A=11110123,b=1326,x=(c1c2),
which has no solution: b is not in the plane imA⊂R4. Here m=4, n=2 and rankA=2, so part 4 applies and there is exactly one least-squares solution.
Route 1: the normal equations. With ATA=(46614) and ATb=(1225) (the entries are ∑yi=12 and ∑tiyi=0+3+4+18=25), and det(ATA)=56−36=20,
x=201(14−6−64)(1225)=201(1828)=(9/107/5).
So the fitted line is y=0.9+1.4t.
Route 2: orthonormal basis and the Fourier sum. Gram-Schmidt on the columns of A gives R11=2, q1=21(1,1,1,1), then R12=(a2,q1)=21(0+1+2+3)=3,
These are precisely the fitted values 0.9+1.4t at t=0,1,2,3, as part 2 of the least-squares statement predicts.
Route 3: QR. With R=(2035) and QTb=(6,7/5), back substitution in Rx=QTb gives 5c2=7/5, so c2=7/5, and then 2c1=6−3⋅57=59, so c1=9/10: the same answer, with no ATA formed.
Part 2 says it must be orthogonal to both columns of A: indeed 1+7−17+9=0 and 0+7−34+27=0. Part 5 predicts the same number without the residual vector,
∥b∥2−∥QTb∥2=(1+9+4+36)−(36+549)=50−5229=521,
and part 3 of the projection statement is the identity 50=∥Pb∥2+521, i.e. ∥Pb∥2=229/5, which agrees with (92+232+372+512)/100=4580/100.
The projection matrix. From P=QQT=A(ATA)−1AT,
P=2011482−486422468−42814,
which is symmetric, as part 5 of the projection statement requires; one multiplication confirms P2=P; its trace is 2014+6+6+14=2=dimimA; and P(1,1,1,1)=(1,1,1,1) because (1,1,1,1) is the first column of A and so already lies in M.
ApplicationOriginal
Fitting a model to more data than parameters. This is the everyday use: n parameters, m≫n measurements, a design matrix A whose columns are the model's basis functions sampled at the measurement points, and a residual that the fit makes orthogonal to every one of them. The orthogonality is not a numerical accident but the definition of the fit, and it is what makes the residual a legitimate estimate of noise: it has no component along any direction the model could have explained. The same equations compute a calibration curve, a reaction rate from an Arrhenius plot, and the gravitational field coefficients of the Earth from satellite tracking — the problem Gauss invented the method for, when he recovered the orbit of Ceres from a short arc of observations.
Receivers and estimators. A GPS receiver sees more satellites than the four unknowns (three coordinates and a clock offset) require, and solves the linearised problem in the least-squares sense at every update; the matrix (A∗A)−1, which part 4 produces anyway, is what the receiver reports as its position covariance, and its diagonal is the familiar dilution-of-precision figure. Recursive forms of the same computation, in which Pb is updated as each new measurement arrives rather than recomputed, are the Kalman filter and the recursive least-squares algorithms of signal processing.
Projection as the definition of an approximation scheme. Part 2 says that a projection is a best approximation, which is why so many numerical methods are projections in disguise. A Galerkin or finite-element method replaces a differential equation by the demand that the residual be orthogonal to a finite-dimensional trial space, so the computed solution is the orthogonal projection of the true one in the energy inner product, and part 3 bounds its norm by the true solution's. Truncating a Fourier series after N terms is the same statement in L2: the truncation is the nearest trigonometric polynomial of that degree, not merely a convenient one (Mean-square convergence and Parseval's identity). In quantum mechanics, the Rayleigh-Ritz method projects the Hamiltonian onto the span of a chosen set of trial states, and the variational bound it gives is the same inequality ∥Px∥≤∥x∥ seen from the other side.