Elementary Matrices and Row Operations

Suppose you are solving a linear system by Gaussian elimination. You swap rows, scale them, or add multiples of one to another. What is really happening to the matrix at each step? Every such row operation, it turns out, is nothing more than left multiplication by a specific invertible matrix. This single observation converts an entire computational technique — row reduction — into a statement in the algebra of matrix multiplication. It is the bridge between the mechanical process of elimination and the structural theory of Invertible Matrices. The idea matters because it explains why row reduction works. It explains why the solution set of a linear system is unchanged by elementary row operations. It explains why row reduction can be used to compute inverses. It also explains why the reduced row echelon form of a matrix is unique. Without this bridge, elimination looks like a bag of tricks. With it, elimination is revealed as repeatedly multiplying by invertible matrices. It is hence an instance of Matrix Multiplication as Composition of invertible linear maps. These are operations that never change the fundamental algebraic properties (rank, solution sets, column space relations) of the matrix being transformed. The big picture is this: there are exactly three types of elementary row operations. Each corresponds to a specific type of elementary matrix. That matrix is obtained by applying the operation to the identity matrix. Left-multiplying a matrix AA by an elementary matrix EE performs the corresponding row operation on AA. Elementary matrices are invertible with elementary inverses. Because of this, row-equivalence is an equivalence relation. Every matrix can be reduced to a unique canonical form by repeated left multiplication by elementary matrices. This canonical form is the reduced row echelon form (RREF). This article gives the precise definitions of the three elementary row operations and their matrices. It proves that left multiplication by an elementary matrix performs the corresponding operation. It proves that every elementary matrix is invertible. It also proves the existence and uniqueness of reduced row echelon form. Along the way we set up exactly the tools needed to later measure the Rank of a Matrix as an invariant of row-equivalence.

Key takeaways
  • Every elementary row operation on a matrix equals left multiplication by an elementary matrix obtained by applying that operation to the identity.
  • There are three types: row swap, row scaling (by a nonzero scalar), and adding a multiple of one row to another.
  • Every elementary matrix is invertible, and its inverse is again elementary (of the same type).
  • Row-equivalence of matrices (A∼BA \sim B if B=Ek⋯E1AB = E_k \cdots E_1 A for elementary EiE_i) is an equivalence relation.
  • Every matrix has a reduced row echelon form obtainable via elementary matrices, and this RREF is unique.
  • Elimination is invertible matrix algebra in disguise: solving Ax=bAx=b by row reduction never changes the solution set because it multiplies both sides by invertible matrices.
  • Key idea: row operations = left multiplication by invertible elementary matrices, so row reduction is a sequence of composed invertible linear maps.

Where this lives today

Row reduction via elementary matrices underlies LU decomposition in numerical linear algebra: factoring A=LUA = LU (or PA=LUPA = LU with a permutation matrix PP, itself a product of Type I elementary matrices) is precisely recording the elementary matrices used in Gaussian elimination without pivoting into a lower-triangular factor LL. This is the computational backbone of solving large linear systems in engineering simulation and scientific computing. In cryptography and coding theory, row reduction over finite fields (e.g. F2\mathbb F_2) computes the rank and null space of parity-check matrices for linear codes, using exactly the elementary-matrix framework developed here, since the field-independence of the proofs (only requiring c≠0c \ne 0 to be invertible in FF) makes them apply verbatim over F2\mathbb F_2 or Fp\mathbb F_p. In statistics, Gauss-Jordan elimination (reduction all the way to RRECF) is used to invert covariance and design matrices in regression analysis, and the elementary-matrix viewpoint explains why numerically stable pivoting strategies (choosing which Type I swap to perform) do not change the final answer, only the arithmetic path taken. In pure mathematics, this machinery is the direct route to computing the rank of a matrix as an invariant of row-equivalence (foreshadowing Rank of a Matrix): since RRECF is unique and elementary matrices are invertible, the number of pivots — a property manifestly preserved by left multiplication by invertible matrices — becomes a well-defined invariant of the original matrix, independent of the elimination path chosen.

Ask the tutor: How does counting the pivots in a matrix's reduced row echelon form give a rigorous, well-defined notion of the rank of a matrix?

DefinitionElementary row operations and elementary matrices

Let m,n≥1m, n \ge 1 be integers and let A∈Fm×nA \in F^{m \times n} be a matrix over a field FF, with rows R1,…,RmR_1, \dots, R_m. An elementary row operation on AA is one of the following three types.

Type I (row swap). For i≠ji \ne j, interchange rows RiR_i and RjR_j.

Type II (row scaling). For a scalar c∈Fc \in F with c≠0c \ne 0, replace RiR_i by cRicR_i.

Type III (row addition). For i≠ji \ne j and a scalar c∈Fc \in F, replace RiR_i by Ri+cRjR_i + cR_j. For each such operation there is an associated elementary matrix of size m×mm \times m: the matrix obtained by applying that same operation to the identity matrix ImI_m. Explicitly, writing eije_{ij} for the matrix with 11 in position (i,j)(i,j) and 00 elsewhere:

  • Type I: Pij=Im−eii−ejj+eij+ejiP_{ij} = I_m - e_{ii} - e_{jj} + e_{ij} + e_{ji}, the matrix obtained from ImI_m by swapping rows ii and jj.
  • Type II: Di(c)=Im+(c−1)eiiD_i(c) = I_m + (c-1)e_{ii} (that is, ImI_m with its (i,i)(i,i) entry replaced by c≠0c \ne 0).
  • Type III: Tij(c)=Im+c eijT_{ij}(c) = I_m + c\, e_{ij} for i≠ji \ne j (that is, ImI_m with a cc inserted in the off-diagonal (i,j)(i,j) position).

Two matrices A,B∈Fm×nA, B \in F^{m \times n} are called row-equivalent, written A∼BA \sim B, if BB can be obtained from AA by a finite sequence of elementary row operations.

Intuition

Think of a matrix as a stack of row vectors. A row operation rearranges or recombines these rows without ever using more than "linear combination" moves that can be undone. The three types are exactly the ways to modify a list of vectors while keeping their span unchanged: you may reorder them, rescale one by a nonzero number, or add a multiple of one to another. None of these can create a linear combination not already present, and none can destroy one — each is reversible by an operation of the same type. The key trick of this article is bookkeeping: instead of describing the operation in words, encode it as a matrix by asking "what happens to ImI_m under this same operation?" That matrix, left-multiplied onto AA, reproduces the operation on AA exactly, because matrix multiplication computes each row of the product as a linear combination of the rows of AA, with coefficients read off from the corresponding row of the left factor. This is the same principle behind Matrix Multiplication as Composition: the ii-th row of EAEA is the linear combination of rows of AA dictated by row ii of EE.

Figure
Three elementary row operations, pictured as arrows acting on a stack of rows
Type I: swap R₁, R₂ R₁ = (2, 1, 0) R₂ = (0, 3, 1) → R₁ = (0, 3, 1) R₂ = (2, 1, 0) Type II: R₂ ← 5·R₂ R₂ = (0, 3, 1) → R₂ = (0,15, 5) Type III: R₁ ← R₁ + (−2)R₂ R₁=(2,1,0), R₂=(0,3,1) → R₁ = (2, −5, −2)

Central results

TheoremRow operations are left multiplication by elementary matrices

Let A∈Fm×nA \in F^{m \times n} and let EE be the m×mm \times m elementary matrix obtained by applying a given elementary row operation to ImI_m. Then EAEA is the matrix obtained from AA by applying that same row operation to AA.

Proof

We use the fact that for matrices E∈Fm×mE \in F^{m\times m} and A∈Fm×nA \in F^{m \times n}, the ii-th row of EAEA equals

(EA)i,∙=∑k=1mEikAk,∙,(EA)_{i,\bullet} = \sum_{k=1}^m E_{ik} A_{k,\bullet},

i.e., the ii-th row of the product is the linear combination of the rows of AA whose coefficients are the entries of row ii of EE. This is immediate from the definition of matrix multiplication: entry (i,j)(i,j) of EAEA is ∑kEikAkj\sum_k E_{ik}A_{kj}, and collecting this over all jj for fixed ii gives exactly the stated linear combination of the row vectors Ak,∙A_{k,\bullet}. We check each type.

Type I. Let E=PijE = P_{ij}, obtained from ImI_m by swapping rows ii and jj (i≠ji \ne j). Then row ii of PijP_{ij} is ejTe_j^T (the standard basis row with a 11 in position jj) and row jj of PijP_{ij} is eiTe_i^T; every other row k≠i,jk \ne i,j of PijP_{ij} equals ekTe_k^T. By the row-combination formula above:

  • row ii of PijAP_{ij}A equals ejT⋅[rows of A]=Aj,∙e_j^T \cdot [\text{rows of } A] = A_{j,\bullet},
  • row jj of PijAP_{ij}A equals eiT⋅[rows of A]=Ai,∙e_i^T \cdot [\text{rows of } A] = A_{i,\bullet},
  • row kk of PijAP_{ij}A equals Ak,∙A_{k,\bullet} for k≠i,jk \ne i,j.

Hence PijAP_{ij}A is exactly AA with rows ii and jj swapped, which is the Type I operation applied to AA.

Type II. Let E=Di(c)E = D_i(c) (c≠0c \ne 0), obtained from ImI_m by replacing row ii with c eiTc\, e_i^T; every other row k≠ik \ne i of Di(c)D_i(c) equals ekTe_k^T. Then row ii of Di(c)AD_i(c)A equals c eiT⋅[rows of A]=cAi,∙c\, e_i^T \cdot [\text{rows of }A] = cA_{i,\bullet}, and row kk of Di(c)AD_i(c)A equals Ak,∙A_{k,\bullet} for k≠ik \ne i. Hence Di(c)AD_i(c)A is AA with row ii scaled by cc, which is the Type II operation applied to AA.

Type III. Let E=Tij(c)E = T_{ij}(c) (i≠ji \ne j), obtained from ImI_m by adding cc times row jj to row ii: explicitly row ii of Tij(c)T_{ij}(c) is eiT+c ejTe_i^T + c\, e_j^T, and every other row k≠ik \ne i equals ekTe_k^T. Then row ii of Tij(c)AT_{ij}(c)A equals (eiT+c ejT)⋅[rows of A]=Ai,∙+cAj,∙(e_i^T + c\,e_j^T)\cdot[\text{rows of }A] = A_{i,\bullet} + cA_{j,\bullet}, and row kk of Tij(c)AT_{ij}(c)A equals Ak,∙A_{k,\bullet} for k≠ik \ne i. Hence Tij(c)AT_{ij}(c)A is AA with row ii replaced by Ri+cRjR_i + cR_j, which is the Type III operation applied to AA. In all three cases EAEA equals AA with the corresponding elementary row operation applied. ■\blacksquare

∎
LemmaEvery elementary matrix is invertible, with elementary inverse of the same type

Let EE be an m×mm \times m elementary matrix. Then EE is invertible and E−1E^{-1} is an elementary matrix of the same type. Specifically:

Pij−1=Pij,Di(c)−1=Di(c−1),Tij(c)−1=Tij(−c).P_{ij}^{-1} = P_{ij}, \qquad D_i(c)^{-1} = D_i(c^{-1}), \qquad T_{ij}(c)^{-1} = T_{ij}(-c).
Proof

By the previous theorem (row operations are left multiplication by elementary matrices), left-multiplying by EE performs an elementary row operation, and every elementary row operation is reversible by another elementary row operation of the same type:

  • Swapping rows i,ji,j twice returns AA to itself: applying Type I with the same (i,j)(i,j) undoes Type I.
  • Scaling row ii by c≠0c \ne 0 then by c−1c^{-1} (valid since c≠0c \ne 0 in the field FF) returns row ii to its original value.
  • Replacing RiR_i by Ri+cRjR_i + cR_j and then replacing the new RiR_i by Ri+(−c)RjR_i + (-c)R_j returns row ii to its original value, since row jj is untouched throughout.

Apply this reasoning with A=ImA = I_m. Applying the Type I operation for indices (i,j)(i,j) to ImI_m gives PijP_{ij}; applying it again to PijP_{ij} returns ImI_m. By the theorem, applying an operation to a matrix AA equals left-multiplying by the corresponding elementary matrix, so applying Type I twice to ImI_m equals Pij(PijIm)=PijPijP_{ij}(P_{ij} I_m) = P_{ij}P_{ij}. Since this returns ImI_m, we get PijPij=ImP_{ij}P_{ij} = I_m, so PijP_{ij} is its own inverse. Similarly, applying Di(c)D_i(c) to ImI_m gives Di(c)D_i(c), and then applying the reverse scaling operation (scale row ii by c−1c^{-1}) to Di(c)D_i(c) gives ImI_m; the reverse operation is left multiplication by Di(c−1)D_i(c^{-1}), so Di(c−1)Di(c)=ImD_i(c^{-1})D_i(c) = I_m. Since Di(c)Di(c−1)=ImD_i(c)D_i(c^{-1}) = I_m as well (scaling by cc then c−1c^{-1} in either order returns to the start, by direct entrywise computation on the diagonal matrix), Di(c)D_i(c) is invertible with inverse Di(c−1)D_i(c^{-1}). Finally, applying Tij(c)T_{ij}(c) to ImI_m gives Tij(c)T_{ij}(c), and applying the reverse addition operation (add −c-c times row jj to row ii) undoes it, giving ImI_m; this reverse operation is left multiplication by Tij(−c)T_{ij}(-c). Hence Tij(−c)Tij(c)=ImT_{ij}(-c)T_{ij}(c) = I_m. A direct computation confirms Tij(c)Tij(−c)=ImT_{ij}(c)T_{ij}(-c) = I_m as well: both are Im+cEijI_m + cE_{ij} and Im−cEijI_m - cE_{ij} types (using matrix units EijE_{ij} satisfying EijEij=0E_{ij}E_{ij} = 0 since i≠ji \ne j), so

(Im+cEij)(Im−cEij)=Im−cEij+cEij−c2EijEij=Im−c2⋅0=Im.(I_m + cE_{ij})(I_m - cE_{ij}) = I_m - cE_{ij} + cE_{ij} - c^2 E_{ij}E_{ij} = I_m - c^2\cdot 0 = I_m.

Thus Tij(c)T_{ij}(c) is invertible with inverse Tij(−c)T_{ij}(-c). In every case E−1E^{-1} exists and is elementary of the same type. ■\blacksquare

∎
CorollaryRow-equivalence is an equivalence relation

For A,B∈Fm×nA, B \in F^{m\times n}, define A∼BA \sim B if B=EkEk−1⋯E1AB = E_k E_{k-1}\cdots E_1 A for some finite sequence of elementary matrices E1,…,EkE_1,\dots,E_k (equivalently, BB is obtained from AA by a finite sequence of elementary row operations, by the theorem above). Then ∼\sim is an equivalence relation on Fm×nF^{m \times n}.

Proof

Reflexivity. A=ImAA = I_m A, and ImI_m is (vacuously, or by convention) the empty product of elementary matrices; so A∼AA \sim A.

Symmetry. If B=Ek⋯E1AB = E_k \cdots E_1 A with each EiE_i elementary, then since each EiE_i is invertible with elementary inverse Ei−1E_i^{-1} by the Lemma above, we have

A=E1−1E2−1⋯Ek−1B,A = E_1^{-1} E_2^{-1} \cdots E_k^{-1} B,

which exhibits AA as obtained from BB by a finite sequence of elementary matrices (Ek−1E_k^{-1} first, ..., E1−1E_1^{-1} last). Hence B∼AB \sim A.

Transitivity. If B=Ek⋯E1AB = E_k\cdots E_1 A and C=Fl⋯F1BC = F_l \cdots F_1 B for elementary matrices Ei,FjE_i, F_j, then

C=Fl⋯F1Ek⋯E1A,C = F_l \cdots F_1 E_k \cdots E_1 A,

a product of elementary matrices applied to AA, so A∼CA \sim C. All three properties hold, so ∼\sim is an equivalence relation. ■\blacksquare

∎
TheoremExistence and uniqueness of reduced row echelon form

Every matrix A∈Fm×nA \in F^{m \times n} is row-equivalent to exactly one matrix R∈Fm×nR \in F^{m \times n} in reduced row echelon form (RREF), meaning RR satisfies: 1. Every row of RR that consists entirely of zeros lies below every nonzero row. 2. In each nonzero row, the first (leftmost) nonzero entry, called the pivot, equals 11. 3. Each pivot lies strictly to the right of the pivot in the row above it. 4. Each pivot column has 00 in every entry other than the pivot itself.

Proof

Existence. We argue by induction on the number of columns nn. Base case n=0n = 0: the unique m×0m \times 0 matrix is vacuously in RREF. Inductive step: Suppose every matrix with fewer than nn columns can be row-reduced to RREF using elementary row operations. Let AA have nn columns. Consider the leftmost column of AA, say column c1c_1, that contains a nonzero entry (if no such column exists, AA is the zero matrix, already in RREF). Suppose the nonzero entry is in row rr, i.e., Ar,c1≠0A_{r,c_1}\ne0. Apply a Type I operation (row swap E=P1rE = P_{1r}, or the identity if r=1r=1) to move this row to the top: this produces a matrix with nonzero entry in position (1,c1)(1,c_1). Apply a Type II operation D1(A1,c1−1)D_1(A_{1,c_1}^{-1}) to scale row 11 so its (1,c1)(1,c_1) entry becomes 11 (valid since A1,c1≠0A_{1,c_1} \ne 0 is invertible in the field FF). Then, for each row i≠1i \ne 1 with a nonzero entry aa in column c1c_1, apply the Type III operation Ti,1(−a)T_{i,1}(-a) to clear it. After these steps, column c1c_1 has a single 11 in row 11 and 00 elsewhere; call the resulting matrix A′A', obtained from AA by finitely many elementary row operations, hence A∼A′A \sim A'. Let A′′A'' be the submatrix of A′A' formed by rows 2,…,m2,\dots,m and columns c1+1,…,nc_1+1,\dots,n; this has fewer than nn columns (indeed n−c1<nn - c_1 < n since c1≥1c_1 \ge 1). By the inductive hypothesis, A′′A'' is row-equivalent, via elementary row operations acting on rows 2,…,m2,\ldots,m restricted to those columns, to a matrix R′′R'' in RREF. Performing the corresponding row operations on rows 2,…,m2,\dots,m of the full matrix A′A' (leaving row 11 and columns 1,…,c11,\dots,c_1 untouched, since these operations only add multiples of rows 2,…,m2,\dots,m to each other, scale them, or swap them — never touching row 11) transforms A′A' into a matrix R′R' whose submatrix on rows 2,…,m2,\ldots,m, columns c1+1,…,nc_1+1,\ldots,n is R′′R'', and whose columns 1,…,c11,\ldots,c_1 are unchanged from A′A' (in particular column c1c_1 is still the standard basis vector e1e_1, since operations restricted to rows 2,…,m2,\ldots,m leave a column that is already zero in those rows unchanged, and leave row 11 untouched). It remains to clear any nonzero entries appearing above a pivot introduced in the recursive step, in order to satisfy condition (4) for the newly created pivot columns from R′′R''. Each pivot in R′′R'', lying in some row i≥2i \ge 2 and column c≥c1+1c \ge c_1+1, has entry 11 there and 00 in that column for all other rows 2,…,m2,\ldots,m (by R′′R'' being in RREF, condition 4, applied within rows 2,…,m2,\ldots,m). If row 11 has a nonzero entry bb in that pivot column, apply the Type III operation T1,i(−b)T_{1,i}(-b) to clear it; this does not disturb column c1c_1 (still e1e_1) nor any other already-cleared pivot column, since row ii has zero entries in all columns to the left of cc except column c1c_1 where it is already 00, and zero entries in all other already-processed pivot columns (by induction, R′′R'''s pivot columns are cleared amongst rows 2,…,m2,\ldots,m, and row ii's only nonzero entries in columns ≤c\le c are the pivot at cc itself, given RREF conditions 3–4 for R′′R''). Performing this clearing for each pivot column of R′′R'', in order from left to right, yields a matrix RR satisfying all four RREF conditions, and RR is obtained from AA by a finite sequence of elementary row operations, so A∼RA \sim R. This completes the induction, proving existence of an RREF for every AA.

Uniqueness. Suppose RR and SS are both in RREF and A∼RA \sim R, A∼SA \sim S. By the corollary above (row-equivalence is an equivalence relation), R∼SR \sim S, so there is an invertible matrix EE (a product of elementary matrices) with S=ERS = ER. We show R=SR = S by proving that RRECF is determined by the linear-algebraic data of AA alone, which is preserved under left multiplication by an invertible matrix, using the following two facts, each of which we justify. Fact 1: left multiplication by an invertible matrix EE preserves the set of solutions x∈Fnx \in F^n to Mx=0Mx = 0. Indeed Mx=0  ⟺  EMx=0Mx = 0 \iff EMx = 0, since EE invertible implies EMx=0⇒Mx=E−1EMx=E−10=0EMx=0 \Rightarrow Mx = E^{-1}EMx = E^{-1}0=0, and conversely Mx=0⇒EMx=0Mx=0\Rightarrow EMx=0. Hence RR and S=ERS = ER have the same solution set to Rx=0Rx=0 and Sx=0Sx=0 respectively — indeed the same set, since these are the same equation up to left-multiplying by EE: {x:Sx=0}={x:ERx=0}={x:Rx=0}\{x : Sx=0\} = \{x: ERx=0\} = \{x: Rx = 0\}. Fact 2: left multiplication by an invertible matrix EE preserves, for every subset of column indices {j1,…,jk}\{j_1,\dots,j_k\}, whether the corresponding columns of MM are linearly dependent, and preserves the coefficients of any dependence. Indeed if M∙j1,…,M∙jkM_{\bullet j_1},\ldots,M_{\bullet j_k} are columns of MM with ∑tλtM∙jt=0\sum_t \lambda_t M_{\bullet j_t} = 0, then multiplying by EE gives ∑tλt(EM)∙jt=0\sum_t \lambda_t (EM)_{\bullet j_t} = 0 with the same coefficients λt\lambda_t (since EE acts on columns of MM exactly as it acts on any vector, by linearity: E(∑tλtM∙jt)=∑tλt(EM∙jt)E\left(\sum_t \lambda_t M_{\bullet j_t}\right) = \sum_t \lambda_t (E M_{\bullet j_t}), and EM∙jt=(EM)∙jtEM_{\bullet j_t} = (EM)_{\bullet j_t}). Since EE is invertible this correspondence of dependence relations is exact (reversible using E−1E^{-1}). Now we determine the pivot columns of an RRECF matrix RR purely from these two data (solution sets and column dependencies), which are shared by RR and SS since S=ERS = ER with EE invertible. Claim: column jj of RR is a pivot column if and only if column jj of RR is not a linear combination of the columns of RR strictly to its left. If column jj is a pivot column, it is the standard basis vector eie_i for the row ii of that pivot (by RREF conditions 2,4), and no column strictly to the left of jj has a nonzero entry in row ii (by RRECF condition 3: any pivot in a row above ii occurs strictly left of jj's column only among columns left of jj, contributing to rows above ii, and condition 1 makes rows below the last pivot row zero; more directly, since RR is in echelon form, the pivot at (i,j)(i,j) is the first nonzero entry of row ii, so every column left of jj has 00 in row ii, hence any combination of them has 00 in coordinate ii, whereas column jj has 11 there) — so eie_i cannot be written as such a combination. Conversely if column jj is not a pivot column, then (by the echelon structure) it lies weakly to the right of some pivot column(s) whose pivot rows cover every nonzero entry appearing in column jj: precisely, writing column jj's nonzero entries as occurring only in rows that are pivot rows for columns ≤j\le j (an immediate consequence of the echelon conditions 1–3, since row ii can have a nonzero entry in column jj only if row ii's pivot column is ≤j\le j, otherwise the leftmost nonzero entry of row ii would occur to the right of jj, contradicting a nonzero entry at column j<j< pivot column), column jj is exactly the linear combination of the pivot columns at or before jj with coefficients equal to its own entries in those pivot rows (again since each pivot column is a standard basis vector). This claim characterizes the pivot columns of RR via Fact 2's invariant (linear dependence on columns to the left), so RR and SS have pivot columns in the identical set of positions j1<j2<⋯<jkj_1 < j_2 < \cdots < j_k. Next, for each pivot column jtj_t, both RR and SS restricted to that column equal ete_t (the tt-th standard basis vector), by RRECF condition 2 and 4 together with condition 3 (pivots occur in strictly increasing rows as columns increase, and since j1<⋯<jkj_1 < \cdots < j_k are the pivot columns in order, the pivot rows must be 1,2,…,k1,2,\ldots,k respectively — the only way to satisfy strict monotonicity starting from row ≥1\ge 1, using also that rows above the first pivot row cannot exist by condition 1). So RR and SS agree exactly on all pivot columns. Finally, for a non-pivot column jj, both R∙jR_{\bullet j} and S∙jS_{\bullet j} are the unique linear combination of the pivot columns at or before jj reproducing that column's entries in the pivot rows (as shown in the Claim's converse direction) — and since R,SR,S agree on all pivot columns and (by Fact 2, applied to the specific set of columns {j1,…,jt,j}\{j_1,\ldots,j_t,j\} where jtj_t is the last pivot column ≤j\le j) the coefficients of the dependence of column jj on the earlier pivot columns are shared between RR and SS, the non-pivot columns of RR and SS coincide as well. Hence R=SR = S column by column, proving uniqueness. ■\blacksquare

∎

Worked examples

Example 1 — writing elimination as an explicit product of elementary matrices. Let

A=(24−249−3−2−37).A = \begin{pmatrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{pmatrix}.

We row-reduce AA and track every elementary matrix used. Step 1. Scale row 11 by 12\tfrac12: E1=D1(12)E_1 = D_1(\tfrac12).

E1A=(12−149−3−2−37).E_1 A = \begin{pmatrix} 1 & 2 & -1 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{pmatrix}.

Step 2. Clear column 11 below the pivot: R2←R2−4R1R_2 \leftarrow R_2 - 4R_1, i.e. E2=T21(−4)E_2 = T_{21}(-4).

E2E1A=(12−1011−2−37).E_2 E_1 A = \begin{pmatrix} 1 & 2 & -1 \\ 0 & 1 & 1 \\ -2 & -3 & 7 \end{pmatrix}.

Step 3. R3←R3+2R1R_3 \leftarrow R_3 + 2R_1, i.e. E3=T31(2)E_3 = T_{31}(2).

E3E2E1A=(12−1011015).E_3 E_2 E_1 A = \begin{pmatrix} 1 & 2 & -1 \\ 0 & 1 & 1 \\ 0 & 1 & 5 \end{pmatrix}.

Step 4. Clear column 22 below the pivot: R3←R3−R2R_3 \leftarrow R_3 - R_2, i.e. E4=T32(−1)E_4 = T_{32}(-1).

E4E3E2E1A=(12−1011004).E_4E_3E_2E_1 A = \begin{pmatrix} 1 & 2 & -1 \\ 0 & 1 & 1 \\ 0 & 0 & 4 \end{pmatrix}.

Step 5. Scale row 33: E5=D3(14)E_5 = D_3(\tfrac14).

E5E4E3E2E1A=(12−1011001).E_5E_4E_3E_2E_1 A = \begin{pmatrix} 1 & 2 & -1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}.

Step 6. Clear column 33 above the pivot: R2←R2−R3R_2 \leftarrow R_2 - R_3 (E6=T23(−1)E_6 = T_{23}(-1)), then R1←R1+R3R_1 \leftarrow R_1 + R_3 (E7=T13(1)E_7 = T_{13}(1)):

E7E6E5E4E3E2E1A=(120010001).E_7E_6E_5E_4E_3E_2E_1 A = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}.

Step 7. Clear column 22 above the pivot: R1←R1−2R2R_1 \leftarrow R_1 - 2R_2, E8=T12(−2)E_8 = T_{12}(-2):

R:=E8E7E6E5E4E3E2E1A=I3.R := E_8E_7E_6E_5E_4E_3E_2E_1 A = I_3.

So AA is row-equivalent to I3I_3 (its RREF is I3I_3), and setting E=E8E7E6E5E4E3E2E1E = E_8E_7E_6E_5E_4E_3E_2E_1 (a product of 88 elementary matrices, each invertible by the Lemma), we get EA=I3EA = I_3, so E=A−1E = A^{-1}. This exhibits the standard fact that row-reducing AA to II while performing the identical operations on II simultaneously computes A−1A^{-1} — because that parallel bookkeeping is exactly accumulating the product EE. As a check: det⁡A=2(9⋅7−(−3)(−3))−4(4⋅7−(−3)(−2))+(−2)(4⋅(−3)−9⋅(−2))=2(63−9)−4(28−6)+(−2)(−12+18)=2(54)−4(22)−2(6)=108−88−12=8≠0\det A = 2(9\cdot7 - (-3)(-3)) - 4(4\cdot7-(-3)(-2)) + (-2)(4\cdot(-3)-9\cdot(-2)) = 2(63-9)-4(28-6)+(-2)(-12+18) = 2(54)-4(22)-2(6) = 108-88-12=8 \ne 0, consistent with AA being invertible (RREF =I= I).

Example 2 — a matrix whose RREF has a free column, illustrating non-invertible reduction. Let

B=(121324043628)∈R3×4.B = \begin{pmatrix} 1 & 2 & 1 & 3 \\ 2 & 4 & 0 & 4 \\ 3 & 6 & 2 & 8 \end{pmatrix} \in \mathbb{R}^{3\times 4}.

Step 1. R2←R2−2R1R_2 \leftarrow R_2 - 2R_1 (T21(−2)T_{21}(-2)), R3←R3−3R1R_3 \leftarrow R_3 - 3R_1 (T31(−3)T_{31}(-3)):

(121300−2−200−1−1).\begin{pmatrix} 1 & 2 & 1 & 3 \\ 0 & 0 & -2 & -2 \\ 0 & 0 & -1 & -1 \end{pmatrix}.

Step 2. Column 22 has no nonzero entry below row 11 — it is not a pivot column. Move to column 33: scale row 22 by −12-\tfrac12 (D2(−12)D_2(-\tfrac12)):

(1213001100−1−1).\begin{pmatrix} 1 & 2 & 1 & 3 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & -1 & -1 \end{pmatrix}.

Step 3. R3←R3+R2R_3 \leftarrow R_3 + R_2 (T32(1)T_{32}(1)):

(121300110000).\begin{pmatrix} 1 & 2 & 1 & 3 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{pmatrix}.

Step 4. Clear column 33 above its pivot: R1←R1−R2R_1 \leftarrow R_1 - R_2 (T12(−1)T_{12}(-1)):

R=(120200110000).R = \begin{pmatrix} 1 & 2 & 0 & 2 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{pmatrix}.

This RR satisfies all four RRECF conditions: pivots in columns 1,31,3, each equal to 11, each pivot column clear elsewhere, pivot columns strictly increasing left to right, and the zero row at the bottom. Columns 22 and 44 are non-pivot ("free") columns, and indeed column 2=2×(column 1)2 = 2\times(\text{column }1) and column 4=2×(column 1)+1×(column 3)4 = 2\times(\text{column }1) + 1\times(\text{column }3) — exactly the phenomenon described in the uniqueness proof, where non-pivot columns are forced linear combinations of earlier pivot columns.

Why the hypotheses are needed

CounterexampleDropping "c≠0c \ne 0" in Type II breaks invertibility of the elementary matrix

The Type II operation is defined only for nonzero scalars cc. Suppose we relax this and allow c=0c = 0, defining Di(0)D_i(0) as the matrix obtained from ImI_m by replacing row ii with the zero row. Take m=2m=2, i=1i=1: D1(0)=(0001)D_1(0) = \begin{pmatrix} 0 & 0 \\ 0 & 1\end{pmatrix}. This matrix is not invertible: det⁡D1(0)=0⋅1−0⋅0=0\det D_1(0) = 0\cdot 1 - 0\cdot 0 = 0. Concretely, for

A=(1234),D1(0)A=(0034),A = \begin{pmatrix} 1 & 2 \\ 3 & 4\end{pmatrix}, \qquad D_1(0)A = \begin{pmatrix} 0 & 0 \\ 3 & 4 \end{pmatrix},

which has lost all information in row 11 of AA: there is no way to recover AA from D1(0)AD_1(0)A, since infinitely many matrices (any choice of row 11) map to the same product. Hence the Lemma (every elementary matrix is invertible) fails outright, and with it the entire apparatus: row-equivalence via D1(0)D_1(0) would not be symmetric (we could reach D1(0)AD_1(0)A from AA, but not conversely, in general), breaking the equivalence-relation corollary and undermining uniqueness of RRECF (a "row operation" of this illegitimate type could turn two different matrices into the same output, so tracking back to a canonical form would not correspond to a well-defined inverse chain of operations). This is exactly why Type II operations require c≠0c \ne 0: it is precisely the hypothesis that makes Di(c)D_i(c) invertible.

Scope, edge cases & common traps

SituationWhat holdsWhat can go wrong if ignored
Field FF with char(F)≠0\mathrm{char}(F) \ne 0 (e.g. F2\mathbb F_2)All results hold verbatim; "c≠0c\ne0" still means nonzero in FFNone — the proofs use only field axioms, not characteristic zero
m≠nm \ne n (non-square AA)RRECF existence/uniqueness theorem applies as statedConfusing RRECF with invertibility: non-square matrices are never invertible, but still have unique RRECF
Column operations instead of rowNot covered by this theoremLeft-multiplication does rows; right-multiplication by an elementary matrix performs the analogous column operation — mixing the two is a common error
Zero matrixRRECF of the m×nm\times n zero matrix is itselfVacuous but must be checked in the induction base case for existence
Using RRECF-uniqueness to conclude "the sequence of row ops is unique"False — only the final RRECF is uniqueMany different sequences of operations reach the same RRECF; the theorem never claims uniqueness of the path

The mathematician behind it

Origins · 1 minCarl Friedrich Gauss and how this was discovered
CF
Carl Friedrich Gauss
1777–1855 · early 19th-century Germany, geodesy and celestial mechanics

Gauss developed the systematic elimination technique bearing his name while working on least-squares methods for astronomical and geodetic calculations, formalizing an approach that had appeared in earlier Chinese mathematical texts (the Nine Chapters on the Mathematical Art) but lacked the systematic matrix-theoretic framing given later. The recognition that elimination corresponds precisely to multiplication by invertible matrices belongs to the broader development of matrix algebra in the work of Cayley and subsequent 19th- and 20th-century algebraists who built the linear-algebraic language in which "elementary matrix" became a precise object.

History
- 1809 — Gauss publishes elimination methods for solving normal equations arising in orbit determination.
- 1858 — Arthur Cayley's Memoir on the Theory of Matrices establishes matrix multiplication and the algebra of matrices as objects in their own right.
- 1888 — Giuseppe Peano gives an axiomatic treatment of vector spaces, providing the setting in which row operations are properly linear-algebraic.
- 1955 — Textbook treatments (e.g., Halmos, and later Hoffman–Kunze) formalize "elementary matrix" as the standard tool linking Gaussian elimination to invertibility.
- 20th century (ongoing) — Elementary matrices become foundational in numerical linear algebra (LU decomposition) and computer algebra systems for exact rational row reduction.
Why does left multiplication (not right multiplication) correspond to row operations?

Matrix multiplication computes each row of a product EAEA as a linear combination of the rows of AA, with coefficients taken from the corresponding row of EE: entry (i,j)(i,j) of EAEA is ∑kEikAkj\sum_k E_{ik}A_{kj}, so row ii of EAEA is ∑kEik⋅(row k of A)\sum_k E_{ik} \cdot (\text{row } k \text{ of } A). This is inherently a "row" operation because it recombines the rows of AA. Right multiplication AFAF instead computes each column of AFAF as a linear combination of the columns of AA, so it performs the analogous column operations. The asymmetry comes directly from how the summation index sits in the matrix product formula, not from any special convention.

Is the reduced row echelon form the same over every field?

The definition and both existence and uniqueness proofs use only field axioms — the ability to divide by nonzero elements (for scaling to make pivots equal to 11) and standard arithmetic. Hence RRECF exists and is unique over any field, including finite fields like F2\mathbb F_2 or Fp\mathbb F_p, and the complex numbers C\mathbb C. The specific entries of the RRECF will of course depend on the field's arithmetic (e.g., 12\tfrac12 means something different in F5\mathbb F_5 than in Q\mathbb Q), but the structural conditions (pivot positions, uniqueness) are field-independent.

Does every matrix reduce to the identity matrix?

No — only square invertible matrices reduce to the identity. A non-square matrix, or a square matrix with linearly dependent rows, will have an RRECF with at least one zero row (if m>rankm > \mathrm{rank}) or fewer pivot columns than columns (if the matrix is not injective as a linear map), as illustrated in Worked Example 2. The RRECF equals InI_n precisely when AA is n×nn \times n and invertible — this is in fact a standard characterization of invertibility.

How does this connect to solving linear systems Ax=bAx = b?

If EE is a product of elementary matrices reducing AA to RRECF RR, then Ax=b  ⟺  EAx=Eb  ⟺  Rx=EbAx=b \iff EAx = Eb \iff Rx = Eb, because EE is invertible (multiplying both sides by an invertible matrix preserves the solution set exactly, by the same argument used in the uniqueness proof). So row-reducing the augmented matrix [A∣b][A \mid b] to [R∣Eb][R \mid Eb] never changes the solution set, and reading off solutions from the simpler system Rx=EbRx = Eb is legitimate. This is the theoretical justification for why Gaussian/Gauss-Jordan elimination correctly solves linear systems.

Are elementary matrices always square?

Yes. An elementary matrix acting on A∈Fm×nA \in F^{m\times n} by left multiplication must be m×mm \times m, since it operates on the mm rows of AA and matrix multiplication requires the number of columns of EE to match the number of rows of AA. The size of the elementary matrix is always determined by the number of rows of the matrix it acts on, regardless of how many columns that matrix has.

What is the difference between "row echelon form" (REF) and "reduced row echelon form" (RRECF)?

Row echelon form only requires conditions (1)–(3): zero rows at the bottom, pivots strictly increasing left to right down the rows, but without requiring pivots to equal 11 or requiring entries above a pivot to be zero. RRECF additionally requires condition (2) (pivots normalized to 11) and condition (4) (pivot columns cleared both above and below). REF is not unique — many different echelon forms can arise from different elimination orders — while RRECF is unique, which is precisely the content of the uniqueness half of the theorem proved here.

Can elementary row operations change the column space or rank of a matrix?

Row operations can change the column space as a specific subspace of FmF^m (since they mix the coordinates), but they preserve the dimension of the column space, i.e. the rank, because they are left multiplications by invertible matrices, which are bijective linear maps and hence preserve dimensions of images under composition. This dimension-preservation is exactly what allows rank to be computed via RRECF (counting pivots), foreshadowing the treatment of Rank of a Matrix as a row-equivalence invariant.

Before this