Gram-Schmidt process Created 2026-09-24 Updated 2026-10-14
The Gram-Schmidt process turns a finite ordered family of linearly independent vectors in an inner product space over the real numbers into an orthonormal basis of their linear span. It keeps every successive linear span, so the first new vectors describe exactly the same directions as the first inputs. Its idea is geometric: remove the orthogonal projection onto directions already found, then divide the remaining vector by its norm. This makes a complicated basis easier to use without changing the vector subspace it describes.[ref]
Start with and . At step , use the previously obtained orthonormal set to defineThe sum is the orthogonal projection onto a finite-dimensional subspace , and is the orthogonal projection residual. Linear independence ensures : otherwise would already be a linear combination of earlier inputs. If the input family is linearly dependent, use only the retained orthonormal vectors in the sum and omit an input whenever its remainder is the zero vector; do not divide by zero. The retained outputs still form an orthonormal basis of the original linear span, but their number can be smaller than .
For a short verification, orthonormality makes every earlier inner product vanish:Also is minus a linear combination of earlier vectors, while is plus that same linear combination. These two inclusions, followed by division by a nonzero norm, giveThe argument also works in an inner product space over the complex numbers with the existing inner product convention, linear in the first argument: the coefficients remain . With the convention linear in the second argument, write instead.
For a first picture, take and in with the ordinary dot product. ThenSubtracting the diagonal component leaves an orthogonal direction; dividing by its norm makes its length one. If the second input were instead, its orthogonal projection would be the entire input and , revealing linear dependence.
Gram-Schmidt orthogonalization in : input vectors, subtraction of an orthogonal projection, and an orthonormal basis
. Details. For a full three-dimensional calculation, use the ordinary dot product and the input vectorsThe first two steps giveAt the third step, the inner products are and . ConsequentlyThe three numerator vectors have pairwise dot products and squared Euclidean norms . Thus the displayed outputs are indeed an orthonormal basis, and the three nonzero remainders also confirm linear independence of the inputs. Keeping the removed coefficients produces the QR decomposition below.
An immediate reward is a reusable orthogonal projection: once an orthonormal basis of a vector subspace is known, any vector hasFor the linear span of just the first two inputs in the three-dimensional example, gives . Its orthogonal projection residual is , visibly in the missing orthogonal direction. This is the geometry behind the linear least-squares problem.
The formulas above describe exact arithmetic. With floating-point arithmetic, subtracting an orthogonal projection nearly equal to the input can leave a small remainder; dividing by its small norm can magnify existing roundoff error. The Classical Gram-Schmidt and Modified Gram-Schmidt arrangements agree in exact arithmetic but can give different rounded results. Exact linear dependence and a small computed remainder therefore require different judgments in a numerical implementation.[ref]
https://nhigham.com/wp-content/uploads/2023/10/high95m.pdf. Higham, The Test Matrix Toolbox for Matlab, §8, p. 22
Hilbert space Created 2026-09-24 Updated 2026-10-14
A Hilbert space is a real or complex inner product space that is complete in the norm . Completeness means that every Cauchy sequence has a limit in the space: if its terms become arbitrarily close in this norm, they converge to an allowed vector. The inner product supplies lengths and orthogonality; completeness ensures that limiting approximation procedures do not leave the space.
Finite-dimensional Euclidean spaces are examples, but the same geometry also works for sequences and functions. In the l2 sequence space,In the L2 space on with Lebesgue measure,These formulas use the convention linear in the first argument. Elements of the L2 space are equivalence classes of square-integrable functions agreeing almost everywhere, so zero distance really identifies the same element. A vector can therefore be a whole function, and its squared length can measure an integrated squared error.
For example, approximating by is a nearest-point problem in this Hilbert space. The allowed approximations form the linear span of , and the orthogonal projection is the constant . Its residual is orthogonal to both allowed directions because its integral and its inner product with vanish. The geometry therefore identifies the best approximation without searching through every pair of coefficients.
This is useful whenever a complicated vector must be represented by a tractable collection of directions. Fourier series approximate functions with orthogonal oscillations; the Parseval identity relates the sum of squared coefficients to the squared norm. Least-squares solutions approximate attainable data using a linear operator. The Hilbert projection theorem explains why a nearest element exists and is unique for a nonempty closed convex set. Distinct application settings share the same geometry of useful components and orthogonal residuals. Casey Rodriguez's MIT lectures develop these connections between Hilbert spaces, Fourier series, and nearest-point problems.[ref]
https://ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/pages/lecture-notes-and-readings/. Rodriguez, MIT 18.102, lectures 14–17, 2021
A historical mathematical setting is David Hilbert's Grundzüge einer allgemeinen Theorie der linearen Integralgleichungen (1912). Its preface states that it reprints six communications published during 1904–1910 on linear integral equations. This provides a concrete source for the integral-equation setting associated with the name, while the abstract definition above incorporates later developments.[ref]
https://archive.org/details/grundzugeallg00hilbrich. Hilbert, Grundzüge einer allgemeinen Theorie der linearen Integralgleichungen, 1912, preface
Johnson–Lindenstrauss lemma Created 2026-09-28 Updated 2026-10-14
For and any points in a Hilbert space, there is a linear map into Euclidean dimension that multiplies every pairwise distance by a factor between and .
The striking feature is that the target dimension depends on the number of points and the allowed error, independently of the ambient dimension. Fix a finite set , with , and . An equivalent sufficient statement uses squared Euclidean distances: a linear map exists, with , such thatThe finite-set theorem cited here supplies an explicit sufficient target dimension for this squared-distance formulation. [ref]
An elementary proof of a theorem of Johnson and Lindenstrauss by Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of Johnson and Lindenstrauss, Theorem 2.1, p. 61: bounds for squared distances
Taking square roots gives distance factors and , which lie inside . Conversely, bounds on distances only give squared-distance bounds ; the same numerical tolerance should not be silently used for both. Under the squared-distance bounds, the bi-Lipschitz distortion is at most .
The Johnson–Lindenstrauss lemma preserves this fixed finite set, rather than every vector in the ambient Euclidean space. A linear map with has a nonzero kernel by the rank-nullity theorem, so some nonzero vectors collapse completely. For finitely many points in a real Hilbert space, apply the finite-dimensional argument on their linear span and extend by orthogonal projection onto that linear span. If the sufficient target dimension exceeds the ambient dimension, the identity map already preserves every Euclidean distance exactly, with zero padding if a larger target is requested.
Linear combination Created 2026-09-24 Updated 2026-10-14
Let be a vector space over a specified field , and let . A linear combination is a finite sumThe coefficients are scalars from that same field; each term uses scalar multiplication, and the terms are joined by vector addition. For coefficients in the real numbers, negative values reverse arrows and fractional values scale them by fractional amounts. The collection of attainable vectors is the linear span. The column picture in Strang's MIT notes interprets solving a linear system as choosing coefficients to reach a target vector.[ref]
https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/6913aa2f37dada8fdda334168b30339b_MIT18_06SCF11_Ses1.1sum.pdf. MIT 18.06SC, Strang lecture summary 1, pp. 2–3: the column picture
For a concrete calculation over the real numbers, takeThen . More generally, solving and givesEvery vector in the Euclidean plane is therefore a linear combination of , so their linear span is all of . The target has coefficients ; the target has coefficients , since . The displayed formula also makes the coefficients unique. Consequently is an ordered basis, with coordinate vector .
The payoff is a reusable language for synthesis: linear combinations build vectors from chosen ingredients, linear span decides which targets are reachable, and linear independence decides whether the coefficients are unique. The ingredients can also be polynomials or functions, as long as they belong to a vector space over the specified field.
Linear dependence Created 2026-09-24 Updated 2026-10-14
A finite family of vectors in a vector space over a specified field is linearly dependent if it has a nontrivial linear relation: with and at least one coefficient nonzero. One can then solve for a vector whose coefficient is nonzero as a linear combination of the others; removing that entry preserves the linear span. Repeated vectors in a list give linear dependence: for example has the linear relation . A list keeps both entries even though the set has only one element. Strang's notes illustrate redundant columns by expressing one as the sum of two others.[ref]
https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/0bbc30e3f1d7933ea07a2d2e9ab050d9_MIT18_06SCF11_Ses1.9sum.pdf. MIT 18.06SC, Strang lecture summary 9, pp. 2–3: dependent columns
Keep and , and add . The three vectors still have linear span , but nowThe two coefficient triples and differ by the nontrivial linear relation . In fact all linear combination representations of this target areTo check both completeness and correctness, use . Linear independence of forces and , giving exactly the displayed family. Redundancy therefore preserves attainable targets while allowing their coefficients to move. For solving a linear system, these alternatives matter; for assigning unique coordinate vectors, one instead chooses a basis.
The following example shows why linear independence depends on the scalar field.
Linear matroid 2026-10-14
A linear matroid has a finite ground set indexing a family of vectors in a vector space over a specified field. A subset of labels is a matroid independent set precisely when its vectors are linearly independent. Labels distinguish repeated vectors; the ground set is not required to consist of distinct numerical vectors. The matroid bases correspond to bases for the linear span of all the supplied vectors.
Exchange outline. The linear span of linearly independent vectors has dimension . If , not all the linearly independent vectors indexed by can lie in that linear span. A vector outside it can be added to . Heredity follows because a linear dependence in a subset would also be a linear dependence in the full selection.
Linear span Created 2026-09-24 Updated 2026-10-14
The linear span of a subset of a vector space is the set of all finite linear combinations of elements of . It is the smallest vector subspace containing : every vector subspace containing the original vectors must contain their sums and scalar multiples.
In , the linear span of is a line, the linear span of is the plane , and adding gives all of . Adding to the first set changes none of its attainable vectors, because it is already a scalar multiple of . Thus a spanning set can contain redundant generators; linear independence identifies when this redundancy is absent. In an infinite-dimensional space, an algebraic linear span still uses finite sums; a closed linear span can also include limits in a specified norm.
For , a codeword in a Hamming code is a subset of the nonzero vectors of whose sum is zero. Ordered weight-three supports of a vector are determined by two distinct nonzero vectors, giving choices. For weight four, the third vector must avoid the three nonzero vectors in the linear span of the first two, giving choices. For weight five, the first three must be linearly independent, and the fourth must avoid all seven nonzero vectors in their linear span, giving choices. The final vector is their sum. Dividing by , , and counts unordered supports of a vector and proves the displayed weight enumerator coefficients.
Orthogonal generators of doubly even codes 2026-10-14
Suppose the generators of a binary linear code have Hamming weights divisible by four and have pairwise zero binary inner products. Their linear span is doubly even: for any two vectors,The binary inner product says the intersection size is even. Induction on the number of generators in a sum proves divisibility by four.
// Target: algebra.bigb
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 10 3 Solution Created 2026-10-03 Updated 2026-10-14
For a rational matrix , write its columns as . It is partition regular if every finite colouring of admits positive integers , all of one colour, with . Repeated coordinates are allowed. The columns condition is an ordered partitioninto nonempty blocks such thatRado's theorem states that a rational matrix is partition regular if and only if it satisfies the columns condition. We prove both implications.
For necessity, clear denominators so the columns are integral. For every disjoint pair of index sets with andchoose a rational linear functional annihilating all columns in but not . Such a functional exists by extending a basis of the indicated linear span to include , prescribing zero on the former and one on the latter. Clearing its denominators produces an integer-coefficient functional with a nonzero integer. There are only finitely many pairs . Choose a prime number dividing none of these nonzero evaluations; if there are no bad pairs, choose any prime.
Use the last nonzero digit coloring for this prime. Namely, write with and colour by . By partition regularity, obtain a positive monochromatic solution. Let the distinct P-adic valuations of its coordinates beand put . All unit parts have a common nonzero residue modulo .
For a block , let . If its column sum were outside the earlier linear span, apply to the equation . Earlier-block contributions are exactly zero. Divide the remaining equation by and reduce modulo . Higher-valuation terms vanish, leavingThis contradicts the choice of and . Consequently every block sum lies in the earlier linear span. For that span is , so its sum is zero. This proves the columns condition by the finite separating-functional proof of the columns condition.
For sufficiency, suppose the blocks satisfy the columns condition. Choose rational coefficients , for , such thatTake a positive integer clearing all their denominators and an integer at least as large as every . An M-p-c set with generators consists of all valueswith every such value positive. The generators are therefore chosen with . Positivity is part of the configuration, not achieved by deleting inconvenient values.
Use the permitted monochromatic m-p-c set theorem to obtain one such monochromatic set. For each , putEvery is a positive element of that set, because its non-leading coefficients are integers of magnitude at most . In the sum , the coefficient of is , and the coefficient of each with isThus . This is an explicit Rado solution inside an m-p-c set and proves sufficiency.
For the Finite sums theorem, defineTo deduce its monochromaticity from Rado's theorem, introduce variables for all nonempty and equationsLet be their coefficient matrix, and partition its columns by . For a fixed , the vector with -coordinate when , and otherwise, solves this homogeneous system: in every row both sides count whether belongs to its indexing set. HenceThe first block sum is zero, and each later block sum lies in the linear span of earlier columns. This proves the columns partition for finite-sums systems. The positive monochromatic solution supplied by Rado's theorem has , and its other coordinates are exactly all the nonempty finite sums. Therefore is monochromatic. For a singleton is immediate. Equivalently, the full positive M-p-c set with directly contains every such sum, by taking its leading index to be the least index in .


