Three measured points refuse to lie on one straight line. In a second experiment, three hidden inputs can change while two measured totals stay exactly the same. Both problems have the form , yet the first has no exact solution and the second has infinitely many, so they call for different methods and different defenses. This review classifies such problems by rank and compatibility, solves each one under a stated criterion, checks the answer in the original problem, and asks what the result does and does not say about the hidden truth.
Key terms
Overdetermined system
Definition A linear system with a real matrix is overdetermined when it has more equations than unknowns, . The count alone decides neither existence nor uniqueness. The system has an exact solution exactly when lies in , a subspace of dimension at most , which data with measurement errors usually miss. When there is no exact solution, ordinary least squares minimizes over all in . The minimizers always exist, and they are exactly the solutions of the normal equations
The minimizer is unique exactly when the columns of are independent, that is when . A QR factorization or an SVD solves the same problem without forming , and that is the safer route in floating-point arithmetic. When , the invertible matrix has condition number , where and are the largest and smallest singular values of , so forming it squares the ratio of itself.
In plain words More equations than unknowns means more demands than adjustable numbers. When the demands conflict, a fit stops trying to meet each one exactly and makes the vector of misses as short as possible instead.
Example Tuples such as stand for column vectors on this page, except for data points written . Fit the line to the points , and . The unknowns are , and the system has
The first two points force and , and that line predicts at , not , so no exact fit exists. The normal equations are
Subtracting the first equation from the second gives , so , and then gives . The columns of are independent, since forces from the first entry and then , so this least-squares line is the only one.
Underdetermined system
Definition A linear system with a real matrix is underdetermined when it has fewer equations than unknowns, . Then
so the null space contains nonzero vectors. The system can still have no solution, when is not in . If it has a solution , it has infinitely many, and they are exactly the vectors with in . Every one of them reproduces exactly, so the data alone cannot tell them apart.
In plain words Fewer measurements than unknowns leave some input directions unseen. Moving the input along such a direction changes nothing that was measured.
Example Two totals of three inputs are measured, and , so
With free, every solution is
and is the line spanned by . The rank is , so every in is reachable. There is nothing to fit here, only a choice to make.
Residual check
Definition The residual of a candidate for is , computed from the original data and in the units of the measurements. A residual check recomputes and tests the property the method promises. An exact solution needs . A least-squares solution needs
one dot product with each column of , which is the normal equations in another form. This test certifies the minimum, because when it holds, every in satisfies
The check ends with the null space. In both cases the solutions are exactly the vectors with in , so the answer is unique exactly when .
In plain words Put the answer back into the problem that was asked. For a fit, the misses must be perpendicular to every change in prediction the model can make, otherwise some change would shrink them.
Example For the line with and , the predictions are and
Its entries add to , and weighted by the inputs they give , so . The squared error is . This perpendicularity holds in the three-dimensional space of observations. In the scatter plot the residuals are vertical gaps at fixed inputs, and they need not meet the line at right angles.
Minimum-norm reconstruction
Definition Let be consistent, with a real matrix. Among all its solutions exactly one has the smallest Euclidean norm. It is called the minimum-norm reconstruction and written . It is the only solution that lies in , which means it is orthogonal to every vector of , and it equals , where is the pseudoinverse. Every other solution is with a nonzero in , and
When has full row rank, , the pseudoinverse is . For inconsistent data, is the least-squares solution of smallest norm. Length is measured in the given coordinates, so a change of units for the inputs can change which solution is shortest.
In plain words When the data leave a whole family of exact answers, pick the shortest one. It has no component in the unseen directions, so it adds nothing the measurements did not ask for. It is a stated choice, not a discovery of the hidden input.
Example For the two totals above,
so , the member of the family with . Both measurements hold, since and , and the kernel test gives . The squared norm is , and adding changes it to , which is larger whenever . The data say nothing about the kernel component, so the hidden input could just as well be or .
Effect of an added measurement
Definition Suppose is consistent and a new exact measurement arrives, with a nonzero vector in . The new system appends the row to and the entry to , and its solutions are the old solutions that also satisfy the new equation. If is not in , then is not orthogonal to , the rank rises by one, the nullity drops by one, and the new system is still consistent. If is in , say , then every old solution has . The measurement is then redundant when , and when it contradicts the old data and the combined system has no exact solution. Any answer chosen for the old problem, the minimum-norm one included, must be checked against the new equation and recomputed if it fails. If the new measurement is uncertain rather than exact, imposing it as an equation is itself a modeling choice, and a fit with stated weights is one alternative.
In plain words A new exact measurement can only remove possibilities. It removes freedom only when it looks along a direction the old measurements could not see. A measurement that repeats old information either agrees with it or exposes a conflict.
Example Add the exact measurement to the two totals. Its vector has dot product with the kernel direction , so it sees the missing direction. In the family it sets , and the only solution left is . The new matrix
is upper triangular with ones on the diagonal, hence invertible. The old answer has , so it is not even a solution of the new problem. By contrast, a measurement would add nothing, because its row is row 1 minus row 2 of and , while a reading would contradict the two totals.
Agreement with data versus a validated model
Definition A model agrees with the data when its residual on the observations used to build it is zero or small under the stated error criterion. A model is validated only when further evidence supports it. Its predictions match observations that were not used to fit it, within their measurement uncertainty and over the range where the model will be used, and its assumptions are justified, such as which inputs are fixed, which measurements are exact, the weights and the units. Agreement is one part of evaluating a model and is never sufficient on its own. If the design matrix is square and invertible, as when a polynomial of degree is fitted to points with distinct inputs, the residual is zero for any data. Every member of an underdetermined solution family reproduces the data exactly. A small residual can also come with a large error in the solution when shrinks some input direction strongly.
In plain words A good fit to the points you have is evidence about those points. Whether the model describes the process behind them is a separate question, answered by new data and by checking assumptions, not by a smaller residual.
Example The quadratic passes exactly through , and , so its residual is , while the least-squares line has squared error . That alone does not make the quadratic the better model, since three coefficients can match any three readings at distinct inputs. At the quadratic predicts and the line predicts . Only new measurements, such as one at , or knowledge of the process that produced the data, can decide between them.
Check yourself
- Count equations and unknowns in each system, then decide whether it has no solution, exactly one or infinitely many. The first system is , , , and the second is , .
Show the answer
The first system has three equations in two unknowns, so it is overdetermined, yet it has exactly one solution. The second equation is twice the first, and the first and third give , which satisfies all three. The coefficient rows and are independent, so the rank is and the solution is unique. The second system has two equations in three unknowns, so it is underdetermined, yet it has no solution, because twice the first equation reads , not . Counting alone decides neither question. The rank and the right-hand side decide both.
- Fit by least squares to the points , and . Check the residual and say whether the coefficients are unique. Someone proposes the line instead, because it passes through the first point and its residuals add to zero. Does it pass the residual check?
Show the answer
The inputs are the same as in the examples, so is unchanged, and . The normal equations are
Subtracting gives , so and . The predictions are and the residual is . Its entries add to and its input-weighted sum is , so . The squared error is , and the coefficients are unique because the columns of are independent. For the predictions are and the residual is . Its entries do add to , but its input-weighted sum is , so it fails the check, and its squared error is larger than . A zero sum tests only the first column of , and the least-squares residual must be orthogonal to every column.
- Three survey markers have unknown heights , and only differences are measured, and . Find all solutions and the minimum-norm one, and verify it. Then decide what each of the extra exact measurements and would do.
Show the answer
With , the measurements give and , so
and the null space is spanned by . Orthogonality to it requires , so and . Check the measurements, and , and the kernel, . The squared norm is , and adding gives , so this solution is the unique shortest one. It sets the average height to zero, which is a convention. Differences cannot reveal the overall level, and true heights such as give the same data.
The measurement has vector , exactly the unseen direction. In the family it gives , so and the heights are uniquely . The old answer has height sum and fails the new measurement, so it must be replaced. The measurement has vector , which is row 1 plus row 2, and . Every old solution already satisfies it, so nothing changes. A reading would instead contradict the first two measurements.