CE 403 Lecture 3
CE 403 Lecture 3
Definition 1: A linear equation is said to be homogeneous when its constant part is zero. For
example both of the following are homogeneous:
3x+2y=0
x-5y+z=0
Definition 2: The following equation, on the other hand, is not homogeneous because its
constant part does not equal zero:
2x-y+z=3
x-2y+3z = 5
There are several methods appropriate for solving small (n ≤ 3) sets of simultaneous equations.
These are the graphical method, Cramer’s rule, and the elimination of unknowns.
A graphical solution is obtainable for two equations by plotting them on Cartesian coordinates
with one axis corresponding to x1 and the other to x2. Because we are dealing with linear
systems, each equation is a straight line. This can be easily illustrated for the general equations.
a11x1 + a12x2 = b1
a21x1 + a22x2 = b2
The basic strategy is to multiply the equations by constants so that one of the unknowns will be
eliminated when the two equations are combined. The result is a single equation that can be
solved for the remaining unknown. This value can then be substituted into either of the original
equations to compute the other variable. For example, the Eq. 1 might be multiplied by a21 and
Eq. 2 by a11 to give
a11a21x1 + a12a21x2 = b1a21
a21a11x1 + a22a11x2 = b2a11
Subtracting Eq. 1 to Eq. 2 will, therefore, eliminate the x1 term from the equations to yield
a22a11x2 − a12a21x2 = b2a11 − b1a21 . Solve for x2 then substitute the value of x2 in finding x1
We set up the equations so the left-hand sides have the same unknown variable. Thus, the
left-hand sides are the same. Then we equate the right-hand sides and solve.
Steps;
1. write each equation with x as the subject.
2. Equate the obtained value of x from each equation to get the value of y.
3. Substitute the value of y to any of the equation.
The substitution method is used to solve systems of linear equation by finding the exact
values of x and y which correspond to the point of intersection.
The idea is to pick one of the two given equations and solve for either of the
variables, x or y. The result from the first step will be substituted into the other equation. The
effect will be a single equation with one variable which can be solved as usual.
Example: From the equations 2x + 3y = 13 and 7x - 4y = 2. Solve for x and y using substitution
method.
D=
c. Formed Dx by replacing the x-column values with the answer column. Similarly with Dy and
Dz which results to;
2. Gaussian Elimination
The goals of Gaussian elimination are to make the upper-left corner element a 1, use
elementary row operations to get 0s in all positions underneath that first 1, get 1s for leading
coefficients in every row diagonally from the upper-left to lower-right corner, and get 0s beneath
all leading coefficients.
Basically, you eliminate all variables in the last row except for one, all variables except
for two in the equation above that one, and so on and so forth to the top equation, which has all
the variables. Then you can use back substitution to solve for one variable at a time by plugging
the values you know into the equations from the bottom up.
Example. Find the value of x, y and z using Gaussian Elimination
2x + 1y + 1z = 3
1x – 1y – 1z = 0
1x + 2y + 1z = 0
We can use the following procedure;
1. Set a11 into “1”
2. Set a21, a31 to 0s underneath the 1 in the first column (a11).
3. Set a22 into “1”
4. Set a32, to 0 underneath the 1 in the second column (a22).
5. Use backward substitution to solve for one variable at a time.
Resulting to;
L U decomposition of a matrix is the factorization of a given square matrix into two triangular
matrices, one upper triangular matrix and one lower triangular matrix, such that the product of
these two matrices gives the original matrix
A square matrix A can be decomposed into two square matrices L and U such that A = L U
where U is an upper triangular matrix formed as a result of applying Gauss Elimination Method
on A; and L is a lower triangular matrix with diagonal elements being equal to 1.
Now consider matrix A and convert it in row echelon form using Gaussian elimination method.
We get
Hence we get, L =
Now we should UX = Z
5. Jacobi Method
Two assumptions made on Jacobi Method:
1. The system given by
and substitute these values of x1 into the right-hand side of the rewritten equations to obtain the
first approximation. After this procedure has been completed, one iteration has been performed.
In the same way, the second approximation is formed by substituting the first approximation’s x-
values into the right-hand side of the rewritten equations. By repeated iterations, you will form a
sequence of approximations that often converges to the actual solution
5x1-2x2+3x3 = -1
-3x1+9x2+x3 = 2
2x1-x2-7x3 = 3
Continue the iterations until two successive approximations are identical when rounded to three
significant digits. (Refer to the table below for the possible number of iterations)
Because the last two columns are identical, you can conclude that to three significant digits the
solution is x1 = 0.186, x2 = 0.331 and x3 = -0.423
For the system of linear equations given in Example 1, the Jacobi method is said to converge.
That is, repeated iterations succeed in producing an approximation that is correct to three
significant digits. As is generally true for iterative methods, greater accuracy would require more
iterations.
5x1-2x2+3x3 = -1
-3x1+9x2+x3 = 2
2x1-x2-7x3 = 3
Neither of the iterative methods presented in this section always converges. That is, it is possible
to apply the Jacobi method or the Gauss-Seidel method to a system of linear equations and obtain
a divergent sequence of approximations. In such cases, it is said that the method diverges.
Example of Divergence
Apply the Jacobi method to the system
x1-5x2 = -4
7x1-x2 = 6 , use x1 and x2 equal to zero as initial guess.
Resulting to;
Matrix form of a linear system of equations. The matrix form of a system of m linear equations
in n unknowns
det A = 0, Recall properties of determinants. Since det A = 0, find the determinant of (2x2) sub
matrices
Since the determinant of all 2x2 sub matrices are not all zero therefore the rank is 2.
Let say,
One of the principle advantages to working with homogeneous systems over non-homogeneous
systems is that homogeneous systems always have at least one solution, namely, the case where
all unknowns are equal to zero. Such a case is called the trivial solution to the homogeneous
system.
For instance, looking at this system
2x+3y+z = 0
x-y-2z = 0
Example;
x+y+z=0
x-y+2z = 0
3x-y+5z=0
2. 3x+2y-z=0
2x-2y+4z = 0