Professional Documents
Culture Documents
NUMSOL
NUMSOL
3𝑥 2𝑦 𝑧 1
2𝑥 2𝑦 4𝑧 2
𝑥 1
2𝑦 𝑧 0
System of three equation in three variables (x, y, z)
General System
- For any number of linear equations (m) with any number of unknown (n) can be written as:
𝑎 𝑥 𝑎 𝑥 ... 𝑎 𝑥 𝑏
𝑎 𝑥 𝑎 𝑥 ... 𝑎 𝑥 𝑏
. . ..
𝑎 𝑥 𝑎 𝑥 ... 𝑎 𝑥 𝑏
Vector Equation
- Each unknown can be written as a weight for a column vector in a linear combination
𝑎 𝑎 𝑎
𝑎 𝑎 𝑎
𝑥 ⋮ 𝑥 ⋮ ⋯𝑥 ⋮
𝑎 𝑎 𝑎
Matrix Equation
- The vector equation is equivalent to a matrix equation in the form:
𝐴𝑥 𝑏
Where:
A is the 𝑚 𝑥 𝑛 matrix
x is the vector for 𝑛 entries
b is the vector for 𝑚 entries
𝑎 𝑎 … 𝑎 𝑥 𝑏
𝑎 𝑎 … 𝑎 𝑥 𝑏
𝐴 ⋮ ⋮ ⋱ ⋮ ; 𝑥 ; 𝑏
... ...
𝑎 𝑎 … 𝑎 𝑥 𝑏
1 | P a g e
CE 3151: Numerical Methods to CE Problems
Engr. NDTS
TLO 4
Solving Systems of Linear Equations
Solution Set
- The set of all possible solutions
- Solution of a linear system
- Is an assignment of values to variables 𝑥 , 𝑥 , ⋯ 𝑥
The solution for a linear system may behave in any of the following:
1. Consistent System
- Has at least one solution
a. Independent System
-a system with a single unique solution
b. Dependent System
-has infinitely many solutions
2. Inconsistent System
- No Solution
2. Consistency
- Any homogeneous system with no solution is inconsistent; otherwise, the system is consistent
3. Equivalency
- Two linear systems are equivalent if and only of, every solution of either system is a solution of the
other
Trivial Solution
- Simplest solution of any equation
- A solution set of a homogeneous linear equation in which all the variables have a zero value:
𝑥 𝑦 𝑧 0
And, the determinant is not equal to zero
3. Solution by Inversion
- Inversion by Gauss – Jordan
- By adjoints
2 | P a g e
CE 3151: Numerical Methods to CE Problems
Engr. NDTS
TLO 4
Solving Systems of Linear Equations
4. Cramer’s Rule
- An explicit formula for solution of linear systems
3 | P a g e
CE 3151: Numerical Methods to CE Problems
Engr. NDTS
TLO 4
Solving Systems of Linear Equations
The Gauss-Jordan elimination method is a procedure for solving a system of linear equations, [A][𝑥] = [𝑏].
In this procedure, a system of equations that is given in a general form is manipulated into an equivalent
system of equations in diagonal form with normalized elements along the diagonal. This means that when
the diagonal form of the matrix of the coefficients, [𝑎], is reduced to the identity matrix, the new vector
[𝑏′] is the solution. The starting point of the procedure is a system of equations given in a general form (the
illustration that follows is for a system of four equations):
𝑎 𝑎 𝑎 𝑎 𝑥 𝑏
𝑎 𝑎 𝑎 𝑎 𝑥 𝑏
𝑎 𝑎 𝑎 𝑎 𝑥 𝑏
𝑎 𝑎 𝑎 𝑎 𝑥 𝑏
The matrix form of the equivalent system after applying the Gauss – Jordan Method
1 0 0 0 𝑥 𝑏′
⎡ ⎤
0 1 0 0 𝑥 ⎢𝑏′ ⎥
0 0 1 0 𝑥 ⎢𝑏′ ⎥
0 0 0 1 𝑥 ⎣𝑏′ ⎦
In the Gauss – Jordan Elimination Method, the system of equations is manipulated to have the following
diagonal form:
4 | P a g e
CE 3151: Numerical Methods to CE Problems
Engr. NDTS
TLO 4
Solving Systems of Linear Equations
𝑥 0 0 0 𝑏′
0 𝑥 0 0 𝑏′
0 0 𝑥 0 𝑏′
0 0 0 𝑥 𝑏′
In the Gauss elimination procedure, the pivot equation is divided by the pivot coefficient. This, however,
cannot be done if the pivot coefficient is zero. For example, for the following system of three equations:
0𝑥 2𝑥 3𝑥 46
4𝑥 3𝑥 2𝑥 16
2𝑥 4𝑥 3𝑥 12
The procedure starts by taking the first equation as the pivot equation and the coefficient of 𝑥 , which is
0, as the pivot coefficient. To eliminate the term 4 𝑥 in the second equation, the pivot equation is
supposed to be multiplied by 4/0 and then subtracted from the second equation. Obviously, this is not
possible when the pivot element is equal to zero.
The division by zero can be avoided if the order in which the equations are written is changed such that
in the first equation the first coefficient is not zero. For example, in the system above, this can be done by
exchanging the first two equations. Generally, In Gauss elimination procedure, an equation (or a row)
can be used as the pivot equation (pivot row) only if the pivot coefficient (pivot element) is not zero. If
the pivot element is zero, the equation (i.e., the row) is exchanged with one of the equations (rows) that
are below, which has a nonzero pivot coefficient. This exchange of rows is called pivoting.
PARTIAL PIVOTING
If only row interchanging is used to bring the element (of largest absolute value) of the pivotal column to
the pivotal position at each step of diagonalization.
COMPLETE PIVOTING
The largest element of the whole coefficient matrix, A is first brought at 𝑎 of the coefficient matrix as the
pivot, and then leaving the first row and first column, the largest among the remaining elements is brought
to the pivotal 𝑎 position and so on by using both row and column transformations
5 | P a g e
CE 3151: Numerical Methods to CE Problems
Engr. NDTS