Solution Sets and the Homogeneous Structure
- Express the complete solution set of a linear system as General = Particular + Homogeneous
- Write a basis for the null space using free variables as parameters
- Apply the Linear Combination Lemma to verify whether a proposed vector satisfies a system
- Relate the number of free variables to solution multiplicity: unique, infinitely many, or none
Describing the Solution Set
When a linear system has infinitely many solutions, we need a compact description. The standard form is parametric: express each pivot variable in terms of the free variables, which become the parameters.
Example
Consider the reduced system:
Pivot variables: (column 1) and (column 3). Free variables: and .
Reading off the equations:
- free (any value)
Parametric form (let , ):
This is the solution set expressed as an affine combination of vectors. Its geometric shape is a 2-dimensional flat (plane) in .
General = Particular + Homogeneous
The parametric form reveals a fundamental structural theorem. Let be any particular solution (any single solution to ) and let range over all solutions of the homogeneous system .
Then the complete solution set of is:
Why: if and , then . And if then , so is a homogeneous solution.
Geometric picture: the solution set of is the solution set of the homogeneous system translated by . It is a flat (affine subspace) passing through , parallel to the null space .
The Homogeneous System
The system always has at least one solution: . This is the trivial solution.
The solution set is the null space of . It is always a subspace (it contains and is closed under addition and scaling).
When is the trivial solution the only one? When there are no free variables — i.e., every column of contains a pivot. For an square matrix, this is equivalent to being invertible.
The Linear Combination Lemma
This core lemma formalizes why row operations preserve the solution set:
If solves both and , then it also solves every linear combination .
This means: any equation derivable from the original equations by linear combination is automatically satisfied by every solution of the original system. Row operations are just a systematic way of creating useful linear combinations.
Existence and Uniqueness
Existence ( has a solution): must lie in the column space of — it must be expressible as a linear combination of the columns of .
Uniqueness (the solution, if it exists, is unique): — the only homogeneous solution is trivial.
For a square matrix :
| Condition | Interpretation |
|---|---|
| has full rank; unique solution for every | |
| is rank-deficient; either no solution or many | |
| Equivalent to full rank for square matrices |
This interplay between existence, uniqueness, rank, and determinant is the central theorem of linear systems — you will encounter it repeatedly as you study optimization and regression.
Computing the Decomposition
The parametric form derived above is not just pencil-and-paper algebra — you can read it directly into code. Using the same matrix:
import numpy as np
A = np.array([[1., 2., 0., 1.],
[0., 0., 1., -1.],
[0., 0., 0., 0.]])
b = np.array([3., 2., 0.])
# Particular solution: set free variables (x2, x4) to zero
p = np.array([ 3., 0., 2., 0.])
# Null-space basis read directly from the parametric form
h1 = np.array([-2., 1., 0., 0.]) # coefficient of free variable x2
h2 = np.array([-1., 0., 1., 1.]) # coefficient of free variable x4
# Any x = p + s*h1 + t*h2 satisfies A @ x = b (General = Particular + Homogeneous)
s, t = 3., -1.
x = p + s*h1 + t*h2
print('A @ x:', np.einsum('ij,j->i', A, x)) # [3. 2. 0.]
print('residual:', np.einsum('ij,j->i', A, x) - b) # [0. 0. 0.]
# Programmatic null space via SVD (when you cannot read it off by hand)
_, S, Vh = np.linalg.svd(A, full_matrices=True)
rank = int(np.sum(S > 1e-9))
null_basis = Vh[rank:] # rows are null vectors; shape (2, 4)
print('null basis (rows):')
print(np.round(null_basis, 4))
The einsum string 'ij,j->i' is identical in NumPy, PyTorch (torch.einsum), and TensorFlow (tf.einsum). The SVD-based null space is in an orthonormal basis rather than the free-variable basis, but it spans the same subspace as the parametric vectors above. For large systems, np.linalg.lstsq (or its PyTorch/TF equivalents) finds a minimum-norm particular solution automatically, without needing to identify free variables by hand.