You are on page 1of 15

GAUSSIAN

ELIMINATION

GEOPHYSICS UI
- fatimah
Augmented Matrices and Elementary Row Operations
A linear system can be abbreviated (simplifying notation) by writing only the rectangular array
of numbers

𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1


𝑎11 𝑎12 ⋯ 𝑎1𝑛 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
𝑎21 𝑎22 ⋯ 𝑎2𝑛 𝑏2 Augmented matrix
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ for the system
𝑎𝑚1 𝑎𝑚2 ⋯ 𝑎𝑚𝑛 𝑏𝑚𝑛
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚

For example, the augmented matrix for the following system of equations is

𝑥1 + 𝑥2 + 2𝑥3 = 9
1 1 2 9
2𝑥1 + 4𝑥2 − 3𝑥3 = 1 2 4 −3 1
3 6 −5 0
3𝑥1 + 6𝑥2 − 5𝑥3 = 0

LINEAR ALGEBRA 2
Elementary Row Operations

Algebraic operations Elementary row operations


+Multiply an equation +Multiply a row through by a
through by a nonzero nonzero constant
constant +Interchange two rows
+Interchange two equations +Add a constant times on row
+Add a constant times one to another
equation to another

LINEAR ALGEBRA 3
× −2 × (−2)

+
+

Elementary × (−3) × (−3)

Row + +

Operations ×
1 1
2 ×
2

× (−3) × (−3)

+ +

LINEAR ALGEBRA 4
× −2 × (−2)

Elementary +

Row
+

× (−1) × (−1)

Operations ×
−11
×
−11
2 2
+
+
+ × (−3) +
× (−3)

LINEAR ALGEBRA 5
1 0 0 1 A reduced row echelon form must have the
0 1 0 2 following properties:
0 0 1 3
1. If a row does not consist entirely of zeros, then
the first nonzero number in the row is a 1
which is called a leading 1.
2. If there are any rows that consist entirely of
Row echelon form zeros, then they are grouped together at the
bottom of the matrix.
Reduced row echelon form
3. In any successive rows that do not consist
entirely of zeros, the leading 1 in the lower
row occurs farther to the right than the
leading 1 in the higher row

Echelons 4. Each column that contains a leading 1 has


zeros everywhere else in that column

LINEAR ALGEBRA 6
Reduced row echelon form
Row Echelon Form
Leading 1 A matrix in row echelon form has zeros below and above each leading 1

0 1 −2 0 1 1 0 0 0 1 0 0 ∗ 1 0 ∗ ∗
1 0 0 4 1 0 0 0 1 0 0 0 1 0 ∗ 0 1 ∗ ∗
0 0 0 1 3 0 0 , ,
0 1 0 7 , 0 1 0 , , 0 0 1 0 0 0 1 ∗ 0 0 0 0
0 0 0 0 0 0 0
0 0 1 −1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0

Row echelon form, but NOT reduced row echelon form

1 ∗ ∗ ∗
1 4 −3 7 1 1 0 1 4 −3 7 1 ∗ ∗ ∗ 1 ∗ ∗
0 1 ∗ ∗
0 1 6 2 , 0 1 0 , 0 1 6 2 0 1 ∗ ∗ , 0 1 ∗ ,
0 0 1 ∗
0 0 1 5 0 0 0 0 0 1 5 0 0 1 ∗ 0 0 0
0 0 0 1

Leading 1 A matrix in row echelon form has zeros below each leading 1

LINEAR ALGEBRA 7
EXAMPLE

LINEAR ALGEBRA 8
EXAMPLE
In each part, suppose that the augmented matrix for a linear system
in the unknowns 𝑥, 𝑦, and 𝑧 has been reduced by elementary row
operations to the given reduced row echelon form. Solve the system

(a) 1 0 0 0 𝑥 + 0𝑦 + 0𝑧 = 0
0 1 2 0 0𝑥 + 𝑦 + 2𝑧 = 0
0 0 0 1 0𝑥 + 0𝑦 + 0𝑧 = 1 The last equation is not
satisfied by any values of
The system is inconsistent 𝑥, 𝑦, and 𝑧

𝑥 = 4 + 5𝑠 − 𝑡
(b) 𝑥 − 5𝑦 + 𝑧 = 4 𝑥 = 4 + 5𝑦 − 𝑧 𝑦=𝑠 General solution
1 −5 1 4
of the system
0 0 0 0 0𝑥 + 0𝑦 + 0𝑧 = 0 𝑧=𝑡
0 0 0 0 0𝑥 + 0𝑦 + 0𝑧 = 0

If a linear system has infinitely many solutions, then a set of parametric equations
from which all solutions can be obtained by assigning numerical values to the
parameters is called a general solution of the system.

LINEAR ALGEBRA 9
EXAMPLE (cont.)
Leading 1
Leading variable free variable
𝑥 = −1 − 3𝑡
(c) 1 0 3 −1 𝑥 + 0𝑦 + 3𝑧 = −1 𝑥 = −1 − 3𝑧
𝑦 = 2 + 4𝑡
0 1 −4 2 0𝑥 + 𝑦 − 4𝑧 = 2 𝑦 = 2 + 4z
0 0 0 0 0𝑥 + 0𝑦 + 0𝑧 = 0 𝑧=𝑡

The last equation imposes no The linear system that correspond to the augmented matrix
restriction of 𝑥, 𝑦, and 𝑧 thus can be
omitted

The free variable z can be treated as a 𝑥 = −1 𝑥 = −4


parameter and assigned an arbitrary value t. 𝑡=0 𝑦=2 𝑡=1 𝑦=6
which determines values for x and y 𝑧=0 𝑧=1

LINEAR ALGEBRA 10
0 0 −2 0 7 12
Step 1. Locate the leftmost column that does not consist
entirely of zeros 2 4 −10 6 12 28
2 4 −5 6 −5 −1
Leftmost nonzero column

Step 2. Interchange the top row with another row, if 0 0 −2 0 7 12


necessary, to bring nonzero entry to the top of the column 2 4 −10 6 12 28
found in Step 1. 2 4 −5 6 −5 −1

1
2 4 −10 6 12 28 ×
2
Step 3. If the entry that is now at the top of the column 0 0 −2 0 7 12
found in Step 1 is 𝑎, multiply the first row by 1/𝑎 in order to 2 4 −5 6 −5 −1
introduce leading 1.

1 2 −5 3 6 14 × (−2)
Step 4. Add suitable multiples of the top row to the rows 0 0 −2 0 7 12
below so that all entries below the leading 1 become zeros. 2 4 −5 6 −5 −1 +

1 2 −5 3 6 14

Elimination Methods 0
0
0
0
−2
5
0
0
7
−17
12
−29
LINEAR ALGEBRA 11
1 2 −5 3 6 14
Step 5. Apply from Step 1 to the submatrix (Step 3) 0 0 −2 0 7 12 × −2
1

remains. Continue in this way until the entire 0 0 5 0 −17 −29


matrix is in row echelon form.
Leftmost nonzero column

1 2 −5 3 6 14
7
(Step 4) 0 0 1 0 −2 −6 × (−5)

0 0 5 0 −17 −29 +

1 2 −5 3 6 14
7
(Step 3) 0 0 1 0 − 2 −6
1 ×2
0 0 0 0 1
2

1 2 −5 3 6 14
7
This procedure is called Gaussian elimination 0 0 1 0 − 2 −6
0 0 0 0 1 2

Elimination Methods The entire matrix is in row echelon form

LINEAR ALGEBRA 12
1 2 −5 3 6 14
Step 6. Beginning with the last nonzero row and working 0 0 1 0
7
− 2 −6 +
upward, add suitable multiples of each row to the rows 7
above to introduce zeros above the leading 1’s 0 0 0 0 1 2 ×2

1 2 −5 3 6 14 +
0 0 1 0 0 1
0 0 0 0 1 2 × (−6)

1 2 −5 3 0 2 +
0 0 1 0 0 1 ×5
0 0 0 0 1 2

1 2 0 3 0 7
The procedure for reducing a matrix to reduced row 0 0 1 0 0 1
echelon form is called Gauss – Jordan elimination 0 0 0 0 1 2

The last matrix is in reduced row echelon form

Elimination Methods
LINEAR ALGEBRA 13
Some Facts about Echelon Forms

LINEAR ALGEBRA 14
Anton, H., Rorres, C., 2014, Elementary Linear
References Algebra Application Version, Wiley, USA

LINEAR ALGEBRA 15

You might also like