Prerequisite · Linear Algebra

Solution Sets and the Homogeneous Structure

16 min read
By the end of this reading you will be able to:
  • 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:

[120130011200000]\left[\begin{array}{rrrr|r} 1 & 2 & 0 & 1 & 3 \\ 0 & 0 & 1 & -1 & 2 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right]

Pivot variables: x1x_1 (column 1) and x3x_3 (column 3). Free variables: x2x_2 and x4x_4.

Reading off the equations:

  • x1=32x2x4x_1 = 3 - 2x_2 - x_4
  • x3=2+x4x_3 = 2 + x_4
  • x2,x4x_2, x_4 free (any value)

Parametric form (let x2=sx_2 = s, x4=tx_4 = t):

x=(3020)+s(2100)+t(1011),s,tR\vec{x} = \begin{pmatrix} 3 \\ 0 \\ 2 \\ 0 \end{pmatrix} + s\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + t\begin{pmatrix} -1 \\ 0 \\ 1 \\ 1 \end{pmatrix}, \quad s,t \in \mathbb{R}

This is the solution set expressed as an affine combination of vectors. Its geometric shape is a 2-dimensional flat (plane) in R4\mathbb{R}^4.

General = Particular + Homogeneous

The parametric form reveals a fundamental structural theorem. Let p\vec{p} be any particular solution (any single solution to Ax=bA\vec{x} = \vec{b}) and let h\vec{h} range over all solutions of the homogeneous system Ax=0A\vec{x} = \vec{0}.

Then the complete solution set of Ax=bA\vec{x} = \vec{b} is:

{x:Ax=b}={p+h:Ah=0}\{\vec{x} : A\vec{x} = \vec{b}\} = \{\vec{p} + \vec{h} : A\vec{h} = \vec{0}\}

Why: if Ap=bA\vec{p} = \vec{b} and Ah=0A\vec{h} = \vec{0}, then A(p+h)=Ap+Ah=b+0=bA(\vec{p} + \vec{h}) = A\vec{p} + A\vec{h} = \vec{b} + \vec{0} = \vec{b}. And if Ax=bA\vec{x} = \vec{b} then A(xp)=0A(\vec{x} - \vec{p}) = \vec{0}, so xp\vec{x} - \vec{p} is a homogeneous solution.

Geometric picture: the solution set of Ax=bA\vec{x} = \vec{b} is the solution set of the homogeneous system translated by p\vec{p}. It is a flat (affine subspace) passing through p\vec{p}, parallel to the null space N(A)\mathcal{N}(A).

The Homogeneous System

The system Ax=0A\vec{x} = \vec{0} always has at least one solution: x=0\vec{x} = \vec{0}. This is the trivial solution.

The solution set N(A)={x:Ax=0}\mathcal{N}(A) = \{\vec{x} : A\vec{x} = \vec{0}\} is the null space of AA. It is always a subspace (it contains 0\vec{0} 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 AA contains a pivot. For an n×nn \times n square matrix, this is equivalent to AA being invertible.

The Linear Combination Lemma

This core lemma formalizes why row operations preserve the solution set:

If x\vec{x} solves both a1x1++anxn=ba_1 x_1 + \cdots + a_n x_n = b and c1x1++cnxn=dc_1 x_1 + \cdots + c_n x_n = d, then it also solves every linear combination k(a1x1++anxn)+m(c1x1++cnxn)=kb+mdk(a_1 x_1 + \cdots + a_n x_n) + m(c_1 x_1 + \cdots + c_n x_n) = kb + md.

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 (Ax=bA\vec{x} = \vec{b} has a solution): b\vec{b} must lie in the column space of AA — it must be expressible as a linear combination of the columns of AA.

Uniqueness (the solution, if it exists, is unique): N(A)={0}\mathcal{N}(A) = \{\vec{0}\} — the only homogeneous solution is trivial.

For a square n×nn \times n matrix AA:

Condition Interpretation
rank(A)=n\text{rank}(A) = n AA has full rank; unique solution for every b\vec{b}
rank(A)<n\text{rank}(A) < n AA is rank-deficient; either no solution or \infty many
det(A)0\det(A) \neq 0 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.

References
Hefferon 2020 — Linear Algebra, Ch. One §I.2–I.3: Solution Sets, General=Particular+Homogeneous