Gaussian Elimination with Back Substitution Method
Gaussian elimination is a method in which an augmented matrix is subjected to row operations until the component corresponding to the coefficient matrix is reduced to triangular form.
Procedure
Choose an n X n matrix
Otherwise- Show Pop up – please select number of rows equal to number of Columns
Here, we can perform two different types of operations to convert a given matrix into the REF (row echelon) form (a) modify a row by adding or subtracting multiples of another row. (b) multiply/divide a row by a scalar
Construct an upper triangular matrix from the given matrix.
In the next step convert the diagonal elements to 1s.
Example
Solve Equations x+2y-3z=1, 2x-y+z=1, x+4y-2z=9 using Gaussian Elimination with Back Substitution method
Solution:
Total Equations are 3
x+2y-3z=1 … (i)
2x-y+z=1 … (ii)
x+4y-2z=9 … (iii)
From the aforementioned equations,
A =$\begin{bmatrix} 1 & 2 & - 3 \\ 2 & - 1 & 1 \\ 1 & 4 & - 2 \end{bmatrix}$; b =$\begin{bmatrix} 1 \\ 1 \\ 9 \end{bmatrix}$;
Now, the augmented matrix,
[A:b] = $\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 2 & - 1 & 1 & : & 1 \\ 1 & 4 & - 2 & : & 9 \end{bmatrix}$
Converting the given matrix into an upper triangular matrix form
R3 ← -R1 + R3
$$\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 2 & - 1 & 1 & : & 1 \\ 0 & 2 & 1 & : & 8 \end{bmatrix}$$
R2 ← -2R1 + R2
$$\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 0 & - 5 & 7 & : & - 1 \\ 0 & 2 & 1 & : & 8 \end{bmatrix}$$
R3 ← 2R2 + 5R3
$$\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 0 & - 5 & 7 & : & - 1 \\ 0 & 0 & 19 & : & 38 \end{bmatrix}$$
The aforementioned matrix is an upper triangular matrix.
Now, convert all diagonal elements to 1s.
R2 ← (-1/5)*R2
$$\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 0 & 1 & - 7/5 & : & 1/5 \\ 0 & 0 & 19 & : & 38 \end{bmatrix}$$
R3 ← (1/19)*R3
$$\begin{bmatrix} 1 & 2 & - 3 & : & 1 \\ 0 & 1 & - 7/5 & : & 1/5 \\ 0 & 0 & 1 & : & 2 \end{bmatrix}$$
The above matrix is now in the desired form.
x + 2y – 3z = 1 . . . (i)
y – 7z/5 = 1/5 . . . (ii)
z = 2 . . . (iii)
You have to move in a back substitution manner in order to retrieve the values of y and x.
y – 7*2/5 = 1/5 (since we already know the value of z = 2)
Or, y = 1/5 + 14/5 = 3
Then, x + 2(3) – 3(2) = 1
Or, x = 1