ConceptComplete

Row Echelon Form and Gaussian Elimination

Gaussian elimination is the fundamental algorithm of computational linear algebra. It reduces any matrix to row echelon form, from which rank, null space, and solutions to linear systems can be read off directly.


Definitions

Definition3.7Elementary row operations

The three elementary row operations on a matrix are:

  1. Row swap: Interchange two rows (RiRjR_i \leftrightarrow R_j).
  2. Row scaling: Multiply a row by a nonzero scalar (RicRiR_i \to cR_i, c0c \neq 0).
  3. Row addition: Add a scalar multiple of one row to another (RiRi+cRjR_i \to R_i + cR_j).

Each operation is invertible and corresponds to left-multiplication by an elementary matrix.

Definition3.8Row echelon form (REF)

A matrix is in row echelon form if:

  1. All zero rows are at the bottom.
  2. The leading (leftmost nonzero) entry of each nonzero row is strictly to the right of the leading entry of the row above.

The leading entries are called pivots.

Definition3.9Reduced row echelon form (RREF)

A matrix is in reduced row echelon form if it is in REF and additionally:

  1. Each pivot is 11.
  2. Each pivot is the only nonzero entry in its column.

The RREF of a matrix is unique (though the sequence of row operations to reach it is not).


Examples

ExampleRow echelon form

(231014005)\begin{pmatrix} 2 & 3 & 1 \\ 0 & -1 & 4 \\ 0 & 0 & 5 \end{pmatrix}

is in REF with pivots at positions (1,1)(1,1), (2,2)(2,2), (3,3)(3,3). Rank =3= 3.

ExampleReduced row echelon form

(100201010013)\begin{pmatrix} 1 & 0 & 0 & 2 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 3 \end{pmatrix}

is in RREF. Pivot columns: 1, 2, 3. Free column: 4.

ExampleGaussian elimination step by step

Reduce A=(131264393)A = \begin{pmatrix} 1 & 3 & 1 \\ 2 & 6 & 4 \\ 3 & 9 & 3 \end{pmatrix}:

R2R22R1R_2 \to R_2 - 2R_1: (131002393)\begin{pmatrix} 1 & 3 & 1 \\ 0 & 0 & 2 \\ 3 & 9 & 3 \end{pmatrix}.

R3R33R1R_3 \to R_3 - 3R_1: (131002000)\begin{pmatrix} 1 & 3 & 1 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{pmatrix}.

REF reached. Rank =2= 2, one free variable (x2x_2).

Continue to RREF: R212R2R_2 \to \frac{1}{2}R_2, then R1R1R2R_1 \to R_1 - R_2: (130001000)\begin{pmatrix} 1 & 3 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix}.

ExampleSolving a system via RREF

Solve: x+2y+z=4x + 2y + z = 4, 2x+4y+3z=92x + 4y + 3z = 9, x+2y+2z=6x + 2y + 2z = 6.

Augmented matrix: (121424391226)(120200120000)\begin{pmatrix} 1 & 2 & 1 & 4 \\ 2 & 4 & 3 & 9 \\ 1 & 2 & 2 & 6 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & 0 & 2 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{pmatrix}.

x1=22tx_1 = 2 - 2t, x2=tx_2 = t (free), x3=2x_3 = 2. Solution: (2,0,2)+t(2,1,0)(2, 0, 2) + t(-2, 1, 0).

ExampleInconsistent system

(111112)(111001)\begin{pmatrix} 1 & 1 & 1 \\ 1 & 1 & 2 \end{pmatrix} \to \begin{pmatrix} 1 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}.

The second row says 0=10 = 1, which is impossible. The system has no solution. A row of the form (0 0  0c)(0\ 0\ \cdots\ 0 \mid c) with c0c \neq 0 signals inconsistency.

ExampleUnique solution (full rank)

(113111)(102011)\begin{pmatrix} 1 & 1 & 3 \\ 1 & -1 & 1 \end{pmatrix} \to \begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \end{pmatrix}.

x=2x = 2, y=1y = 1. Unique solution because rank =2== 2 = number of variables.

ExampleReading rank from RREF

The rank of a matrix equals the number of pivots in any REF. The nullity equals the number of non-pivot (free) columns.

For (103001100001)\begin{pmatrix} 1 & 0 & 3 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}: rank =3= 3, nullity =43=1= 4 - 3 = 1 (column 3 is free).

ExampleNull space from RREF

For the RREF (120100130000)\begin{pmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & 3 \\ 0 & 0 & 0 & 0 \end{pmatrix}:

Free variables: x2=sx_2 = s, x4=tx_4 = t. Pivot variables: x1=2stx_1 = -2s - t, x3=3tx_3 = -3t.

Null space =span{(2,1,0,0),(1,0,3,1)}= \text{span}\{(-2, 1, 0, 0), (-1, 0, -3, 1)\}, dimension =2= 2.

ExampleRow space

The row space of AA equals the row space of any REF of AA (elementary row operations preserve the row space). The nonzero rows of the REF form a basis for the row space.

Row rank == column rank == rank of the matrix.

ExampleThe four fundamental subspaces

For AMm×n(F)A \in M_{m \times n}(F):

  1. Column space C(A)FmC(A) \subseteq F^m: dim=r\dim = r (rank)
  2. Null space N(A)FnN(A) \subseteq F^n: dim=nr\dim = n - r
  3. Row space C(AT)FnC(A^T) \subseteq F^n: dim=r\dim = r
  4. Left null space N(AT)FmN(A^T) \subseteq F^m: dim=mr\dim = m - r

These satisfy: C(A)N(AT)=FmC(A) \oplus N(A^T) = F^m and C(AT)N(A)=FnC(A^T) \oplus N(A) = F^n.

ExampleRREF is unique

Different sequences of row operations on the same matrix always produce the same RREF. This means the RREF is a canonical form for the equivalence relation "same row space." The pivot positions (and hence the rank) are invariants of the matrix.

ExampleLU factorization preview

If Gaussian elimination uses no row swaps, A=LUA = LU where LL is lower triangular (recording the multipliers) and UU is upper triangular (the REF). This LU factorization is the basis of efficient numerical linear algebra.


Computational complexity

RemarkComplexity

Gaussian elimination on an n×nn \times n matrix requires 23n3\sim \frac{2}{3}n^3 arithmetic operations. This is polynomial in nn and much faster than naive approaches (e.g., computing the determinant by cofactor expansion takes n!\sim n! operations).

RemarkLooking ahead

Row reduction is the universal tool for: computing rank, finding null spaces, solving Ax=bAx = b, computing inverses, and checking invertibility. The conditions for invertibility are systematized in the Invertible Matrix Theorem.