3.3 Systems of equations

Solving systems of equations


Suppose we're asked to solve the following system of equations:

1⁢x1+2⁢x2=5 1 x sub 1 plus 2 x sub 2 equals 5 (1) 1
3⁢x1+9⁢x2=21 3 x sub 1 plus 9 x sub 2 equals 21 (2) 2

Without a knowledge of linear algebra, we could use substitution, elimination, or subtraction to find the values of the two unknowns x1 x sub 1 and x2 x sub 2.

Gauss-Jordan elimination is a systematic procedure for solving systems of equations based the following row operations:

α) alpha close paren Adding a multiple of one row to another row

β) beta close paren Swapping two rows

γ) gamma close paren Multiplying a row by a constant

These row operations allow us to simplify the system of equations without changing their solution.

To illustrate the Gauss-Jordan elimination procedure, we'll now show the sequence of row operations required to solve the system of linear equations described above. We start by constructing an augmented matrix as follows:

[1253921] the 2 by 3 matrix Row 1: 1 2 5 Row 2: 3 9 21

The first column in the augmented matrix corresponds to the coefficients of the variable x1 x sub 1, the second column corresponds to the coefficients of x2 x sub 2, and the third column contains the constants from the right-hand side.

The Gauss-Jordan elimination procedure consists of two phases. During the first phase, we proceed left-to-right by choosing a row with a leading one in the leftmost column (called a pivot) and systematically subtracting that row from all rows below it to get zeros below in the entire column. In the second phase, we start with the rightmost pivot and use it to eliminate all the numbers above it in the same column. Let's see this in action.

The first step is to use the pivot in the first column to eliminate the variable x1 x sub 1 in the second row. We do this by subtracting three times the first row from the second row, denoted R2←R2-3R R sub 2 left arrow R sub 2 minus number 3 R,

[125036] the 2 by 3 matrix Row 1: 1 2 5 Row 2: 0 3 6

Next, we create a pivot in the second row using R2←13⁢R2 R sub 2 left arrow one third R sub 2:

[125012] the 2 by 3 matrix Row 1: 1 2 5 Row 2: 0 1 2

We now start the backward phase and eliminate the second variable from the first row. We do this by subtracting two times the second row from the first row R1←R1-2⁢R2 R sub 1 left arrow R sub 1 minus 2 R sub 2:

[125012] the 2 by 3 matrix Row 1: 1 2 5 Row 2: 0 1 2

The matrix is now in reduced row echelon form RREF, which is its "simplest" form it could be in. The solutions are: x1=1 x sub 1 equals 1, x2=2 x sub 2 equals 2.

Systems of equations as matrix equations


We will now discuss another approach for solving the system of equations. Using the definition of the matrix-vector product, we can express this system of equations (1)-(2) 1 minus 2 as a matrix equation:

[1239]⋅[x1x2]=[521] the 2 by 2 matrix Row 1: 1 2 Row 2: 3 9 times the 2 by 1 column matrix x sub 1 x sub 2 equals the 2 by 1 column matrix 5 21

This matrix equation had the form A⁢x→=b→ A x right arrow equals b right arrow, where A A is a 2×2 2 times 2 matrix, x→ x right arrow is the vector of unknowns, and b→ b right arrow is a vector of constants. We can solve for x→ x right arrow by multiplying both sides of the equation by the matrix inverse A-1 A to the negative 1 power:

A-1⁢A⁢x→=1⁢x→=[x1x2]=A-1⁢b→=[3-23-113]=[12] A to the negative 1 power A x right arrow equals 1 x right arrow equals the 2 by 1 column matrix x sub 1 x sub 2 equals A to the negative 1 power b right arrow equals the 2 by 2 matrix Row 1: 3 negative two thirds Row 2: negative 1 one third equals the 2 by 1 column matrix 1 2

But how did we know what the inverse matrix A-1 A to the negative 1 power is?


More Cheat Sheets ->