Linear System of Equations

where is a matrix, is a column vector, and is a column vector.
If is a square matrix, we have exactly as many knowns as unknowns, and if is invertible , we can solve for : .

Written out explicitly:

The are called variables or unknowns, the are coefficients ( is the coefficient matrix), and is the right-hand side. A system with no solution is called inconsistent.

Set of solutions

Homogenous system of equations

A linear system of equations with and is called homogenous if the right-hand side is the zero vector :

To a given linear system of equations , we call the associated homogenous system of equations.
Every homogenous system of equations has at least one solution, the trivial solution , i.e. .

How to find all solutions to

Goal: Find the general solution — the complete set of all vectors satisfying .

We can decompose problem into two simpler parts:
1] Find one particular solution satisfying
2] Find the null space — all solutions to the associated homogeneous system

The general solution is , i.e. every solution has the form where .


Why this works:
Adding a null space vector to gives another solution:
Every solution is captured: if also solves , then , so , meaning


Consequence: The null space determines uniqueness.

Null spaceSolutions to
Unique (if exists)
Infinitely many (if any exist)

Solve

Particular solution:
Null space: (solutions to )
General solution: for any

When does have a solution?

Bring the augmented matrix to row echelon form .

No solution iff there’s a zero row in with non-zero entry in :

This row says , a contradiction.

Otherwise, the system is solvable. Back-substitute from bottom to top: each pivot variable is determined by the variables to its right (which are either already solved or free).

Rank determines existence and uniqueness

For with , the rank determines:

Existence (is there at least one solution?):
(full row rank) guarantees a solution exists for every .
If , some rows become zero rows after elimination — solution exists only if the corresponding .

Uniqueness (is there at most one solution?):
(full column rank) means every column has a pivot, so no free variables, so at most one solution.
If , there are free variables, giving infinitely many solutions (if any exist).


Overdetermined (, tall skinny ): more equations than unknowns.
At best rank , so if a solution exists it’s unique. But rank , so most have no exact solution.
Least squares finds minimizing .

Underdetermined (, short fat ): more unknowns than equations.
At best rank , so a solution exists for every . But rank , so always infinitely many solutions.
Minimum norm finds the with smallest among solutions.

For square matrices: is invertible unique solution for every .

Pivot columns vs free columns

When solving Ax = b:
Pivot columns correspond to basic variables, determined by back-substitution (solving from the bottom row upward, each pivot variable in terms of the ones already solved).
Non-pivot columns correspond to free variables (can be set to any value).

In the REF example above, columns 1, 2, 4 have pivots, column 3 doesn’t. So is free — the solution is parameterized by it.

Number of free variables null space.

Link to original

A solution of only exists if is in the column space of .

– the null space of – is the orthogonal complement to the column space, so if the vector was in , there would be no linear combintation of the columns of that yields , i.e. no solution to the system of equations.

EXAMPLE

The vector can be represented as a linear combination of columns of :

There is no that can solve the below system of equations, as the column space of does not contain :

Link to original

If , then there are infinitely many solutions ().