Coarse-grid correction Created 2026-10-06 Updated 2026-10-14
A coarse-grid correction improves a fine-grid approximation by solving a smaller equation for the part of its approximation error representable on a coarse mesh. Use the signed convention and the linear-system residual . A prolongation linear map interpolates coarse corrections into fine-grid corrections, and a restriction linear map transfers the linear-system residual. Solve exactly or approximately and update . The plus sign follows from defining the approximation error as exact minus approximate. It is the correction equation's right-hand side , rather than merely restricted solution values, that determines the update.
For the multigrid method model , take , so and the coarse nodes coincide with every second fine node. Use linear interpolation with zero boundary corrections :Use full-weighting restriction for the interior linear-system residual:Here is the matrix transpose in ordinary unweighted coordinates. With these specific transfers, the Galerkin coarse-grid operator isThus it equals the rediscretized Poisson equation operator on this constant-coefficient one-dimensional mesh. The equality is special to the stated model and transfers. In particular, dropping from the fine matrix while using on the coarse mesh changes the correction unless the right-hand sides and transfers are rescaled consistently.
Take seven interior points, , three coarse unknowns, and the deliberately constructed approximation errorFor example, choose , so and . Direct matrix multiplication givesThe exact coarse solve returns , so adding removes the entire chosen approximation error. A broad triangular error can have a sharply localized linear-system residual: the latter measures discrete curvature, not error height. This is why the two should not be confused. A smooth sine mode instead has linear-system residual , so interpreting its magnitude also requires the eigenvalue and the equation's scaling.
Constructed seven-point Poisson example: residual restriction, coarse solve, interpolation, and the error remaining after exact or partial correction
. Details. The algebra explains the exact cancellation beyond this example. Assume has linearly independent columns and choose an invertible Galerkin coarse-grid operator . With an exact coarse solve, the iteration matrix for the remaining approximation error isThe short proof is to substitute . Thus every vector in the column space of is eliminated, and the corrected linear-system residual restricts to zero. These are exact projection identities, not a statement that every visually smooth vector belongs to that column space. If is a symmetric matrix and a positive-definite matrix, and with , then is also a positive-definite matrix. Moreover : is an orthogonal projection onto the complement of the column space of in the energy norm . Equivalently, the added correction is the best approximation to from that column space in this energy norm. Without these symmetry and transfer assumptions, the projection need not be orthogonal.[ref]
For an approximate coarse solve represented by a fixed linear map , replace by . ThenThere is no exact cancellation of coarse-representable approximation error unless on the relevant directions. For the triangular example, deliberately returning half the exact correction, , leaves , as the figure shows. This controlled mathematical comparison illustrates an incomplete coarse solve; it is not a measured performance result or a prescription for a geometric multigrid V-cycle. More generally, if , then an approximate leaves , separating the nonrepresentable remainder from the coarse-solve defect.
With pre- and post-relaxation iteration matrices and , a two-grid error step has iteration matrix . A geometric multigrid V-cycle supplies by one recursive coarse cycle from zero, with a direct solve only at the bottom. Effective smoothing, a coarse column space that approximates the surviving approximation error, and a sufficiently accurate coarse correction must work together. Coarsening alone supplies no convergence guarantee, and correcting an arbitrary fine-grid vector exactly would require a coarse column space large enough to contain it.
Column rank Created 2026-10-14 Updated 2026-10-18
The column rank of a matrix is the dimension of its image of a linear map, equivalently the dimension of the linear span of its columns. Multiplication on the left by an invertible matrix preserves all column linear relations, and elementary column operations preserve their linear span. In row echelon form the pivot columns form a basis of the column space. Its dimension equals the number of nonzero rows, and hence the row rank.
Column space Created 2026-09-29 Updated 2026-10-18
The column space of a matrix is the linear span of its columns. It is the image of a linear map represented by .
If an matrix has columns , then matrix multiplication gives . Thus its column space consists of exactly the attainable output vectors in , and has a solution exactly when belongs to this column space. Its dimension is the matrix rank; the kernel instead describes input vectors in whose contributions cancel.[ref]
Solution Sets. Interactive Linear Algebra, §2.4.3, Solution Sets and Column Spans: attainable outputs and input solution sets occupy different spaces
Controllability Gramian 2026-10-14
For and the constant matrices over the real numbers in the Kalman rank criterion, the finite-time Controllability Gramian accumulates the influence of all command times. Its column space equals that of the controllability matrix, and is a symmetric positive-definite matrix exactly when the controllability matrix has rank of a matrix . If so, put . Among square-integrable functions steering to at , the commandminimizes , with value . Here in a matrix superscript denotes transpose. This cost is a squared input norm, not necessarily physical energy, and the optimizing command need not satisfy an amplitude bound. [ref]
https://ee263.stanford.edu/archive/contr.pdf. Stephen Boyd, EE263: Controllability and state transfer, slides 18–29 to 18–30
For the double integrator, , so direct integration givesFor a rest-to-rest distance , and the minimum squared input norm is . Compare the two constant commands in the double integrator example, whose cost is : both attain the target, but the smooth command costs less. At , , however, peaks at , so it violates while the two constant commands remain admissible. Controllability, optimal control, and constrained reachability in control theory answer different questions.
Controllability matrix 2026-10-14
For the linear time-invariant system , with and , the controllability matrix has rows and columns. The columns of are directions influenced directly by the control inputs; account for how the dynamics carry their influence into further directions. The column space of the controllability matrix is the zero-state reachable set for any when inputs are unrestricted. [ref]
https://underactuated.csail.mit.edu/acrobot.html#controllability. Russ Tedrake, Underactuated Robotics: Controllability of linear systems
Fitted values Created 2026-09-24 Updated 2026-10-14
Fitted values are the predictions at the predictor values used to fit a regression model. In linear regression with an explicit regression intercept,Here is the slope design matrix, and is the regression residual vector. The fitted values estimate the regression function at the observed predictors; they need not equal the observed responses, which may also contain random errors. Prediction at a new predictor vector uses with the same centering and scaling used in fitting. A prediction interval addresses uncertainty in a new response rather than just displaying this point prediction.
For the five constructed observations in linear regression, ordinary least squares gives fitted values . The ridge regression fit at instead gives . Both fitted vectors have sample mean because the regression intercept is unpenalized; their regression residuals differ and their residual sums of squares are and , respectively.
For ordinary least squares, the fitted values are the orthogonal projection of onto the column space of the complete design matrix, including its regression intercept column. They remain unique even in rank-deficient ordinary least squares, although the regression coefficients can be nonunique. The regression residuals are then orthogonal to every column.[ref]
Regression 1: Different perspectives. slides 6–10: fitted values, hat matrix, projection and orthogonal residuals
With centered slopes, ridge regression instead satisfies , so the regression residuals need not be orthogonal to the slope columns. Their sum is still zero because the regression intercept remains free.For fixed predictors and scales and a fixed positive penalty, ridge regression gives a linear smoother,For with at least one nonzero slope direction, this matrix is not an orthogonal projection matrix: applying it twice shrinks that direction again. Its effective degrees of freedom are , where are the positive singular values of ; the extra counts the free regression intercept. If the penalty is selected using , the resulting fitting rule need not be a linear smoother, since its chosen also depends on .
Full column rank Created 2026-09-28 Updated 2026-10-18
An matrix has full column rank when its matrix rank is , equivalently when its columns are linearly independent vectors. This requires . Its kernel is , so the represented linear map is injective and every solvable linear system has a unique solution. It need not reach every output.[ref]
One-to-one and Onto Transformations. Interactive Linear Algebra, §3.2.1, One-to-one matrix transformations theorem and Wide matrices do not have one-to-one transformations
For example,has full column rank two, but its column space is the plane in . An attainable output fixes the input uniquely as ; an output outside this plane has no preimage.
Full row rank Created 2026-09-28 Updated 2026-10-18
An matrix has full row rank when its matrix rank is , equivalently when its rows are linearly independent vectors. This requires . Its column space is all of , so the represented linear map is surjective and every linear system is solvable. If , its nullity is , so solutions are not unique.[ref]
One-to-one and Onto Transformations. Interactive Linear Algebra, §3.2.2, Onto matrix transformations theorem and Tall matrices do not have onto transformations
For example, the matrix transpose of the matrix in full column rank isIt has full row rank two. Every output has solutions , with . A square matrix of size has full row rank and full column rank together exactly when its matrix rank is ; then it is an invertible matrix. A nonsquare matrix cannot have both properties, and has no two-sided inverse: such an inverse would make its linear map a linear isomorphism between vector spaces of different dimensions.
Kalman rank criterion 2026-10-14
For a finite-dimensional continuous-time linear time-invariant system on , with constant matrices over the real numbers, no state constraints, and every piecewise continuous function allowed as a control input without an amplitude bound, controllability in any fixed is equivalent to the controllability matrix having rank of a matrix . The same equivalence holds with all square-integrable functions as inputs. A stronger useful statement iswhere is a matrix exponential and is the column space. Thus a rank of a matrix leaves only an -dimensional affine subspace reachable at that time. [ref]
The Kalman rank criterion allows arbitrarily large commands as shrinks. It does not assert controllability with bounded control inputs, nor test a general nonlinear dynamical system just by counting its inputs. For the double integrator, and give two independent directions, despite there being only one control input.
Linear regression Created 2026-09-24 Updated 2026-10-14
Linear regression models a response's conditional expectation as a linear combination of specified predictors. In matrix form,where the design matrix describes the observations, contains the regression coefficients, and contains the errors. The fitted values estimate the response means. The model is linear in its regression coefficients; its columns may include powers, interactions, or other transformed predictors, so polynomial regression can fit curved relationships using the same machinery.
For a concrete example, take five constructed observationsAn ordinary least squares fit with an intercept gives the line . Its regression residuals are and its residual sum of squares is . A one-unit increase in the predictor corresponds to a one-unit increase in the fitted response. This is a description of this fitted association; interpreting a change as a causal effect requires the assumptions of a causal inference problem.
A five-point least-squares fit separates the fitted trend from residual deviations
. Details. The geometric reason for the fit is simple. The possible mean vectors form the column space of . Ordinary least squares chooses the orthogonal projection of the data vector onto that vector subspace, so the remaining regression residual is orthogonal to every permitted fitted direction. The least-squares normal equations express this orthogonality as . The data's explained component and unexplained component are therefore separated by the same geometry used in a Hilbert space.
The optimization definition makes sense for any observed data. Quantifying the uncertainty of the regression coefficients needs additional assumptions about the sampling and errors. With fixed of full column rank and mean-zero errors with covariance matrix , ordinary least squares is unbiased and has covariance ; the Gauss-Markov theorem compares it with other linear unbiased estimators. A normal linear model additionally makes Student t-distribution intervals and tests exact in finite samples. Model adequacy and predictive assessment remain relevant even when these calculations are available.
Two historical settings help explain the subject's appeal. Adrien-Marie Legendre's Nouvelles méthodes pour la détermination des orbites des comètes (1805) includes an appendix on the method of least squares: observations give more equations than unknowns, and squared errors provide a criterion for reconciling them. Its astronomical setting shows the motivation for combining imperfect measurements. [ref]
https://www.e-rara.ch/zut/content/titleinfo/10838079. Legendre, Nouvelles méthodes pour la détermination des orbites des comètes, 1805, appendix pp. 72–80
Francis Galton's Regression Towards Mediocrity in Hereditary Stature (1886) examines the association between parental and offspring heights and the tendency of group averages toward the population average. This is a historical use of the regression name; the modern linear model is a general statistical formulation. [ref]https://zenodo.org/records/1449548. Galton, Regression Towards Mediocrity in Hereditary Stature, 1886, original article
Low-rank approximation 2026-10-14
A low-rank approximation replaces an matrix by a matrix of matrix rank at most a chosen integer , with , while making an explicitly chosen error norm small. The point is to describe many entries using a few shared patterns: an image compression may retain broad brightness patterns while discarding finer ones. The approximation is useful when the saved storage or computation justifies the lost detail. A small matrix rank alone says nothing about the error.
The compact representation is a sum of outer products, equivalently a product of two thin matrices:Here are the columns of , and the star denotes the conjugate transpose; over the real numbers use the transpose. The rank bound for a matrix product gives . Conversely, choose a basis of the column space of as the columns of , and put the coordinates of each column of into ; pad with zero columns if the matrix rank is smaller than . Each nonzero outer product is a rank-one matrix: it repeats a single column pattern at different strengths across the columns.
Keeping the two factors stores scalars instead of . This saves space only when . The usual singular value decomposition representation stores scalars because it keeps the singular values separately; absorbing them into one factor removes that extra array. These are representation sizes at equal scalar precision, before file overhead. See Uschmajew and Vandereycken, §9.2: thin factors and their storage, and Illinois CS 357, Low-rank approximation: storing singular vectors and values.
The factors also give without forming the full matrix . Direct evaluation uses scalar multiplications, compared with for a dense matrix applied to a vector. For , the two factors contain scalars rather than , and the same counts describe these multiplication costs. Constructing the factors is a separate cost. Moreover, a low-rank approximation need not be a sparse matrix: the constant matrix whose entries are all has matrix rank despite having no zero entries.
For the standard unweighted problem, write a singular value decomposition with and singular values . Retain the first paired left singular vectors and right singular vectors:The Eckart-Young-Mirsky theorem says that this same minimizes both of the following error norms over all matrices with matrix rank at most :where and an empty sum is zero. Here the Frobenius norm is , whereas the operator norm is specifically induced by the Euclidean norm, . The first aggregates errors in all entries; the second bounds the worst output error for a unit vector input. These formulas apply to real and complex matrices. [ref]
https://math.uchicago.edu/~may/REU2016/REUPapers/Mazeika.pdf. Mazeika, §§4.1 and 4.3: norms and optimal singular-value truncation
For , a relative Frobenius norm tolerance is met precisely when the discarded squared singular values sum to at most . Thus one can choose the smallest suitable before reconstructing the matrix. Many individually small discarded singular values can still have a large combined error. An operator norm tolerance instead tests only the largest discarded singular value, . The two questions can therefore select different ranks.
The following stipulated matrix makes the tradeoff visible. Define four real vectors of length :The vectors are orthonormal, so this is already a singular value decomposition written as outer products, with positive singular values . All entries lie between and and can be displayed as brightnesses. The first component is uniform brightness, the second distinguishes broad blocks, and the last two supply finer alternating patterns. This is a designed arithmetic example, not measured image data.
Here has every entry equal to , while has entries within the two diagonal blocks and in the other two blocks. For instance, becomes : its error is . The full residual is , whose Frobenius norm is and whose operator norm is . Since , the relative Frobenius norm error is . Two thin factors use scalars, or if the normalized left singular vectors, right singular vectors, and singular values are stored separately, instead of dense entries.
Retaining three components reduces the Frobenius norm error to while using scalars in two factors. Retaining all four reconstructs exactly but uses scalars, giving no saving in this generic representation; keeping the singular values separately uses . Our particular sign patterns could be encoded more economically, but that would exploit an additional structure beyond the general low-rank approximation. The striking feature is that numerical error and storage can both be read from the decomposition, rather than judged only by how smooth the picture looks.
The constraint is deliberately matrix rank at most . The truncation has . If , the best approximation is itself, with zero error. Requiring matrix rank exactly can destroy attainment: for and , the matrices have matrix rank for , and both error norms equal . Their error has infimum zero, but no rank-two matrix attains it. If , the displayed does have matrix rank exactly and attains the same minimum under either constraint.
Optimality also does not always mean uniqueness. For , the best Frobenius norm approximation is unique when . [ref]
https://link.springer.com/chapter/10.1007/978-3-030-31351-7_9. Uschmajew and Vandereycken, Theorem 9.1: uniqueness across a singular-value gap
A positive tie across the cutoff permits different choices: for and , both and have Frobenius norm error and operator norm error . More generally, is optimal for every real unit vector in the first two coordinate directions. Rotating which tied direction is kept changes the approximation. Repeated singular values entirely inside the retained group do not change its sum of outer products. At the only feasible matrix is zero; at the unique zero-error approximation is , even if some singular values are tied at zero.A strict gap does not guarantee uniqueness for the operator norm. For and , every with has matrix rank and error , which is optimal. Only minimizes the Frobenius norm, since . An unchanged worst direction can hide extra error in another direction under the operator norm.
Finally, these guarantees concern the stated norms and the sole matrix rank constraint. They do not establish that a discarded pattern is noise or irrelevant to a particular task: the finer patterns in our constructed example were put there intentionally. Adding entrywise weights or restrictions on the factors changes the problem, so the Eckart-Young-Mirsky theorem above does not automatically solve it. For historical context, the original 1936 matrix problem is documented in the existing Eckart-Young-Mirsky theorem section.
Matrix rank Created 2026-09-24 Updated 2026-10-18
The matrix rank of an matrix over a field is the dimension of its column space, equivalently the dimension of its row space. It counts linearly independent column directions, with . Counting nonzero matrix entries gives a different quantity: an all-ones matrix can have arbitrarily many nonzero matrix entries and still have matrix rank one.[ref]
The Rank Theorem. Interactive Linear Algebra, §2.9, Definition: rank is column-space dimension; the row-space equality is proved below
Consider the following matrix over the real numbers, with columns written as vectors:The vectors are linearly independent: requires both and , so . The third column adds no new direction to their linear span, hence despite all nine matrix entries being nonzero. The second row likewise repeats twice the first row.
The column space is a plane through the origin:Every output has second coordinate twice its first coordinate. Conversely, any vector equals , so this condition describes the entire plane, not just part of it. For example, is attainable, whereas lies outside the plane.
Elementary row operations expose the same count algebraically. Apply and , interchange the last two rows, multiply the second row by , and subtract twice the second row from the first. The resulting reduced row echelon form isThere are two pivot columns, so the matrix rank is two. The corresponding original columns form a basis of the original column space. The pivot columns of itself span the different plane with third coordinate zero: row operations preserve column linear relations, but generally move the column space.[ref]
Row Reduction. Interactive Linear Algebra, §1.2.2, Echelon Forms; §1.2.3, definitions of pivot position and pivot column
Solving the homogeneous linear system gives and . Taking the free variable givesThe kernel is the input direction that trades one unit of each of the first two columns for one unit of the third. This trade leaves the output unchanged. The rank-nullity theorem expresses the general balance: for an matrix of matrix rank , the nullity is . The column space describes reachable outputs; the kernel describes invisible changes to inputs.[ref]
The Rank Theorem. Interactive Linear Algebra, §2.9, Rank Theorem: rank plus nullity equals the number of columns
For the attainable output , one solution is . Every solution lies in the affine solution space of a linear equationIndeed, and . Conversely, subtracting from any solution gives a vector in the kernel, so this describes every solution. For , the same row operations on the augmented matrix expose : the second requirement demands where twice the first requires .
Two pivot columns, one kernel direction, and the same row operations distinguishing attainable from impossible
. Details. In general, a linear system is solvable exactly when appending leaves the matrix rank unchanged:Appending a vector outside the column space adds an independent direction. When a solution exists, every solution is , because . Thus one count predicts both how many output directions are reachable and, through the rank-nullity theorem, how many independent input directions remain free.[ref]
Solution Sets. Interactive Linear Algebra, §2.4.2, Key Observation and its proof; §2.4.3, Solution Sets and Column Spans
Moore-Penrose inverse Created 2026-09-24 Updated 2026-10-14
The Moore-Penrose inverse extends the useful part of a matrix inverse to rectangular and singular matrices. A linear system may have no exact solution, or may have many. The pseudoinverse resolves both ambiguities: is the minimum-norm least-squares solution. First minimize the Euclidean norm ; among all vectors attaining that minimum, choose the one with smallest Euclidean norm . It does not pretend that inconsistent equations can all be satisfied.
For , its Moore-Penrose inverse is the unique matrix satisfying the four Penrose equations. The singular value decomposition gives a direct construction:Here are unitary matrices, the star is the conjugate transpose, and is the rectangular diagonal matrix obtained by replacing each nonzero singular value by and leaving zeros at zero. Over the real numbers, use orthogonal matrices and transposes. The pseudoinverse reverses the stretches that can be reversed; it discards output components the original linear map cannot produce and does not invent an input component in its kernel. [ref]
https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/resources/mit18_06scf11_ses3-8sum/. Strang, MIT 18.06SC: Left and Right Inverses; Pseudoinverse
The two products have especially clear meanings:They are orthogonal projection matrices: selects the producible part of an output, while selects the detectable part of an input. They are generally not identity matrices. For an invertible matrix, both are identities and .
This gives a useful order of operations for least-squares solutions: project the requested output onto the column space, then invert the restriction of from to its column space. Adding a kernel vector leaves the residual unchanged but increases the squared Euclidean norm by the Pythagorean theorem in an inner-product space, because is orthogonal to that kernel. The pseudoinverse therefore provides one canonical answer without hiding either lost information or irreconcilable data.
The name records a history with several contributors. E. H. Moore gave an earlier generalization in 1920; M. H. Pearl's 1966 paper records that work, Arne Bjerhammar's 1951 rediscovery for maximal-rank rectangular matrices, and Roger Penrose's independent 1955 treatment. [ref]
https://www.cambridge.org/core/journals/mathematical-proceedings-of-the-cambridge-philosophical-society/article/abs/on-generalized-inverses-of-matrices/9CD637F604C76ECD8D03AC029212D56E. Pearl, On generalized inverses of matrices (1966), introduction and references 6–9
Penrose's original paper proves existence and uniqueness from the four Penrose equations for arbitrary complex matrices, including rectangular ones. [ref]https://faculty.kfupm.edu.sa/math/jaafarm/lec-notes/Moore-Pinrose.pdf. Penrose, A generalized inverse for matrices (1955), Theorem 1, pp. 406–408
Normal equations for linear least squares 2026-10-14
Minimizing gives the displayed equations by differentiation. Equivalently, the regression residual satisfies : it is orthogonal to every column of the design matrix. If has full column rank, the minimizer is unique and the fitted values are the orthogonal projection of onto its column space. A rank-deficient design matrix can give multiple coefficient vectors, while the projected fitted vector is still unique.
For an intercept and one predictor, put and . The equations give and , provided . In the five-point example in linear regression, , , and , giving and .
The normal equations describe the mathematical optimum, but explicitly forming and inverting can amplify numerical problems. A QR decomposition computes the same least-squares solution through orthogonal coordinates; a singular value decomposition also exposes nearly dependent columns. This connects statistical fitting to numerical linear algebra and the choice of a stable algorithm. [ref]
https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/. MIT 18.06SC, Projections onto Subspaces and Least Squares
Normalized sample principal component 2026-09-29
When , the normalized sample principal component has Euclidean norm one. The vectors form an orthonormal set spanning the column space of a full-column-rank centered design matrix.
Orthogonal projection matrix Created 2026-09-24 Updated 2026-10-14
A matrix represents a linear projection when applying it twice has the same effect as applying it once. For an orthogonal projection with the standard Hermitian inner product on , the additional condition is that the conjugate transpose equals the original matrix:Thus is both idempotent and a Hermitian matrix. Over the real numbers this says . Its image of a linear map is the retained linear subspace, while its kernel of a linear map is the orthogonal complement: vectors in the image are unchanged, and vectors in the kernel become zero.
For a matrix with full column rank, projecting onto its column space givesThe invertibility of follows from linear independence of the columns. If those columns are an orthonormal set, and . These formulas and the conditions in the real case are developed in MIT 18.06SC, Projections onto Subspaces, pp. 1–3.
For the line spanned by ,In particular, and . The eigenvalues are on the retained direction and on the removed direction. This exposes the meaning of an orthogonal projection as retaining selected components, rather than stretching them.
Symmetry refers to the specified inner product. In the real weighted setting, the formula becomes and satisfies and . For the preceding weighted line example,It is not symmetric under the ordinary transpose, but it is an orthogonal projection for the weighted Euclidean inner product. The matrix criterion should therefore be used with the standard Hermitian inner product, not silently transferred to a different geometry.
Orthogonal projection onto a finite-dimensional subspace Created 2026-09-24 Updated 2026-10-14
A finite-dimensional linear subspace of an inner product space has a unique closest vector to any given vector . This is its orthogonal projection . If is an orthogonal basis of , compute it one direction at a time:The inner product convention here is linear in its first argument, including over the complex numbers. For an orthonormal basis, each denominator is one. When consists only of the zero vector, the empty sum gives . The finite-dimensional formula is described in Francis Narcowich, Inner Products and Norms: minimization problems.
Take and , using the dot product. With ,The orthogonal projection residual has . To verify the best approximation directly, every candidate in the line is , andThe smallest squared Euclidean norm error is therefore , attained only at . The diagram connects the perpendicular residual to this one-variable quadratic polynomial.
The perpendicular residual identifies the closest point on a line and the unique minimum of the squared error
. Details. The general mechanism is the Pythagorean theorem in an inner-product space. For any , the vectors and are orthogonal, soMoving away from inside adds a nonnegative squared norm, which is zero only when . This proves both optimality and uniqueness.
The useful feature is separation of preparation from evaluation. Construct an orthonormal basis once with the Gram-Schmidt process, then obtain each new best approximation using inner products instead of a fresh optimization problem. When is the column space of a matrix, this gives linear least squares; when is spanned by orthogonal polynomials, it gives a least-squares polynomial in an orthogonal-polynomial basis. The ambient inner product space need not be a Hilbert space for this finite-dimensional construction. In an infinite-dimensional target linear subspace, existence requires additional hypotheses, supplied by orthogonal decomposition by a closed subspace.
Orthogonal projection residual 2026-10-14
An orthogonal projection residual is the difference between a vector and its orthogonal projection onto a linear subspace . It is orthogonal to every vector in , so for all . The Gram-Schmidt process uses such residuals to remove directions already represented by earlier basis vectors.
This is an optimality condition as well as a geometric description. No permitted change within can remove a further orthogonal component of . In the preceding dot product example, is perpendicular to the line spanned by .
The selected inner product matters. Keep and the same line, but use the weighted Euclidean inner product with . The projection coefficient and residual becomeNow , although . The orthogonality is with respect to , so it need not look perpendicular in the ordinary drawing. The squared weighted error isThe weighted optimum reduces the first-coordinate error from to , at the cost of increasing the magnitude of the second-coordinate error from to . The weights express which errors are more costly.
Changing the inner product changes the closest point: a circle and a weighted error ellipse touch the same permitted line at different points
. Details. In linear least squares, residual orthogonality to the column space is expressed by the normal equations for linear least squares. With a weighted Euclidean inner product, the corresponding real-matrix equation is . This makes the choice of error measurement part of the mathematical model, rather than merely a plotting convention.
Overdetermined least-squares example 2026-10-14
Suppose three measurements constrain two unknowns:The linear system asks for , , and , which are incompatible. A least-squares solution makes a balanced compromise. The matrix has full column rank, soThe fitted output and residual areThus the two direct measurements are each overshot by one, and the measured sum is undershot by one. The residual has Euclidean norm and is orthogonal to the column space, the plane in output coordinates .
For any perturbation , the orthogonality of to givesSince the kernel of is trivial, every nonzero increases the residual. The least-squares solution is unique in this example. The formula using is convenient for these small exact calculations; an actual numerical computation can use a QR decomposition or singular value decomposition to avoid the extra conditioning cost of the least-squares normal equations. For full column rank, the squared singular values of are the eigenvalues of , so its condition number in the Euclidean norm is . [ref]
https://ocw.mit.edu/courses/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/resources/lecture-9-four-ways-to-solve-least-squares-problems/. Strang, MIT 18.065 Lecture 9: four ways to solve least-squares problems
Past exam of the mathematics course of the University of Cambridge 2004 ia Paper 1 5B Solution Created 2026-09-24 Updated 2026-10-14
Let be the augmented matrix of the linear system. Consistency means that is in the column space of , equivalently . For a consistent system, choosing one solution gives every solution as . The rank-nullity theorem therefore gives the complete classification:
- Unique: , equivalently .
- Infinitely many: .
- None: .
For the given equations, subtracting the first from the second and the second from the third givesIf , then and the first equation gives . If , the first reduced equation is , so the system is inconsistent. ThusThese conclusions can also be checked from , but the row differences exhibit the inconsistency directly.








