Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

WTW 164

Unit 1.3: Gaussian elimination


(part 1)
Dr HR (Maya) Thackeray
<maya.thackeray@up.ac.za>
Systems of linear equations and matrices
Recall that a system of linear equations in the variables x1, x2, …, xn
corresponds to an augmented matrix; each equation gives a row.
a11x1 + a12x2 + … + a1nxn = b1
a21x1 + a22x2 + … + a2nxn = b2
… [A | b] =
am1x1 + am2x2 + … + amnxn = bm

We want to find the solution set of the system (that is, the collection of
lists of values for such that, for each list of values, all of the equations
are satisfied).
Row-echelon form
In each row of a matrix, the row’s leading entry is the row’s leftmost
nonzero entry (if this exists).
A matrix is in row-echelon form if and only if:
• All rows in which every entry is 0 are at the bottom, and
• In each row apart from the topmost row, the leading entry – if it exists
– is strictly to the right of the leading entry in the row just above it.
For an augmented matrix [A | b] where A is in row-echelon form, we
can use back substitution to solve the system.
What row-echelon form looks like: a staircase

The leading entries are called the pivot entries, and their positions in
the matrix are called pivot positions.
Examples: Row-echelon form
These matrices are in row-echelon form:

These matrices are not in row-echelon form:


Example: Back substitution
Consider the system in the variables x1, …, x4 with augmented matrix
[A | b] =
Row 3 gives x4 = –2.
Row 2 gives 2x3 + 3x4 = 2, so x3 = (2 – 3(–2))/2 = 4.
Row 1 gives x1 – x2 + 4x3 + 3x4 = 5, so x2 = t is any real number and
x1 = 5 + t – 4(4) – 3(–2) = –5 + t.
The solutions are: = + t, t .
Examples: The three possibilities
Unique solution: (from previous lecture)
Infinitely many solutions: (from previous lecture)
No solutions: (row 3 gives 0 = 5, which is false)
Systems with row-echelon-form coefficient
matrices
Theorem. Suppose that the m by n matrix A = [aij] is in row-echelon
form, and that [A | b] is the augmented matrix of a system of linear
equations.
• The system has no solution if and only if A has an all-zero row for
which the corresponding entry of b is not zero.
• If the system is consistent, then there is a unique solution if and only
if: m is at least n and for each k from 1 to n, the entry akk is not zero.
• If the system is consistent, then there are infinitely many solutions if
and only if: m < n or some entry akk is zero.
Goal
We want to convert any system of linear equations to a system with a
coefficient matrix in row-echelon form, without changing the solution
set.

We shall now see how to do this by using Gaussian elimination.


Elementary row operations
Each of the following three types of steps for the augmented matrix does not
change the solution set of the corresponding system of linear equations.
• Swap two rows (written Ra Rb if we swap rows a and b; this swaps equations).
• Multiply a row by a nonzero constant (written as kRa or as Ra kRa if we multiply
row a by k; this multiplies an equation by a nonzero constant).
• Add a multiple of a row to another row (written as Ra + kRb or as Ra Ra + kRb if we
add k times row b to row a; this adds a multiple of an equation to another
equation).
(Instead of (1/k)Ra, we can write Ra/k.)
The three types of steps are called elementary row operations, or row operations.
Row equivalence
Each elementary row operation is reversible by an elementary row operation of
the same type (swap the rows back, divide by the constant, add minus the
multiple).
Two augmented matrices [A | b] and [C | d] of the same size are called row
equivalent if we can start with [A | b], perform elementary row operations, and
get [C | d]. In this case, we write [A | b] ~ [C | d].
When we do elementary row operations, we sometimes say that we are doing
row reduction.
If two augmented matrices are row equivalent, then the corresponding systems
of linear equations have the same solution set (if we use only one list of
variables to convert both augmented matrices to systems of linear equations).
Gaussian elimination
Suppose an augmented matrix [A | b] is given.
Gaussian elimination involves doing the following steps repeatedly.
• Step 1: If done, then stop; otherwise, find the next pivot entry.
• Step 2: Move the new pivot entry to its correct position.
• Step 3 (optional): Divide the new pivot entry’s row by that pivot entry.
• Step 4: Make all entries in the pivot entry’s column below the pivot entry equal to
0.
• Go back to step 1.
We illustrate the process through an example. (See the “Gaussian and Gauss-Jordan
elimination” notes on clickUP for a thorough description of the process of Gaussian
elimination.)
Example: Gaussian elimination (page 1)
Solve the following system of linear equations.

Solution. The corresponding augmented matrix is


.
Gaussian elimination proceeds as follows.
Example: Gaussian elimination (page 2)

R1 R2

R1 R1/2

R3 R3 – 3R1
Example: Gaussian elimination (page 3)
R2 –R2

R3 R3 – R2

R3 R3/(–3)
(end of process).
We could leave out the last step if the goal is just to get a coefficient matrix in
row-echelon form. If we also want each pivot entry to be 1, then an additional
cycle of the Gaussian elimination algorithm does the last step of dividing row
3 by –3.
Example: Gaussian elimination (page 4)

Having transformed the matrix into row-echelon form, we can use back
substitution to solve the system. We get:
z=1
y = –1 – z = –1 – 1 = –2
x = 1 + 2y + z = 1 + 2(–2) + 1 = –2
Unique solution: = .
Solutions in 3D space for 3 by 3 matrices
An augmented matrix [A | b] where A is a 3 by 3 matrix corresponds to
three planes in 3D space.
Unique solution Infinitely many No solution
solutions in a line

You might also like