ML Notes Mathematics Fundamentals

REF and RREF

A practical guide to Row Echelon Form (REF) and Reduced Row Echelon Form (RREF), Gaussian elimination, and solving linear systems.

Contents

Syllabus Map


What Are REF and RREF?

Row Echelon Form (REF)

A matrix is in REF if:

Reduced Row Echelon Form (RREF)

A matrix is in RREF if it is in REF and:


Elementary Row Operations

These operations preserve the solution set of a linear system:


Gaussian Elimination to REF

Step 1: Start from Augmented Matrix

For system Ax=bAx=b, write:

[Ab][A \mid b]

Step 2: Create Pivots Left to Right

Step 3: Eliminate Entries Below Each Pivot


Gauss-Jordan Elimination to RREF

Step 1: Convert REF Pivots to 1

Step 2: Eliminate Entries Above Each Pivot


Worked Example

Start with:

[1252512]\left[\begin{array}{cc|c} 1 & 2 & 5\\ 2 & 5 & 12 \end{array}\right]

To REF

Apply R2R22R1R_2 \leftarrow R_2 - 2R_1:

[125012]\left[\begin{array}{cc|c} 1 & 2 & 5\\ 0 & 1 & 2 \end{array}\right]

To RREF

Apply R1R12R2R_1 \leftarrow R_1 - 2R_2:

[101012]\left[\begin{array}{cc|c} 1 & 0 & 1\\ 0 & 1 & 2 \end{array}\right]

So solution is:

x1=1,x2=2x_1=1,\quad x_2=2

How REF/RREF Help Solve Systems

Unique Solution

Infinite Solutions

No Solution

[0  0    0c],c0[0\;0\;\cdots\;0\mid c],\quad c\ne 0

Rank from REF/RREF


Practical Notes

RREF is unique; REF is not.

Use REF for speed, RREF for readability.

In computation, prefer stable elimination.


Why This Matters for ML

← Back to Blog