Compression of a linear operator Created 2026-09-24 Updated 2026-10-14
If is a subspace of a space with an inner product and is its orthogonal projection, the compression of an operator to isIf the columns of are an orthonormal basis of , its matrix in that basis is .
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
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 29J d Solution Created 2026-09-24 Updated 2026-09-29
Since and ,ThereforePut . By part (c), the are normalized sample principal components forming an orthonormal set, andThis is the orthogonal projection onto a finite-dimensional subspace spanned by the , so is the unique closest point in that subspace to .
Past exam of the mathematics course of the University of Cambridge 2023 ib Paper 4 6B b Solution Created 2026-09-24 Updated 2026-09-25
Part (a) shows that is orthogonal to . Sincethe Pythagorean theorem in an inner-product space immediately givesThis is the norm decomposition associated with orthogonal projection onto a finite-dimensional subspace.
Weighted inner product Created 2026-10-05 Updated 2026-10-14
For a positive weight , the weighted inner product of functions is . It is the usual inner product in the L2 space for the measure . A Sturm-Liouville eigenfunction expansion uses this weight to make its eigenfunctions orthogonal.
The weight specifies how different locations contribute to a squared error: . More weight makes an error in that region more costly. The weighted Euclidean inner product makes the same choice for a finite list of coordinates.
For an explicit real-function example on , let and approximate by a constant function. The orthogonal projection onto a finite-dimensional subspace spanned by the function givesThe best unweighted constant is . Giving greater weight to larger moves the best constant upward, so a weighting choice changes the approximation even though the allowed family of functions is unchanged.
