Follow Gaussian elimination and code it in Python. Please follow
the picture below. The only mathematical/list-related built-in
functions you can use in your code are abs, len, and range. Can't
import any libraries or modules. (No import math, no dot product,
etc.) Comment all lines. No user input. Pivot. Please hard code for
these equations.
x + 2z = 1
2x - y + 3z = -1
4x + y + 8z = 2
nation, thereby reducing the first columns of C matrix with zeros below the main diagonal as follows. [A.b][De]
Gaussian elimination method. Like Alg.2.2.1, it returns an error code E that the coefficient matrix A is singular
Gaussian Elimination 1. Set E=1 and form the nn+1 augmented matrix C=[A.b] 2. For j=1 to n do
a. Compute the pivot index jp such that:
C = max|C|
b. If C = 0, set E=0 and exit.
c. If p > j, interchange rows p and j.
d. For each i > j, subtract C/C times row j from row i.
3. Partition C as C=[D.e] where D is n x n and e is n x 1.
4. For j = n down to 1, compute 1.