## Using Matrices to Solve Systems of Equations if (parent.playingGame) document.writeln('<i><font color = AA00DD>Game Version</font></i>')

This tutorial: Part A: The Matrix of a System and Row Operations

In the preceding tutorial we talked about systems of linear equations in two unknowns. Here we generalize to any number of unknowns and talk about a different way of solving all such systems.
Linear Equations

A linear equation in the n unknowns x_1, x_2, ..., x_n has the form

a_1x_1 + ... + a_nx_n = b        (a_1, a_2, ..., a_n constants)
The numbers a_1, a_2, ..., a_n are the coefficients and b is the constant term, or right-hand side.

Note We often call the unknowns x, y, z, ... instead of x_1, x_2, ..., x_n when convenient.

Examples:
 Two unknowns: 4x - 5y = 0 a_1 = 4, a_2 = -5, b = 0 Three unknowns: -4x + y + 2z = -3 a_1 = -4, a_2 = 1, a_3 = 2, b = -3 Four unknowns: 3x_1 + x_2 - x_3 + 11x_4 = 5 a_1 = 3. a_2 = 1, a_3 = -1, a_4 = 11, b = 5
Matrix Form of a Linear Equation

The matrix form of the equation a_1x_1 + a_2x_2 + ... + a_nx_n = b is the row matrix [a_1  a_2  ...  a_n  b].

Examples:
 4x - 5y = 0;     (Unknowns: x, y) Matrix form: [4   -5   0] 4x = -3    (Unknowns: x, y) Matrix form: [4   0   -3] 4x + 0y = -3 2x - z = 0    (Unknowns: x, y, z) Matrix form: [2   0   -1  0] 2x + 0y - z = 0

(Unknowns: x, y)
Matrix form:

(Unknowns: x, y)
Matrix form:

(Unknowns: x, y, z)
Matrix form:

Matrix Form of a System of Linear Equations; Augmented Matrix

If we have a system of two or more linear equations in the same unknowns, then the augmented matrix of the system is just the matrix whose rows are the matrix forms of the individual equations. (It is called "augmented" because it includes the right-hand-sides of the equations.)

Examples:
System of Equations
Augmented Matrix
 x - 2y = 5 3x = 9
 1 -2 5 3 0 9

### Row Operations

Here are three things you can do to a system of equations without effecting the solution:

1. Switch any two equations
2. Multiply both sides of any equation by a non-zero number
3. Replace any equation by its sum with another equation. More generally, you can replace an equation by, say, 4 times itself plus 5 times another equation.

Corresponding to these changes are the following row operations on an augemented matrix.

Row Operation
Example
1. Switch two rows
We write R_iR_j to indicate "Switch Row i and Row j."
 1 -2 5 3 0 9

R1R2
 3 0 9 1 -2 5
2. Multiply a row by a non-zero number a
We write a\.R_i next to the ith row to indicate "Multiply Row i by a."
To multiply row 2 by 5, we write the instruction 5\.R_2 next to Row 2.
 1 -2 5 3 0 9 5R2
 1 -2 5 15 0 45
3. Replace a row by a combination with another row
We write a\.R_i ± b\.R_j next to the ith row to mean "Replace Row i by a times Row i plus or minus b times Row j".
Write the instruction 2R1-3R2 next to Row 1 to mean:"Replace Row 1 by two times Row 1 minus three times Row 2."
In words:
"Twice the top minus three times the bottom."
 1 -2 5 2R1-3R2 3 0 9
 -7 -4 -17 3 0 9

Press here to see how we got that.

Perform the indicated row operations and press

You are now ready to go on to

Top of Page

Last Updated: August, 2009