Andrew Hoang
← All posts
Linear AlgebraJune 24, 20262 min read

Systems of Linear Equations and the Null Space

Geometric intuition for when a linear system has one solution, none, or infinitely many — and how the null space describes that whole family of solutions. With an interactive visualizer.

#linear algebra#matrices#null space

A system of linear equations can always be written as Ax=bA\mathbf{x} = \mathbf{b}, where AA holds the coefficients, x\mathbf{x} the unknowns, and b\mathbf{b} the constants. Stacking AA and b\mathbf{b} side by side gives the augmented matrix [Ab][\,A \mid \mathbf{b}\,], which is all the information the system contains.

Three things that can happen#

Reducing [Ab][\,A \mid \mathbf{b}\,] to row echelon form tells you which case you are in:

  • A unique solution — the rows pin down every variable. In 2D the equation lines cross at a single point; in 3D the planes meet at one point.
  • No solution — the equations contradict each other (a row like 0=10 = 1 appears). The lines are parallel, or the planes have no common point.
  • Infinitely many solutions — there are free variables. The solution set is a whole line or plane of points.

The deciding quantity is the rank. If rank(A)<rank([Ab])\operatorname{rank}(A) < \operatorname{rank}([A\mid b]) the system is inconsistent; otherwise the number of free variables is nrank(A)n - \operatorname{rank}(A).

The null space carries the "infinitely many"#

When solutions are not unique, every solution has the form

x=xp+xn,\mathbf{x} = \mathbf{x}_p + \mathbf{x}_n,

where xp\mathbf{x}_p is one particular solution and xn\mathbf{x}_n is any solution of the homogeneous system Ax=0A\mathbf{x} = \mathbf{0}. That set of homogeneous solutions is the null space of AA. So the null space is exactly the "shape" of the infinite family — a line, a plane, and so on — shifted to pass through xp\mathbf{x}_p.

A good way to feel this: make the two rows of a 2×22\times2 system proportional and watch the null space jump from {0}\{\mathbf 0\} to a whole line.

Play with it#

The tool below is the same one from the Tools section. Edit any entry of the augmented matrix and the solution, the reduced row echelon form, and the null space all update live. Switch between 2 and 3 variables to see lines become planes.

Linear Systems VisualizerOpen full tool

Try these:

  1. Unique: the default 22-variable system — two lines crossing at one point.
  2. No solution: set the second row to a multiple of the first but change its constant.
  3. A line of solutions: make the second row an exact multiple of the first (constant included), and watch a one-dimensional null space appear.

Connected notes