A factorization separates a matrix into simpler operations. LU records elimination and is useful for repeated square solves. SVD works for rectangular and singular matrices, separates stretching from rotation or reflection, and identifies both lost information and unstable inverse directions.
1 Elimination as LU
If Gaussian elimination needs no row exchanges, its multipliers can be stored in a unit lower-triangular matrix , giving with upper triangular. For
To solve , first solve , then . With this gives and . For many right-hand sides the factors can be reused. If a pivot is zero, row exchanges may be needed; the correct form is then with a permutation matrix . Even a nonzero tiny pivot can make pivoting numerically important. A blanket claim that every invertible matrix has an unpivoted LU is false.
A row exchange after multipliers have been stored
Consider a square example in which the second pivot, rather than the first, forces a swap:
The first-column multipliers are and . The second pivot is zero, so exchange rows 2 and 3. The stored multipliers describe the rows that move; exchange those two entries in column 1 of as well. The unprocessed diagonal ones in stay on its diagonal. The last multiplier is then . Thus
This product is the verification, not merely a name for the factors. Keeping the original order of the stored multipliers would put the first entries of rows 2 and 3 in the wrong order and fail . For a solve, use before ; the right-hand side must undergo the same permutation.
For a complete solve with these factors, take . The same exchange gives . Forward substitution reads , , , hence . Back substitution reads , , , giving . Direct multiplication gives .
The preceding example uses a row exchange to avoid a zero pivot, but does not choose the largest available first-column entry. The next example follows partial pivoting at both stages.
Partial pivoting after one column has been processed
In partial pivoting, at stage we select an entry of largest absolute value in column among rows , exchange its row with row if necessary, and then eliminate below the pivot. If all those entries are zero, no nonzero pivot is available in that column. The following nonsingular example makes two distinct ideas visible: the choice of pivot and the bookkeeping needed when a later row exchange moves earlier elimination multipliers.
In column 1 the largest absolute value is , already in row 1. The multipliers for rows 2 and 3 are and . Subtracting these multiples of row 1 gives
For column 2, compare only the remaining entries: . Partial pivoting therefore exchanges rows 2 and 3. The new pivot is ; the multiplier below it is . Hence
The row now in position 2 previously had multiplier , while the row now in position 3 had multiplier . Thus those already stored entries must exchange positions. The new multiplier is placed in position ; the diagonal entries remain . With
we can check the assertion by multiplication:
If the old first-column entries were left in their original positions, the first entries of rows 2 and 3 of would instead be , whereas those of are . Swapping the whole rows of is also wrong: it moves its diagonal ones. Only the parts of those rows in columns already processed are exchanged.
Proof X-ray
Why the earlier multipliers move with the rows
The assumption here is that the first elimination is complete and its multiplier matrix satisfies . Let be the matrix exchanging rows 2 and 3. Since , inserting gives
Left multiplication by moves the rows; the compensating multiplication on the right restores the identity part of . The result exchanges the previously stored multipliers without exchanging the diagonal ones. Now the second elimination is , where
Substituting into the previous identity yields , with exactly as displayed. The pivot is nonzero, so the division defining is valid. This argument explains the bookkeeping for this exchange; it does not assert that arbitrary whole-row swaps preserve a lower-triangular factor.
Pivoting chooses the largest available magnitude to avoid dividing by a smaller available pivot, but it does not by itself guarantee that the whole problem is well-conditioned.
Real inner products, their norms and the needed inequalities
An inner product on a real vector space is a map that is symmetric, linear in each argument, and positive definite: for . Linearity gives . Define . It is zero exactly at zero and satisfies . The standard example on is . Vectors are orthogonal when their inner product is zero, and a list is orthonormal when distinct members are orthogonal and each member has norm one.
If , insert into the nonnegative square . Expanding by bilinearity gives , hence . If the same inequality holds directly. Equality for means , equivalently ; the zero-vector cases also give equality. Finally expand and apply the bound to its cross term to obtain . Both sides to be square-rooted are nonnegative, so the triangle inequality follows. Thus this is a norm, and normalization of any nonzero vector divides by a positive real number. No complex bilinear convention is being used.
Finite basis existence and extension, without a counting assumption
Let be a real vector space supplied with a finite spanning list . First prove that every independent list has length at most . After insertions, maintain a spanning list consisting of and surviving old vectors. Expand in this list. Some coefficient on a surviving old vector is nonzero; otherwise would be in the span of the earlier , contradicting independence. Solve for that old vector and replace it by . The new list spans the same space and keeps every earlier insertion. If , after steps the first independent vectors already span , contradicting independence of . This proves the bound, including .
Every subspace has a finite basis. Start with the empty independent list. If its current span is not , choose one vector of outside that span. A relation with nonzero coefficient on the new vector would express it in the old span, so the enlarged list remains independent. The proved bound permits at most additions; therefore the process stops with an independent spanning list for . If , it stops immediately with the empty basis. Starting instead with any given independent list in proves that list extends to a basis of . Only a bounded finite selection is used. Finally, if two bases have sizes , use each as the finite spanning list in the bound to obtain and . Thus basis size, called dimension, is well-defined. This supplies the existence, extension and dimension facts used in rank–nullity.
Orthonormal bases and extension while retaining prescribed vectors
Suppose in addition that has a real positive-definite inner product. On an independent list , define successively
Inductively the previous are orthonormal. For , taking the inner product with gives . If , then lies in the previous span, a contradiction. Division by its positive norm is therefore legal. The displayed formula and its rearrangement show that the first old and new vectors span the same space, completing the induction. Apply this to a basis to obtain an orthonormal basis, also for a subspace. To extend a prescribed orthonormal list, first extend it to an ordinary basis by the proved theorem and then apply this construction in that order. On the prescribed first vectors no component is subtracted and the norm is one, so every prescribed vector is retained exactly. Empty lists and the zero subspace require no division. This proves the orthonormal extension used in the spectral proof below.
Fix an integer and the Euclidean norm on . A set is bounded if it lies in some finite-radius ball, closed if its complement is open, and compact if every cover by open subsets of has a finite subcover. We use real completeness, including the nested closed interval property.
Heine–Borel in finite-dimensional Euclidean space
Theorem. A set is compact if and only if it is closed and bounded. The empty set satisfies all three properties.
Compact implies bounded. The open balls , an integer, cover . A finite subcover puts inside the largest of these balls.
Compact implies closed. Suppose and . The balls , , cover . Choose a finite subcover with centers and set . If lies in the ball centered at , the triangle inequality gives . Hence misses , so the complement is open.
Closed and bounded implies compact. Let nonempty be closed and bounded. Enclose it in a closed cube with . Suppose an open cover of has no finite subcover. Divide each coordinate interval into two closed halves. The resulting closed subcubes cover . At least one subcube has intersection with that is not finitely coverable by the given family; otherwise the finite union of the finite subcovers would cover . Select such a subcube and repeat. This produces nested closed cubes with side length and not finitely coverable, hence nonempty.
For each coordinate, the nested interval property gives a common coordinate value. Together these give . Every pair of points in has distance at most , so the intersection contains only . Choose . Then . A closed set contains such a limit: if were in its open complement, a ball around would eventually contain outside , a contradiction. Thus .
One member of the cover contains , and openness gives for some . For sufficiently large , every point of is within of , so alone covers . This contradicts the selection of . Therefore every open cover has a finite subcover. The number is finite; replacing it by infinitely many subpieces would invalidate this argument.
Continuous images and extreme values
Theorem. If is compact and is continuous relative to , then is compact. In particular, a continuous on nonempty compact is bounded and attains its maximum and minimum.
Proof. An open cover of pulls back to relatively open sets , with open in . These cover , so finitely many suffice. Their corresponding cover , proving compactness. For scalar , the image is nonempty, closed and bounded by the theorem already proved in dimension one. Let . For each , the definition of supremum supplies with . Then , and closedness places in the image. Thus the maximum is attained. Applying the same argument to gives the minimum. This proves existence, not a formula for the maximizing input.
The maximum-to-eigenvector step without an implicit differentiation rule
Let be real, let , and suppose maximizes the quadratic form on the unit sphere. For , put , , and . Then the normalized curve in the spectral proof has quadratic value
The last quotient tends to as . Maximality makes it nonpositive for and nonnegative for , so its common two-sided limit is zero; hence . This uses an explicit rational difference quotient rather than an unstated multivariable gradient or chain rule. Orthonormal extension, already proved, identifies with a real coordinate space of dimension one less. In such coordinates its invariant restriction has a symmetric matrix, since ; this justifies the dimension induction, including a zero-dimensional final complement.
2 The real symmetric spectral theorem
Theorem. For , every real symmetric matrix has an orthonormal eigenbasis and real eigenvalues.
Proof. If , the matrix is a real scalar and the standard unit vector is an orthonormal eigenbasis. Let . The continuous function attains a maximum on the compact unit sphere. Let be a maximizing unit vector. For any , set . The denominator is nonzero for every real , since . The function has a maximum at , so differentiation gives . Choose . Then and , hence . Thus is an eigenvector with real eigenvalue . Its perpendicular complement is invariant because for . Restrict to that complement, where it remains symmetric, and induct on dimension.
For , every eigenvalue is nonnegative since .
For the rest of this unit, with positive finite , and all norms are Euclidean. We list singular values, including zeros. The positive entries constructed below are the positive singular values; remaining diagonal positions are zero. If , the additional zero eigenvalues of still describe kernel directions, but do not create additional rows of .
3 Singular value decomposition
Choose an orthonormal eigenbasis of , ordered so that the eigenvalues are nonincreasing; since they are nonnegative, the positive ones come first, in decreasing order. Write them as with , for . Define . Then
Extend these to an orthonormal basis of . Eigenvectors with zero eigenvalue satisfy . Therefore
where are orthogonal and is rectangular diagonal with positive entries . These are the singular values. They need not be eigenvalues of , which might not even be square.
The formula shows : rotate coordinates using , stretch each active coordinate, then rotate using . The rank is and the kernel is spanned by the remaining .
A complete rectangular SVD with rank loss
Use a non-diagonal matrix so that the missing direction and the different factor sizes are visible:
For an eigenvector , the first equation is . At it gives ; at it gives . The second equation agrees in each case. Normalizing these two directions gives
The zero singular value gives ; it does not give a quotient . Instead choose a vector perpendicular to , for example , and normalize it to . Solving and normalizing gives . Therefore the full factors, with sizes , and , are
The complement equations for a vector are and . Thus and ; choosing gives the numerator . Since the displayed orthonormal columns form bases, expansion in either basis gives both inverse identities: and .
The squared lengths of the numerators of are and their pairwise dot products are zero. The corresponding check for gives , while the first check gives . Finally,
The unused left singular vectors are an orthonormal complement, not further recovered input directions. As a follow-up calculation, the pseudoinverse is : invert only , transpose the rectangular diagonal shape, and keep its zero entry zero.
4 Pseudoinverse and minimum norm
Define by replacing every positive singular value by its reciprocal and transposing the rectangular shape. Then
Theorem. minimizes ; among all minimizing vectors, it has the smallest Euclidean norm, uniquely.
Proof. Write and . Orthogonality gives a sum of squares . Minimum requires for active coordinates. Kernel coordinates do not affect the residual, but contribute to , uniquely minimized by zero.
For , a positive singular value is with and . For , , prediction and residual . All minimizers have , but has minimum norm.
Small singular values amplify errors in inverse coefficients: a perturbation changes by . Truncation or regularization changes the problem and must be disclosed, not described as exact inversion.
Counterexample mode
Pseudoinverses do not reverse products
For and , the product has pseudoinverse . But and , so . The rule familiar from inverses fails.
A small singular value can amplify data error
Worked example 4.1.1
(A small change in data, a large change in the solution)
Let and use the Euclidean norm. Set
The exact solutions of and are respectively and . The data change has norm , but the solution change has norm . In this example , so the relative changes are also and .
The singular values are and : the second coordinate is compressed by when acts, then amplified by when its inverse acts. Thus the two-norm condition number is . Each matrix is invertible, yet the family becomes more sensitive as . This is sensitivity of the problem to a particular perturbation, not an assertion that every data error is amplified by the same amount. Pivoting can help control arithmetic during elimination; it cannot remove this sensitivity from the original problem.
5 Graded practice
E1 Foundation. Find LU for and solve .
E2 SVD. Give the singular values and a pseudoinverse of .
E3 Minimum norm. For the row matrix and target , find the minimum-norm exact solution and prove it is smallest.
E4 Pivoting. Give an invertible matrix that cannot have with unit lower-triangular and upper-triangular without a row exchange.
6 Full solutions
S1. , . Forward substitution gives ; backward substitution gives .
S2. The positive singular value is 3 and the other singular value is 0. . It divides the first observed coordinate by 3 and sets the undetermined domain coordinate to zero.
S3. , so . Every exact solution is . These two vectors are orthogonal, so squared norm is , uniquely minimized at zero.
S4. Take . If and , then the upper-left entry forces , making the lower-left entry , contradicting . A row exchange fixes the pivot obstruction.
Summary
LU packages elimination, while SVD packages geometry and works even when a matrix is rectangular or singular. The pseudoinverse selects the unique smallest-norm least-squares solution. A factorization is useful only when its hypotheses, rank information and numerical consequences remain visible.