Professional Documents
Culture Documents
Introduction
One of the methods that can be used to solve a system of linear equations is the
Gauss-Jordan Method. The Gauss-Jordan Method is done by manipulating the system
of linear equations into an equivalent diagonal form with normalized elements in the
diagonal (see equation below). The new vector is the solution when the diagonal
form of the matrix of the coefficients is reduced to the identity matrix.
Objectives
Sample Problem
[ ][ ] [ ]
1 −3 2 5 −4 6 x2 37
6 1 −2 4 3 5 x3 = 63
3 2 −1 4 5 6 x4 81
4 −2 −1 3 6 5 x5 69
5 −6 −3 4 −2 1 x6 −4
Answer:
2 1 4 −2 19
[
a.)
−3 4 2 −1 1
3 5 −2 1
−2 3 2 4 13
8
]
x1 = 3
x2 = 1
x3 = 4
x4 = 2
1 2 3 4 5 6 91
b.)
[1 −3 2 5 −4
6 1 −2 4 3
3 2 −1 4 5
4 −2 −1 3 6
5 −6 −3 4 −2
Matlab Code
6 37
5 63
6 81
5 69
1 −4
]
The codes used for solving the given system of linear equations are given below.
The codes that were used in this experiment were patterned from the codes found
from the internet (see the link in the references).
When the codes were run in Matlab, the command window displayed this:
Based on the output, it can be observed that the main diagonal are mainly
composed of 1 and the rest of the elements are 0, for the coefficients of the
variables. The rightmost column presents the solution for the system of linear of
equations
Conclusion
When the system of linear of equations is manipulated into an equal diagonal, the
matrix would be composed of a diagonal composed of one and the rest are zero, for
the coefficient, and the numerical values that can be found at the rightmost part are
the solutions for the system of linear equations.
References