SYSTEMS OF
LINEAR EQUATIONS
Solutions of Simultaneous Linear Equations
A. Direct Methods
• Using the Inverse of a Matrix
• Gaussian Elimination
• Gauss Jordan Method
• L-U Decomposition
B. Iterative Methods for Solving Simultaneous Linear
Equations
• Gauss-Seidel
• Gauss Jacobi Methods
• Successive Over Relaxation (SOR)
• Symmetric Successive Over Relaxation (SSOR)
DIRECT METHODS
A. Solution To Linear Systems Using the Inverse of a Matrix
Method:
AX = B, IAI ≠ 0
Multiplying both sides by A-1
A-1(AX) = A-1B
(A-1A)X = A-1B
IX = A-1B
X = A-1B
3.
AX = B
X = A-1B
B. Solution To Linear Systems Using Gaussian Elimination
Method:
➢Write the system as an augmented matrix [A:B].
➢Use elementary row operations to the whole augmented
matrix [A:B] until matrix A becomes either an upper or
lower triangular matrix.
➢Use back/forward substitution to find the values of the
variables.
Example: Solve the system using Gaussian Elimination
Solution:
The augmented matrix is
Transformed Upper Triangular Matrix:
Using back substitution, we get the following.
Alternative Solution:
The augmented matrix is
Transformed Lower Triangular Matrix:
Using forward substitution, we get
C. Solution To Linear Systems Using Gauss Jordan Method
Method:
➢Write the system as an augmented matrix [A:B].
➢Transform the augmented matrix [A:B] into a matrix in
RREF using elementary row operations.
• Example: Solve the systems using Gauss Jordan Method
Solution:
The augmented matrix is
Transformed matrix in RREF:
Therefore, the value of vector X is
D. Solution To Linear Systems Using L-U Decomposition
• L-U Decomposition is a matrix decomposition which
writes a matrix as the product of a lower triangular
matrix and an upper triangular matrix.
• Let A be a square matrix.
where: L and U are lower and upper triangular matrices
(of the same size), respectively. For a matrix, this
becomes:
• Example:
To find the unique LU decomposition, we can put some restrictions on L and
U matrices. For example, we can require the lower triangular matrix L to be a
unit one (i.e. set all the entries of its main diagonal to ones).
Then the system of equations has the following solution:
l21 = 1.5
u11 = 4
u12 = 3
u22 = −1.5.
Substituting these values into the LU decomposition above:
Solution To Linear Systems Using L-U Decomposition
• Given a matrix equation
• Steps:
1. Determine the lower triangular matrix (L) and upper
triangular matrix (U).
2. Solve the equation Ly = b for y.
3. Solve the equation Ux = y for x.
• Example:
• Example (cont.):
List of Equations:
l11u11 = 2l21u11 = 2 l31u11 = 1
l11u12 = 0l21u12 + l22u22 = -1 l31u12 + l32u22 = 2
l11u13 = 1l21u13 + l22u23 = 1 l31u13 + l32u23 + l33u33 = 2
Assume: l11 = l22 = l33 = 1
Then,
l21 = 1 u13 = 1
l31 = 1/2 u22 = -1
l32 = -2 u23 = 0
u11 = 2 u33 = 3/2
u12 = 0
Direct Method
(L-U Decomposition)
• Example (cont.):
Ly = b
• Then,
y1 = 1 y1 = 1
y1 + y2 = 1 y2 = 0
1/2y1 – 2y2 + y3 = -1 y3 = -3/2
Direct Method
(L-U Decomposition)
• Example (cont.):
Ux = y
• Then,
2x1 + x3 =1 x1 = 1
-x2 = 0 x2 = 0
3/2x3 = -3/2 x3 = -1
Exercises
1.
2.
• For both problems, solve using
• Inverse Method
• Gaussian Elimination
• Gauss Jordan
• L-U Decomposition Method