2.-System-of-Linear-Equations
2.-System-of-Linear-Equations
Matrix Notations
or simply Ax = b
Augmented Matrix
Uniqueness of Solution
A. Direct Methods
Definitions:
transforms the original equation into equivalent equations that can be solved more easily
transformation is carried out by applying certain operations
Advantages and Drawbacks
Definitions:
Inverse of a matrix is obtained by dividing its adjoint matrix by its determinant |A|
𝑎𝑑𝑗 𝑨
𝐴−1 =
det 𝑨
x = A-1b
Example:
Solve the following simultaneous linear equations:
2x + 3y – z = - 10
-x + 4y + 2z = - 4
2x – 2y + 5z = 35
Solution:
Definitions:
Initial Form: 𝑨𝒙 = 𝒃
Final Form: 𝑼𝒙 = 𝒄
Pivoting:
Gauss elimination method fails if any one of the pivots becomes zero.
1. Determine if pivot is non-zero. If it is zero, swap row to succeeding rows with non-zero element.
2. Divide the pivot by itself to make the pivot equal to 1.
3. Eliminate all other elements on that column where pivot is located.
4. Go to the next row, and repeat all steps until reaching the last row.
Example:
Solve the following systems using Gaussian elimination and Gauss-Jordan process.
2x + y – 3z = 11
4x – 2y + 3z = 8
-2x + 2y – z = -6
Solution:
GAUSSIAN ELIMINATION
GAUSS-JORDAN
Expressing the matrix as the multiplication of a lower triangular matrix L and an upper triangular
matrix U
A = LU
- Doolittle’s Method
- Crout’s Method
LU Decomposition
aka LU Factorization
process of computing L and U for a given A
expressed as a product of a lower triangular matrix L and an upper triangular matrix U
Constraints
transforms Ax = b to LUx = b
Example:
Use Doolittle’s decomposition method to solve the equations Ax = b, where
Solution:
Decomposition Phase:
Example:
Solve the following set of equations by Crout’s method:
2𝑥 + 𝑦 + 4𝑧 = 12
8x – 3y + 2z = 20
4x + 11y – z = 33
Solution:
Problem:
2x 1 + x 2 + x 3 = 7
x 1 + 2x 2 + x 3 = 8
x 1 + x 2 + 2x 3 = 9
𝑥+1
2𝑥 = −𝑥 − 1 𝑜𝑟 𝑥= −
2
1 1
𝑥 𝑘+1 = − 𝑥𝑘 −
2 2
Compiled by: Redin Jhon T. Carriedo, ECE Page 10 of 17
SYSTEMS OF LINEA R EQUATIONS MATH 19 – NUM ERICA L SOLUTIONS TO CE PROBLEM S
Iterations:
𝑥𝑘 1
𝑥 𝑘+1 = − −
2 2
𝑥0 1
𝑥1 = − −
2 2
𝑥1 1
𝑥2 = − −
2 2
𝑥2 1
𝑥3 = − −
2 2
Will it converge?
𝑥 = −2𝑥 − 1
𝑥 𝑘+1 = −2𝑥 𝑘 − 1
Iteration process is continued until the values of 𝑥 1 , 𝑥 2 and 𝑥 3 are found to a pre-assigned
degree of accuracy
Example:
15x + 3y – 2z = 85
2x + 10y + z = 51
x – 2y + 8z = 5
Solution:
Problem 1:
Use the Jacobi iterative scheme to obtain the solutions of the system of equations correct to three
decimal places.
x + 2y + z = 0
3x + y – z = 0
x – y + 4z = 3
Problem 2:
Use Jacobi iterative scheme to obtain the solution of the system of equations correct to two decimal
places.
Each iteration of Jacobi method updates the whole set of N variables at a time
Compiled by: Redin Jhon T. Carriedo, ECE Page 13 of 17
SYSTEMS OF LINEA R EQUATIONS MATH 19 – NUM ERICA L SOLUTIONS TO CE PROBLEM S
Gauss-Seidel can speed up the convergence by using all the most recent values of variables
for updating each variable even in the same iteration
Gauss-Seidel Iterations
Example:
4x + y – z = 4
x – 8y + 3z = -4
2x + y + 9z = 12
Solutions:
Problem:
2) 2x – y + 3z = 4
x + 9y – 2z = -8
4x – 8y + 11z = 15
Solve the following set of simultaneous linear equations by the matrix- inverse method.
1. 10x + 3y + 10z = 5
8x – 2y + 9z = 2
8x + y – 10z =35
2. x + 3y = 5
4x – y = 12
3. x – y + 3z = 5
4x + 2y – z = 0
x + 3y + z = 5
4. w + x = 7
2w + 3x – y = 9
4x + 2y + 3z = 10
2y – 4z = 12
Compiled by: Redin Jhon T. Carriedo, ECE Page 15 of 17
SYSTEMS OF LINEA R EQUATIONS MATH 19 – NUM ERICA L SOLUTIONS TO CE PROBLEM S
1.1 2x + 4y – 6z = -4
x + 5y + 3z = 10
x + 3y + 2z = 5
1.2 6x + 3y + 6z = 30
2x + 3y + 3z = 17
x + 2y + 2z = 11
2. Use the method of Gaussian elimination to solve the following system of linear
equations:
𝑥1 + 𝑥2 + 𝑥3 − 𝑥4 = 2
4𝑥 1 + 4𝑥 2 + 𝑥 3 + 𝑥 4 = 11
𝑥 1 − 𝑥 2 − 𝑥 3 + 2𝑥 4 = 0
2𝑥 1 + 𝑥 2 + 2𝑥 3 − 2𝑥 4 = 2
2x – y + 4z = 13
x + 3y + 2z = 17
x + 2y +3z = 16
4. Solve the following system of linear equations using the Gauss-Jordan method.
x – 2y = -4
5y + z = -9
4x – 3z = -10
5. Solve the following system of linear equations using the Gauss-Jordan method.
2x1 + x2 – 3x3 = 11
4x1 – 2x2 + 3x3 = 8
-2x1 + 2x2 – x3 = -6
using:
2.1 2x – y = 3
-x + 2y – z = -3
-y + z = 2
2.2 x + y + z = 7
3x + 3y + 4z = 23
2x + y + z = 10
1. 4x – 3y + 5z = 34
2x – y – z = 6
x + y + 4z = 15
2. 2x – y + 5z = 15
2x + y + z = 7
x + 3y + z = 10