Femtobytes
Problem type

Reduced row echelon form of a matrix

What it solves
Reduce any matrix of up to four rows and six columns to reduced row echelon form, with every row operation worked entry by entry, and read off its rank, pivot columns and free columns.
Subject
Linear Algebra
Topic
Row reduction and systems
Also called
Gaussian elimination, rref, reduced row echelon, echelon form, row reduce
Your problem

Reduce this matrix to reduced row echelon form.

[35−4−15−1−3−3−1−215]\left[ \begin{array}{rrrr} 3 & 5 & -4 & -1 \\ 5 & -1 & -3 & -3 \\ -1 & -2 & 1 & 5 \end{array} \right]
The matrix
Rows3
Columns4
Whole numbers or fractions. Up to 4 rows and 6 columns.
Invent a new one:
The problem

Reduce this matrix to reduced row echelon form.

[35−4−15−1−3−3−1−215]\left[ \begin{array}{rrrr} 3 & 5 & -4 & -1 \\ 5 & -1 & -3 & -3 \\ -1 & -2 & 1 & 5 \end{array} \right]
The result
[35−4−15−1−3−3−1−215]  ∼  [100−9713010−5013001−13213]\left[ \begin{array}{rrrr} 3 & 5 & -4 & -1 \\ 5 & -1 & -3 & -3 \\ -1 & -2 & 1 & 5 \end{array} \right] \;\sim\; \left[ \begin{array}{rrrr} 1 & 0 & 0 & -\frac{97}{13} \\ 0 & 1 & 0 & -\frac{50}{13} \\ 0 & 0 & 1 & -\frac{132}{13} \end{array} \right]

The rank is 33. The sign ∼\sim means "can be turned into, by row operations".

checked 54 lines of this solution were evaluated with exact arithmetic before it was shown to you. A solution with a false line is never served.
Picture 1 of 2Step 1: Say what the target looks like, and which moves are allowed
The matrix we start from
3355−4-4−1-155−1-1−3-3−3-3−1-1−2-21155
Every number in its own place. Row reduction never moves a number to a different column; it only changes what the numbers ARE, using the three legal moves, until the pivots step down the matrix like a staircase and each pivot is the only number left in its column.
1

Say what the target looks like, and which moves are allowed

Why this step

Row reduction is not a bag of tricks; it is a journey to one specific destination using three legal moves. Knowing the destination precisely is what tells us, at every moment, which move to make next, so we state it before touching a number.

[35−4−15−1−3−3−1−215]\left[ \begin{array}{rrrr} 3 & 5 & -4 & -1 \\ 5 & -1 & -3 & -3 \\ -1 & -2 & 1 & 5 \end{array} \right]
The matrix we start from. It has 33 rows and 44 columns.
2

Pivot 1: column 1, row 1

Why this step

We work one column at a time, left to right. The goal for a column is a single 11 (the pivot) with zeros everywhere else in it. A column in that state says something very plain: its variable appears in exactly one equation, with nothing in front of it. Each cleared column is one variable pinned down.

Swap row 1 and row 3, to bring the entry −1-1 up to the pivot position. Swapping two equations changes nothing about what they say together.

[−1−2155−1−3−335−4−1]\left[ \begin{array}{rrrr} \boxed{-1} & -2 & 1 & 5 \\ 5 & -1 & -3 & -3 \\ 3 & 5 & -4 & -1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Multiply row 1 by −1-1, which turns the pivot −1-1 into 11. Multiplying an equation through by a number that is not zero keeps it true for exactly the same values.

columnworkingnew entry
11−1⋅(−1)-1 \cdot \left( -1 \right)11
22−1⋅(−2)-1 \cdot \left( -2 \right)22
33−1⋅1-1 \cdot 1−1-1
44−1⋅5-1 \cdot 5−5-5
Row 1, entry by entry.
[12−1−55−1−3−335−4−1]\left[ \begin{array}{rrrr} \boxed{1} & 2 & -1 & -5 \\ 5 & -1 & -3 & -3 \\ 3 & 5 & -4 & -1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Replace row 2 by R2−5R1R_{2} - 5 R_{1}. The multiplier is chosen so that the entry under attack, 55, is cancelled exactly by the pivot: 5−5⋅1=05 - 5 \cdot 1 = 0.

columnworkingnew entry
115−5⋅15 - 5 \cdot 100
22−1−5⋅2-1 - 5 \cdot 2−11-11
33−3−5⋅(−1)-3 - 5 \cdot \left( -1 \right)22
44−3−5⋅(−5)-3 - 5 \cdot \left( -5 \right)2222
Row 2, entry by entry: old entry minus the multiple of row 1.
[12−1−50−1122235−4−1]\left[ \begin{array}{rrrr} \boxed{1} & 2 & -1 & -5 \\ 0 & -11 & 2 & 22 \\ 3 & 5 & -4 & -1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Replace row 3 by R3−3R1R_{3} - 3 R_{1}. The multiplier is chosen so that the entry under attack, 33, is cancelled exactly by the pivot: 3−3⋅1=03 - 3 \cdot 1 = 0.

columnworkingnew entry
113−3⋅13 - 3 \cdot 100
225−3⋅25 - 3 \cdot 2−1-1
33−4−3⋅(−1)-4 - 3 \cdot \left( -1 \right)−1-1
44−1−3⋅(−5)-1 - 3 \cdot \left( -5 \right)1414
Row 3, entry by entry: old entry minus the multiple of row 1.
[12−1−50−112220−1−114]\left[ \begin{array}{rrrr} \boxed{1} & 2 & -1 & -5 \\ 0 & -11 & 2 & 22 \\ 0 & -1 & -1 & 14 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked
3

Pivot 2: column 2, row 2

4

Pivot 3: column 3, row 3

5

Confirm the form and read off the rank