← Back to modules

Systems of Linear Equations

Row reduction, Gaussian elimination, and solution types.

A system of linear equations is a set of constraints that must hold simultaneously. The question is always: do values of the unknowns exist that satisfy every equation at once, and if so, how many?

Gaussian elimination — systematically row-reducing the augmented matrix — gives a complete algorithmic answer to this question for any system, regardless of size. It is one of the most important algorithms in all of computational mathematics.

The theory connects directly to rank, the null space, and the fundamental theorem of linear maps. Every statement about when a system has zero, one, or infinitely many solutions follows from these ideas.

Setting up augmented matrices

A linear system a11x1++a1nxn=b1,,am1x1++amnxn=bma_{11}x_1 + \cdots + a_{1n}x_n = b_1, \ldots, a_{m1}x_1 + \cdots + a_{mn}x_n = b_m is written as the matrix equation Ax=bA\mathbf{x} = \mathbf{b}, where AA is the m×nm\times n coefficient matrix, x\mathbf{x} is the unknown vector, and b\mathbf{b} is the right-hand side.

The augmented matrix [A    b][A\;|\;\mathbf{b}] packs all information into one array. Each row represents one equation. The vertical bar separates coefficients from constants.

Three elementary row operations preserve the solution set: (R1) swap two rows, (R2) multiply a row by a nonzero scalar, (R3) add a scalar multiple of one row to another. These correspond exactly to legal algebraic manipulations of equations.

Why row operations work: they produce equivalent systems — systems with identical solution sets. You are not changing the solutions; you are changing the representation until the solution is obvious.

Helpful?

Gaussian elimination

Forward elimination reduces the augmented matrix to row echelon form (REF): a staircase pattern where each row's leading nonzero entry (pivot) is to the right of the pivot above, with zeros below each pivot.

The procedure: work column by column from left to right. Use row operations to create zeros below the current pivot. Skip a column with no eligible pivot — this creates a free variable.

Back substitution: starting from the last nonzero row, solve for the pivot variable, then substitute upward through the other equations.

Reduced row echelon form (RREF) goes further: each pivot is scaled to 11, and zeros are created both above and below each pivot. The solution can be read directly without back substitution.

A useful check: the number of pivots in RREF equals the rank of AA. The number of non-pivot columns equals the number of free variables.

Helpful?

Solution types

A linear system has exactly one of three outcomes: no solution (inconsistent), exactly one solution, or infinitely many solutions. There is no 'two solutions' in linear algebra.

Inconsistency is flagged by a row [0  0    0    b][0\;0\;\cdots\;0\;|\;b] with b0b\neq 0 — the equation 0=b0=b is impossible.

A unique solution exists when every variable is a pivot variable — the coefficient matrix has full column rank (rank(A)=n\text{rank}(A)=n). RREF produces [I    x][I\;|\;\mathbf{x}^*].

Infinitely many solutions arise when there are free variables — columns with no pivot. Each free variable can take any real value. You parameterise the solution set: express pivot variables in terms of free variables.

The complete solution to Ax=bA\mathbf{x}=\mathbf{b} is x=xp+xh\mathbf{x} = \mathbf{x}_p + \mathbf{x}_h, where xp\mathbf{x}_p is any particular solution and xh\mathbf{x}_h is any solution to the homogeneous system Ax=0A\mathbf{x}=\mathbf{0}.

Helpful?

Rank and the rank-nullity theorem

The rank of a matrix AA is the number of pivot columns in its row echelon form — equivalently, the dimension of the column space Col(A)\text{Col}(A).

Consistency condition: Ax=bA\mathbf{x}=\mathbf{b} is consistent iff rank([A    b])=rank(A)\text{rank}([A\;|\;\mathbf{b}]) = \text{rank}(A). Adding b\mathbf{b} as a column must not create a new pivot — b\mathbf{b} must already lie in Col(A)\text{Col}(A).

Uniqueness condition: the solution is unique iff rank(A)=n\text{rank}(A)=n (no free variables).

The rank-nullity theorem: rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n. Pivot columns contribute to rank; free columns contribute to nullity. Together they account for all nn columns.

For an m×nm\times n matrix: rank(A)min(m,n)\text{rank}(A) \leq \min(m,n). You cannot have more independent directions than the smaller dimension.

Helpful?

Homogeneous systems

A homogeneous system Ax=0A\mathbf{x}=\mathbf{0} is always consistent — the trivial solution x=0\mathbf{x}=\mathbf{0} always works.

Nontrivial solutions exist iff rank(A)<n\text{rank}(A)<n — there are more unknowns than pivots, creating free variables.

The set of all solutions to Ax=0A\mathbf{x}=\mathbf{0} is the null space Null(A)\text{Null}(A), which is always a subspace of Rn\mathbb{R}^n. Its dimension (the nullity) equals the number of free variables.

A square matrix AA is invertible iff Ax=0A\mathbf{x}=\mathbf{0} has only the trivial solution iff nullity(A)=0\text{nullity}(A)=0 iff det(A)0\det(A)\neq 0. These conditions are all equivalent.

Helpful?