Learn
Lesson · Systems and Matrices · Matrices

Matrices and Row Operations

An augmented matrix is a system with the variable names deleted: one row per equation, one column per variable, one column for the constants. The three row operations are the three things you were already doing to equations, and each of them is reversible.

x + y + z = 6 1 1 1 | 6 2x − y + 3z = 9 → 2 −1 3 | 9 −x + 2y + 4z = 15 −1 2 4 | 15 R1 ↔ R2 kR2 → R2 (k ≠ 0) R3 + kR1 → R3
The system, the matrix, the three legal moves

Core ideas

What this lesson establishes

Nothing is proved in this lesson that was not proved in “Solving by Elimination”. What is new is a notation, and the discipline the notation demands.

1

A matrix is bookkeeping, not a new idea

Every row is an equation, every column is a variable, and the bar stands for the equals sign. Deleting the letters removes the one part of the page that was never doing any work.

2

Position carries all the meaning

In the row 2 −1 3 | 9 the −1 means −1y because it sits in the second column and for no other reason. A missing term must be written as 0, and an equation not in standard form produces a row that means something other than the equation.

3

The three row operations are exactly the reversible ones

Swap two rows; multiply a row by a nonzero number; add a multiple of one row to another. Each has an inverse of the same kind, and that is the whole reason the solution set survives them.

The material

Writing a system as a matrix

The definitions, the translation in both directions, and three operations with their inverses.

Definition · Matrix

A matrix is a rectangular array of numbers. One with m rows and n columns is an m × n matrix — rows first, always, and the convention is arbitrary but universal.

Entries are named by position: a₂₃ is the entry in row 2, column 3. Row index first, again by convention.

Definition · Coefficient matrix, augmented matrix

For a system written in standard form, the coefficient matrix holds the coefficients: one row per equation, one column per variable. The augmented matrix adds a final column holding the constants, usually separated by a vertical bar.

The bar is a reading aid and nothing more. It marks where the equals signs were.

The translation runs both ways and is entirely mechanical, on one condition: every equation is in standard form, with the same variables in the same order. Meeting that condition is the reader's job, and the matrix cannot check it.

2y − 5 = 3x − z → −3x + 2y + z = 5 → −3 2 1 | 5 x + 4z = 0 → x + 0y + 4z = 0 → 1 0 4 | 0

The 0 in the second row is not padding. In a three-variable system every row has four entries; a row with three entries is a row whose columns no longer line up with anybody else's, and every subsequent operation is then adding the wrong numbers together.

The three elementary row operations

  • Swap. R1 ↔ R3 exchanges two rows. Its inverse is itself. This corresponds to writing the equations in a different order, which changes nothing about what is being asked.
  • Scale. kR2 → R2 multiplies every entry of a row, including the constant, by k ≠ 0. Its inverse is (1/k)R2 → R2.
  • Replace. R3 + kR1 → R3 adds k times one row to another and stores the result in the second. Its inverse is R3 − kR1 → R3. Only the row named on the right of the arrow changes.
Theorem · Row operations preserve the solution set

If one augmented matrix is obtained from another by a sequence of elementary row operations, the two systems they represent have exactly the same solution set. Such matrices are called row equivalent.

Each of the three operations is a restatement of something already settled. Swapping two rows reorders the equations, and a solution satisfies a set of equations regardless of the order they are written in. Scaling a row by k ≠ 0 is “Solving by Elimination”'s second claim. Replacing R3 by R3 + kR1 is “Solving by Elimination”'s first claim, with R1 left in place as that theorem requires.

Each operation has an inverse of the same kind, so any solution of the new system is a solution of the old one as well. A sequence of reversible steps is reversible: undo them in the opposite order.

□

Three things are not row operations. Multiplying a row by 0 destroys an equation and cannot be undone. Operating on columns renames variables: exchanging two columns produces a matrix whose answers are attached to the wrong letters, with nothing on the page to record the swap. And two operations performed at once are not a sequence of operations — from the rows 1 0 | 1 and 0 1 | 1, adding each to the other simultaneously gives 1 1 | 2 twice, turning a unique solution into a line.

Example · Two operations, written out

Start from the augmented matrix of the system in “Systems in Three Variables”. R2 − 2R1 → R2 gives the row 0 −3 1 | −3, and R3 + R1 → R3 gives 0 3 5 | 21.

Those are the equations A and B of “Systems in Three Variables”, entry for entry. The matrix has not made the arithmetic easier; it has made the position of every number decidable in advance.

Write each operation beside the row it produces, exactly as the combinations were labelled in “Systems in Three Variables”. “Gaussian Elimination” performs eight or ten of these in a row, and an unlabelled sequence of matrices is impossible to debug.

Interactive

The three elementary row operations

Swap, scale, add a multiple -- each applied on its own, with its effect on the determinant

Matrix
the row acted onthe determinant, recomputed

Method

From a system to a matrix and back

Four moves. The first two are where the meaning is fixed.

1

Put every equation in standard form

Variables on the left in one agreed order, constant alone on the right. The order is a choice, and once made it binds every row.

2

Write one row per equation, with a zero for every absent variable

In an n-variable system every row has n + 1 entries, without exception. A short row is a row that has lost its alignment.

3

Operate on rows only, one operation at a time

Name the operation as you perform it: R2 − 2R1 → R2. The row named after the arrow is the only row that changes, and the row read from is left exactly as it was.

4

Translate back before believing the answer

A matrix is shorthand for equations. The answer is a triple, and it is checked by substituting into the original equations — not by admiring the final matrix.

Matrices and row operations

Score 0 / 0

The system in “Systems in Three Variables”, as a matrix

The same two eliminations as “Systems in Three Variables”, written without letters. Every number below appears in the worked example there; only the layout has changed.

x + y + z = 6 1 1 1 | 6 R1 2x − y + 3z = 9 → 2 −1 3 | 9 R2 −x + 2y + 4z = 15 −1 2 4 | 15 R3 R2 − 2R1 → R2 2 − 2(1) = 0 −1 − 2(1) = −3 3 − 2(1) = 1 9 − 2(6) = −3 R3 + R1 → R3 −1 + 1 = 0 2 + 1 = 3 4 + 1 = 5 15 + 6 = 21 1 1 1 | 6 0 −3 1 | −3 0 3 5 | 21

The constant column takes part in every operation. 9 − 2(6) = −3 is the right-hand side of E2 − 2E1 from “Systems in Three Variables”, and omitting it is the commonest way to end up with a matrix that no longer represents the system it started as — a matrix which then reduces perfectly and reports a wrong triple.

Notice what the two operations achieved: the first column below the top row is now zero. That is x eliminated, and it is the first column rather than the first variable only because of where it was written.

Faded rehearsal: write the augmented matrix for 2x − z = 5, y + 3z = −1, x + 2y = 4 in the column order x, y, z. The first row begins 2 0 −1; supply every remaining zero and constant, then perform R1 − 2R3 → R1 on the whole row and translate the new first row back into an equation.

Common mistakes

1
Leaving the constant column out of the operationA row operation applies to the whole row. Doubling 2 −1 3 | 9 gives 4 −2 6 | 18, and a matrix whose left half was scaled and whose right half was not represents a system nobody asked about.
2
Building a row from an equation not in standard form3x = 2y + 5 is not the row 3 2 | 5. Until the variables are on the left in the agreed order and the constant is alone on the right, the positions do not mean what the matrix claims they mean.
3
Swapping columnsRows are equations and may be recombined freely. Columns are variables. Exchanging two columns silently renames two unknowns, and the numbers that emerge are attached to the wrong letters with no record of it anywhere on the page.

Check your understanding

✓
Finish when you can translate both ways without thinking.

Given a system, write its augmented matrix with every zero in place; given a matrix, write the system back. Then perform three row operations and name the inverse of each. If you cannot name the inverse, the step you performed was probably not one of the three.

Note: Nothing has been gained yet: this is the same arithmetic in less ink. What it buys is “Gaussian Elimination”. With the letters gone there is an obvious order in which to do the operations — leftmost column first, then the next — and an order that obvious is an algorithm rather than a decision.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.