How to Solve Homogeneous Equations with the SVD
At a glance
- 1. Write the SVD
Factor the matrix as A = UΣVᵀ.
- 2. Change coordinates
Set x = Vz, so Ax = 0 becomes Σz = 0.
- 3. Find zero singular values
Set coordinates corresponding to zero singular values freely and the others to zero.
- 4. Transform back
The null space is spanned by the corresponding columns of V.
A homogeneous linear system has the form
where is an matrix and . The singular value decomposition (SVD) gives a direct way to identify every solution, including the dimension and a basis of the null space.
The key fact is simple: with a full SVD, the null space of is spanned by the right singular vectors associated with zero singular values.
The SVD and the null-space equation
Write the SVD of as
For a full SVD, is an orthogonal matrix, is an orthogonal matrix, and is an rectangular diagonal matrix. Let . The usual singular values are
When , the full matrix has columns but only diagonal positions occur in . To index all columns of , extend the list by setting for . Thus, for this null-space calculation, we use
where any appended values are zero.
Suppose satisfies . Since is orthogonal, write
where . Substituting this into the equation gives
Multiplying by produces
Thus, each component must satisfy
If , then . If , then can be arbitrary. Therefore, if denotes the th column of ,
This also agrees with the rank–nullity theorem. If has columns and rank , then exactly independent right singular vectors belong to the null space:
Step-by-step procedure
Given :
- Compute a full SVD .
- Determine which singular values are zero.
- Select the corresponding columns of .
- Form arbitrary linear combinations of those columns.
If the zero-singular-value columns are , then the general solution is
where the coefficients are arbitrary real numbers.
If there are no zero singular values, the only solution is . In that case, has full column rank and its null space is trivial.
Worked example
Consider
Instead of computing the entire SVD from scratch, calculate the eigenvectors of :
Its orthonormal eigenvectors can be chosen as
The corresponding eigenvalues are , , and . Using the zero-extended list for the three columns of , the corresponding singular values are , , and . The vector is associated with the zero singular value, and therefore spans the null space:
Consequently, every solution is
Direct substitution confirms this:
The matrix has rank and columns, so rank–nullity predicts a one-dimensional null space, as obtained from the SVD.
Reduced SVD notation
For an matrix, a compact SVD is often written
where only the positive singular values are retained. Some sources call this a reduced SVD; terminology varies. This factorization is useful for representing the action of , but it does not display the null space explicitly: the null-space vectors are omitted from .
To obtain a basis for the null space, use a full SVD, or compute the remaining orthonormal columns of . In the example above, a compact SVD contains the two right singular vectors associated with singular values and , while the third right singular vector is needed to describe the solutions of .
Numerical SVD: what counts as zero?
For exact symbolic matrices, a singular value is either zero or nonzero. In floating-point computation, a theoretically zero singular value may appear as a small number such as . It should not automatically be treated as nonzero.
A common numerical rank rule is to regard as zero when
where a scale-dependent tolerance might be chosen as
with the machine precision. Software packages may use a related threshold, and the appropriate tolerance also depends on measurement or modeling error.
The columns of corresponding to singular values below the chosen threshold provide a numerical basis for an approximate null space. Such vectors satisfy , rather than necessarily satisfying the equation exactly.
Common mistakes
Using columns of
The null-space vectors belong to the domain of , which is . They are columns of , not columns of . The columns of describe directions in the output space .
Looking for zero rows in only
The important information is the zero singular values and their associated right singular vectors. For a rectangular matrix, the shape of can make zero rows or columns appear because of dimensions, even when those entries do not by themselves identify the null-space basis.
Forgetting the arbitrary coefficients
The null-space basis vectors are not usually the complete answer. If two columns of correspond to zero singular values, the complete solution is every linear combination of those two vectors.
Treating a small singular value as exactly zero
A small singular value indicates near dependence, not necessarily exact dependence. In numerical applications, state the tolerance used and distinguish an exact null space from an approximate one.
References
- Matrix Computations, Gene H. Golub and Charles F. Van Loan
- Introduction to Linear Algebra, Gilbert Strang
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.