MAT240H1/Unit 07
Unit 07 · Algebra I

Systems & Elementary Operations

Row reduction is the computational workhorse of the course — it reveals rank, solves systems, and inverts matrices, all with the same three elementary moves. The theory explains why the moves are legal: each one is multiplication by an invertible matrix.

By the end you can
Why it matters & where it comes from
Why it exists

Almost every question so far — independence, span, rank, invertibility — reduces to solving a linear system. Row reduction is the one algorithm that answers them all.

In the real world

Gaussian elimination is among the most-executed algorithms on Earth — the engine inside solvers for engineering, economics, and scientific computing, and (with pivoting) the core of numerical linear algebra libraries.

Story & open questions

Versions of elimination appear in the Chinese Nine Chapters two thousand years ago; Gauss systematized it for astronomy. The exact complexity of matrix computation is still open — the true exponent of matrix multiplication is unknown.

The three moves, and why they are legal

Definition Elementary row operations

(1) swap two rows; (2) multiply a row by a nonzero scalar; (3) add a multiple of one row to another. An elementary matrix is the result of one such move applied to $I$; performing the move on $A$ is the same as computing $EA$.

Theorem

Every elementary matrix is invertible, and its inverse is elementary (undo the move). Consequently row operations change neither the solution set of $Ax=0$ nor the rank — they replace $A$ by $EA$ with $E$ invertible.

Why solutions survive If $Ax=0$ then $(EA)x=E0=0$; if $(EA)x=0$ then $Ax=E^{-1}0=0$. Same null space, both directions — that is the entire justification for elimination, and it needs $E$ invertible, which is why "multiply a row by $0$" is forbidden.

Echelon form, rank, and solving

Definition

A matrix is in reduced row echelon form (RREF) when each nonzero row starts with a leading $1$, each leading $1$ sits strictly to the right of the one above, and each leading $1$ is the only nonzero entry in its column. Every matrix has a unique RREF; the number of leading $1$s is its rank.

Theorem Consistency and freedom

$Ax=b$ is consistent iff $\operatorname{rank}(A)=\operatorname{rank}(A\,|\,b)$ — a pivot in the augmented column is the contradiction $0=1$. When consistent, the solutions have $n-\operatorname{rank}(A)$ free parameters: one particular solution plus the null space.

Example Solve a system

$x+2y=5$,   $3x+4y=11$.

Row-reduce $\left(\begin{smallmatrix}1&2&5\\3&4&11\end{smallmatrix}\right)$: subtract $3\times$ row 1 to get $(0,-2,-4)$, i.e. $y=2$; back-substitute $x=5-2y=1$.
Rank $2$, no free variables — the unique solution is $(1,2)$. ✓ (Check: $3\cdot1+4\cdot2=11$.)
Corollary Wide homogeneous systems

A homogeneous system with more unknowns than equations has a nontrivial solution: rank $\le$ number of equations $<$ number of unknowns, so a free variable exists. (This is the engine inside the Replacement Theorem of Unit 3.)

Inverting a matrix

Theorem The $[A\,|\,I]$ algorithm

$A$ is invertible iff its RREF is $I$. In that case the row operations carrying $A$ to $I$ carry $I$ to $A^{-1}$ — because $E_k\cdots E_1A=I$ means $A^{-1}=E_k\cdots E_1$, which is exactly what lands on the right half of $[A\,|\,I]$.

Example

$A=\left(\begin{smallmatrix}1&2\\3&4\end{smallmatrix}\right)$: reducing $[A\,|\,I]$ gives $A^{-1}=\left(\begin{smallmatrix}-2&1\\3/2&-1/2\end{smallmatrix}\right)$.

Check: $AA^{-1}= \left(\begin{smallmatrix}-2+3&1-1\\-6+6&3-2\end{smallmatrix}\right)=I$. ✓ (For $2\times2$, this matches the shortcut: swap the diagonal, negate the off-diagonal, divide by $\det A=-2$.)
Common pitfalls

• Scaling a row by $0$ is not a row operation — it destroys information and has no inverse.
• For $Ax=b$, row-reduce the augmented matrix; operating on $A$ alone loses $b$'s bookkeeping.
• "No free variables" needs a pivot in every column of $A$, not every row.
• Over $\mathbb{Z}_p$ the same algorithm runs verbatim — just divide using modular inverses.

Practice

Original problems written for this guide in the style of Friedberg, Insel & Spence exercises. Write a full solution before opening the answer.

Practice 1 · Solve

Solve $x+2y=5$, $3x+4y=11$ by row reduction.

Solution
Eliminating gives $-2y=-4$, so $y=2$, then $x=1$. Unique solution $(1,2)$.
Practice 2 · Rank

Find the rank of $\left(\begin{smallmatrix}1&2&3\\2&4&6\\1&1&1\end{smallmatrix}\right)$.

Solution
Row 2 is twice row 1 and dies; row 3 is not a multiple of row 1. Two nonzero rows remain: rank $2$.
Practice 3 · Free variables

A homogeneous system has $3$ equations and $5$ unknowns. Must it have a nontrivial solution? How many free variables at least?

Answer
Yes: rank $\le3$, so at least $5-3=2$ free variables — a solution space of dimension at least $2$.
Practice 4 · Invert

Invert $A=\left(\begin{smallmatrix}1&2\\3&4\end{smallmatrix}\right)$.

Answer
$A^{-1}=\left(\begin{smallmatrix}-2&1\\3/2&-1/2\end{smallmatrix}\right)$; verify $AA^{-1}=I$.
Practice 5 · Inconsistent

Show $x+y=1$, $2x+2y=3$ has no solution, using ranks.

Solution
Reducing the augmented matrix leaves the row $(0\ 0\,|\,1)$, i.e. $0=1$: $\operatorname{rank}A=1$ but the augmented rank is $2$.
Practice 6 · Elementary matrices

Write the elementary matrix that swaps the rows of a $2\times2$ matrix, and find its inverse.

Answer
$E=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)$, and $E^{-1}=E$ — swapping twice undoes itself.
Practice 7 · Uniqueness

Prove: if $A$ is invertible, then $Ax=b$ has exactly one solution.

Solution
$x=A^{-1}b$ works: $A(A^{-1}b)=b$. And any solution satisfies $x=A^{-1}(Ax)=A^{-1}b$ — existence and uniqueness in two lines.
Practice 8 · A finite field count

How many solutions does $x+y+z=0$ have over $\mathbb{Z}_2$?

Solution
Rank $1$, so the solution space has dimension $2$ over $\mathbb{Z}_2$ — hence $2^2=4$ solutions: $(0,0,0),(1,1,0),(1,0,1),(0,1,1)$. Dimension counts parameters, and over a finite field you can literally count the points.

Expanded topic checklist

Course coverage. This unit is part of the complete MAT240H1 topic map. It should cover the following items before you move on:

Textbook/source alignment

Use the current UofT MAT240H1 calendar topics as the coverage spine, and pair lecture notes with a Friedberg-Insel-Spence-style linear algebra text for extra reading. The exact assigned textbook should still be checked against the instructor syllabus.

Core theorem map

The systems spine is: row operations preserve solution sets, row echelon form reveals rank and free variables, and elementary matrices encode the operations.

Study routine. After row reduction, translate back from rows to the original question: solution set, rank, inverse, or basis.

Deep practice extensions

Use these after the main practice set. They are designed to force definition-level reasoning, theorem selection, and mixed application rather than routine calculation only.

Extension 1 · Consistency

What row pattern in an augmented matrix proves inconsistency?

Guide
A row of the form $[0\ 0\ \cdots\ 0\mid c]$ with $c e0$ means $0=c$, impossible.
Extension 2 · Free variables

If a system in 5 unknowns has rank 3 and is consistent, how many parameters are in the solution set?

Guide
There are $5-3=2$ free variables.
Extension 3 · Elementary matrix

What does left multiplication by an elementary matrix do?

Guide
It performs the corresponding elementary row operation on the matrix being multiplied.
Extension 4 · Invertibility test

State three equivalent conditions for an $n\times n$ matrix to be invertible.

Guide
Examples: rank $n$, RREF is identity, columns form a basis, determinant nonzero, homogeneous system has only zero solution.