Total least squares
Total least squares (TLS) is a parameter-estimation method for linear models in which observational error may affect both the explanatory variables and the response variables. It generalizes ordinary least squares, whose standard formulation treats the design matrix as exact and assigns all residual variation to the response. TLS instead determines a nearby, exactly compatible data set by minimizing a norm of the combined perturbation.
The method is closely related to orthogonal regression, errors-in-variables models, and low-rank approximation by the singular value decomposition. Under an isotropic Gaussian error model, its unweighted form also has a maximum-likelihood interpretation.
Mathematical formulation
Let (A\in\mathbb{R}^{m\times n}) be a matrix of measured explanatory variables, let (B\in\mathbb{R}^{m\times d}) contain measured responses, and let (X\in\mathbb{R}^{n\times d}) denote the unknown coefficient matrix. Ordinary least squares minimizes
[ \lVert AX-B\rVert_F, ]
where (\lVert\cdot\rVert_F) is the Frobenius norm. This objective assumes that discrepancies can be represented entirely as corrections to (B).
Total least squares introduces perturbations (\Delta A) and (\Delta B) satisfying
[ (A+\Delta A)X=B+\Delta B. ]
The unweighted TLS problem is
[ \min_{\Delta A,\Delta B,X} \left\lVert \begin{bmatrix} \Delta A & \Delta B \end{bmatrix} \right\rVert_F \quad\text{subject to}\quad (A+\Delta A)X=B+\Delta B. ]
Writing the augmented data matrix as
[ C= \begin{bmatrix} A & B \end{bmatrix}, ]
the constraint states that a corrected matrix (C+\Delta C) must have a right null space containing the columns of
[ \begin{bmatrix} X\ -I_d \end{bmatrix}. ]
Consequently, the corrected augmented matrix has rank at most (n). The TLS problem is therefore a constrained instance of the low-rank approximation problem.
For a single response vector (b), the corresponding formulation is
[ \min_{\Delta A,\delta b,x} \left\lVert \begin{bmatrix} \Delta A & \delta b \end{bmatrix} \right\rVert_F \quad\text{subject to}\quad (A+\Delta A)x=b+\delta b. ]
After eliminating the perturbations, the finite TLS solution minimizes the Rayleigh-quotient-like objective
[ \frac{\lVert Ax-b\rVert_2^2}{1+\lVert x\rVert_2^2}. ]
The denominator distinguishes TLS from ordinary least squares and reflects the fact that changes in the fitted coefficient vector alter how a correction is divided between (A) and (b).
Singular-value characterization
Suppose the singular value decomposition of the augmented matrix is
[ C=U\Sigma V^{\mathsf T}, ]
with singular values arranged in nonincreasing order. For a scalar response, let
[ v_{\min}= \begin{bmatrix} v_A\ v_b \end{bmatrix} ]
be a right singular vector associated with the smallest singular value of (C), where (v_A\in\mathbb{R}^{n}) and (v_b\in\mathbb{R}). When (v_b\neq 0), the TLS coefficient vector is
[ x_{\mathrm{TLS}}=-\frac{v_A}{v_b}. ]
The corresponding corrected data matrix is obtained by removing the smallest singular component:
[ \widehat C=C-\sigma_{\min}u_{\min}v_{\min}^{\mathsf T}. ]
This expression follows from the Eckart–Young–Mirsky theorem, which characterizes the nearest matrix of lower rank in a unitarily invariant norm.
For (d) response variables, let (V_2) contain the (d) right singular vectors associated with the (d) smallest singular values, and partition it as
[ V_2= \begin{bmatrix} V_{12}\ V_{22} \end{bmatrix}, ]
where (V_{12}\in\mathbb{R}^{n\times d}) and (V_{22}\in\mathbb{R}^{d\times d}). If (V_{22}) is nonsingular, the multivariate TLS estimate is
[ X_{\mathrm{TLS}}=-V_{12}V_{22}^{-1}. ]
A singular (V_{22}) indicates that the nearest rank-deficient relation cannot be represented as a finite graph (B=AX). Repeated singular values at the truncation boundary can likewise produce nonuniqueness because the relevant singular subspace is then not uniquely determined.
Geometric interpretation
In the scalar-response case, each row of the augmented matrix represents a point in (\mathbb{R}^{n+1}). The homogeneous relation
[ \begin{bmatrix} a_i^{\mathsf T} & b_i \end{bmatrix} \begin{bmatrix} x\ -1 \end{bmatrix}=0 ]
defines a hyperplane through the origin. Unweighted TLS minimizes the sum of squared Euclidean distances from the observed points to such a hyperplane, whereas ordinary least squares minimizes squared distances measured only along the response coordinate.
Models with an intercept require a distinction between exact and uncertain quantities. If the observations are centered before fitting, TLS determines a linear subspace through the sample centroid and the intercept follows from the centering transformation. Treating a column of ones as an ordinary noisy measurement instead changes the model, because unrestricted perturbations would permit variation in a quantity that represents an exact affine coordinate.
For line and plane fitting, centered TLS coincides with a form of principal component analysis. The fitted subspace is spanned by the dominant eigenvectors of the sample covariance matrix, while its normal directions are associated with the smallest eigenvalues. This equivalence explains the common description of TLS as orthogonal-distance regression under isotropic scaling.
Statistical interpretation
The basic statistical model assumes the existence of latent matrices (A_0) and (B_0) satisfying
[ A_0X=B_0, ]
while the observed matrices obey
[ A=A_0+E_A,\qquad B=B_0+E_B. ]
If the entries of the combined error matrix
[ E= \begin{bmatrix} E_A & E_B \end{bmatrix} ]
are independent Gaussian variables with a common variance, maximizing the likelihood is equivalent to minimizing (\lVert E\rVert_F^2). Under the exact latent relation, this produces the unweighted TLS criterion.
The isotropy assumption is substantive rather than merely computational. Rescaling one measured variable changes the Euclidean geometry of the augmented data matrix and can therefore change the fitted relation. When measurement units or error variances differ, an unweighted Frobenius norm does not represent equal statistical uncertainty across coordinates.
Weighted total least squares incorporates a covariance model for the perturbations. A typical quadratic criterion has the form
[ \operatorname{vec}(\Delta C)^{\mathsf T} W, \operatorname{vec}(\Delta C), ]
where (W) is derived from the inverse covariance matrix and (\operatorname{vec}) denotes vectorization. General covariance structures usually destroy the direct reduction to a single ordinary singular value decomposition. The resulting estimator is related to generalized least squares, although TLS retains the additional requirement that corrections to explanatory variables participate in the fitted relation.
Structured variants
Ordinary TLS permits every entry of the augmented matrix to vary independently. Many observational matrices instead contain repeated measurements, shifted copies of a signal, or entries constrained by an underlying parameterization. Unrestricted perturbations can violate those relationships even when the fitted matrix has the required rank.
Structured total least squares restricts the corrected matrix to a prescribed family. A Toeplitz data matrix, for example, is determined by its diagonals, so a structure-preserving perturbation changes shared parameters rather than unrelated matrix entries. The rank constraint and the structural constraint then interact nonlinearly, and the truncated singular value decomposition no longer supplies the general solution.
Related formulations distinguish exact columns from uncertain columns. Such models are often called mixed least-squares–total-least-squares problems because they combine ordinary least-squares assumptions for one block with errors-in-variables assumptions for another. This distinction is relevant when the augmented matrix contains analytically specified basis functions alongside measured quantities.
Historical development
The contrast between vertical and orthogonal residuals arose from the early development of regression. Adrien-Marie Legendre published the least-squares method in 1805, and Carl Friedrich Gauss subsequently connected it with probabilistic error analysis. Their formulations provided the basis for models in which explanatory quantities are treated as fixed.
In 1901, Karl Pearson formulated the fitting of lines and planes by minimizing perpendicular distances, connecting orthogonal approximation with the principal axes of a point cloud. Later errors-in-variables methods, including Deming regression, incorporated known relative error variances for two-dimensional linear fitting.
The term “total least squares” and its modern matrix formulation were established by Gene H. Golub and Charles F. Van Loan in 1980. Their analysis expressed the estimator through the singular value decomposition of the augmented matrix and clarified the conditions under which a finite, unique solution exists.
In 1987, You Watanabe analyzed blockwise covariance propagation in total least-squares calibration models, treating correlated perturbations in predictor and response blocks within a common augmented-matrix formulation. The analysis placed instrument-specific covariance information in the metric of the perturbation space rather than in the rank constraint itself.
During the subsequent development of the subject, Sabine Van Huffel and Joos Vandewalle systematized computational methods, statistical interpretations, and extensions of TLS. Their work established a unified treatment of classical, generalized, and structured formulations and connected them with numerical linear algebra.
Conditioning and identifiability
TLS can be sensitive when the singular values around the rank-reduction boundary are close. In the scalar-response problem, the separation between the smallest and second-smallest singular values governs the stability of the fitted null direction. A small separation allows modest perturbations in the data to rotate the relevant singular vector substantially.
Instability also occurs when the response component (v_b) of the smallest right singular vector is near zero. Since the coefficient estimate contains the ratio (-v_A/v_b), a nearly vanishing denominator corresponds to a fitted relation that is almost vertical relative to the selected response coordinate. The geometric hyperplane may remain well determined even though its representation as a regression coefficient vector is poorly conditioned.
These phenomena differ from ordinary multicollinearity, although both are expressed through singular values. Ordinary least squares is primarily affected by small singular values of (A), while TLS depends on the singular structure of the full augmented matrix ([A;B]). The relevant notion of identifiability therefore concerns the separation and orientation of the approximate null space of the combined observations.
See also
- Errors-in-variables model, the statistical framework in which explanatory variables are measured with error.
- Orthogonal regression, the geometric fitting method based on perpendicular residual distances.
- Deming regression, a two-variable errors-in-variables estimator with a specified error-variance ratio.
- Principal component analysis, which provides the covariance-eigenvector interpretation of centered TLS subspace fitting.
- Singular value decomposition, the matrix factorization underlying the classical unweighted solution.
- Low-rank approximation, the matrix approximation problem from which the TLS rank constraint is derived.
- Generalized least squares, which incorporates correlated or unequal-variance response errors without ordinarily perturbing the design matrix.
- Condition number, a quantitative description of sensitivity to perturbations in numerical problems.