Assignment 4 Gauss Elimination
Assignment 4 Gauss Elimination
Assignment Number 4
(a) Solve by naive Gauss elimination. Show all steps of the computation.
(b) Substitute your results into the original equations to check your
answers.
Solution Using Naïve Gauss Elimination:
[ | ]
(a) Naive Gauss elimination: 1 0. 2 −0.1 2 .7
0 1 −0.34 11.16
Step 1: Write the augmented matrix. 0 0 1 −4. 882
Write the augmented matrix by arranging the
coefficients and constants of the variables in a matrix
form: Step 4: Create zeros above the leading entries.
[ | ]
10 2 −1 27
−3 −6 2 −61.5 R1 = R1 - (0.2) * R2
1 1 5 −21.5 R3 = R3 - (-0.34) * R2
Step 2: Perform row operations to simplify the matrix. The updated matrix becomes:
[ | ]
transform it into row-echelon form. The goal is to create 1 0 0 2 .418
zeros below the leading entries. 0 1 0 10.458
R2 = R2 + (3/10) * R1 0 0 1 −4.882
R3 = R3 - (1/10) * R1
[ | ]
10 2 −1 27 can read the solutions from it:
0 −5 1.7 −55 . 8 X1 = 2.418
0 0 5 .1 −2 4 . 9
X2 = 10.458
Step 3: Scale the leading entries to become 1.
X3 = -4.882
Scale the leading entries to become 1 by dividing each
The solutions to the system of equations are x1 = 2.418,
row by its leading entry.
x2 = 10.458, x3 = -4.882.
R1 = (1/10) * R1
(b) Checking the results:
R2 = (-1/5) * R2
Substituting the obtained values into the original
R3 = (1/5.1) * R3 equations:
R3 = -R3
Equation 3: x1 + x2 + 5x3 = -21.5
The updated matrix becomes:
2.418 + 10.458 + 5(-4.882) ≈ -21.5
[ | ]
2 1 −1 1
0 −1 4 −11
9.12 Use Gauss-Jordan elimination to solve: 0 0 1 −18
2 x1 + x 2−x 3=1
5 x 1+2 x 2+ 2 x 3=−4
3 x 1+ x 2 + x 3=5
Step 5: Convert the matrix back into equation form:
Do not employ pivoting. Check your answers by
substituting them into the original equations. 2 x1 + x 2−x 3=1
[ |]
2 1 −1 1 -1x2 - 72 = -11
5 2 2 −4 -1x2 = 61
31 1 5 x2 = -61
Step 2: Perform row operations to transform the Now, substitute the values of x2 and x3 into the first
matrix into row-echelon form. We'll use equation:
elementary row operations to achieve this.
2x1 + (-61) - (-18) = 1
R2 = R2 - (5/2) *R1 2x1 - 61 + 18 = 1
R3 = R3 - (3/2) *R1 2x1 - 43 = 1
2x1 = 44
The updated matrix becomes: x1 = 22
[ | ]
2 1 −1 1 So, the solution to the system of equations is:
0 −1 4 −11 X1 = 22
0 −1 3 7 X2 = -61
X3 = -18
Step 3: Perform further row operations to continue
To verify the solution, we can substitute these
transforming the matrix into row-echelon form.
values back into the original equations:
R3 = R3 - R2
2(22) + (-61) - (-18) = 1
44 - 61 + 18 = 1
The updated matrix becomes:
1=1
[ | ]
2 1 −1 1 5(22) + 2(-61) + 2(-18) = -4
0 −1 4 −11 110 - 122 - 36 = -4
0 0 −1 18
-4 = -4
3(22) + (-61) + (-18) = 5
66 - 61 - 18 = 5
5=5