Professional Documents
Culture Documents
Fentayee Project - 040111
Fentayee Project - 040111
Fentayee Project - 040111
DEPARTMENT OF MATHEMATICS
BSC Project
Prepared by: ID No
2024
PAGE \* MERGEFORMAT iv
ACKNOWLEDGEMENT
First of all, I would like to thank my Almighty God for all of his assistance throughout my
life as well as accomplishing this project since; nothing can be done without the secret of
super natural God.
Next, I would also like to express my deep gratitude to all those who gave me the
possibility direction and comments to complete this project accordingly. So I would like to
extend thanks to my advisor Mr. WERKU DEBELE (MSc.)for all of his assistance,
comments and encouragements throughout the accomplishment of this project without any
boring and
Again, I would like to appreciate all of Bonga university librarians, staff members who
supplied me with journal books and Bonga university internet lab for all of their help and
valuable hints though out project work.
PAGE \* MERGEFORMAT iv
ABSTRACT
This study was mainly focused on numerical solution of system of linear equation by LU
decomposition and cholesky method. This study consists of six chapters including reference.
The first chapter is the introductions part that explains the back ground of the project. It also
consists of statement of the problem, objective of the problem of the study, significance of the
study and scope of the study. The second chapter contains literature review. The third
chapter contains the material and methods that was intended to be implemented in this
project. The fourth chapter contains result and discussion of the solution of numerical
solution of system of linear equation by using LU decomposition and cholesky method. The
fifth chapter contains conclusion and summery. The last chapter of this project reference.
PAGE \* MERGEFORMAT iv
1. INTRODUCTION
1.1. Background
Mathematically an equation can be defined as statement that support the equality of two
expressions, which are connected by’’=’Equations are classified as non-linear equation and
linear equation. Non-linear equations are equations that appear as curved lines when you
graph them. After plotting pairs of values that make the equation true on a coordinate grid,
you can't draw a straight line between the points.
Linear equation is an equation of the form which is the combination of number times
variable.
System of equation is a set of collection of equation solved to gather. There are two types of
system of equation. Those are non-linear system of equation and linear system of equation. A
linear system of equation is a system of two non-linear equations in two variables. System of
non-linear equation solved by different methods, some methods is bisection method, Newton,
Jacobean method …etc.. [Atkinson.k.n (1978). Including Gaussian elimination, Lu
decomposition, Gaussian-Gordian elimination…etc..
System of linear equation is a set of two or more linear equation with the same variable.
System of linear equation solved by two methods direct and indirect methods. Indirect
method starts with a guess of solution and less efficient than direct method. However in this
proposal project focus only Lu decomposition and Cholesky methods.
LU 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 ( Alan Turing in 1948).
PAGE \* MERGEFORMAT 21
This method of factorizing a matrix as a product of two triangular matrices has various
applications such as a solution of a system of equations, which itself is an integral part of
many applications such as finding current in a circuit and solution of discrete dynamical
system problems; finding the inverse of a matrix and finding the determinant of the matrix. A
square matrix decomposed in to two L and U such that A=LU, where L is lower triangular
matrix and U is upper triangular matrix. The Cholesky decomposition or Cholesky
factorization is a decomposition of a Hermit Ian, positive-definite matrix into the product of a
lower triangular matrix and its conjugate transpose. The Cholesky decomposition is roughly
twice as efficient as the LU decomposition for solving systems of linear equations.
The Cholesky decomposition of a Hermit Ian positive-definite matrix A is a decomposition of
the form A=¿T where L is a lower triangular matrix with real and positive diagonal entries,
and LT denotes the conjugate transpose of L. Every Hermit Ian positive-definite matrix (and
thus also every real-valued symmetric positive-definite matrix) has a unique Cholesky
[ ][ ][ ]
a 11 a12 a 13 L 11 0 0 L 11 L21 L31
decomposition. a 21 a 22 a 23 = L21 L22 0 0 L22 L32
a 31 a32 a 33 L31 L32 L33 0 0 L33
PAGE \* MERGEFORMAT 21
1.4. Significant of the study
This proposal project study would have the following significance.
PAGE \* MERGEFORMAT 21
2. LITERATURE REVIEW
Systems of linear equation are wide using area in many sub branch of mathematics. The study
of system of linear equation first introduced by Babylonian around 1800BC.For solving
system of linear equation, cardoon constructed simple rule for two linear equation with two
unknown around at 1550 AD. Canrdino interesting and colour full personality, published the
mathematics book, Arsmagna(cardino).
An ancient at BC it was used different ways solving system of linear equation system (shen,
cholesky lun 1999). Three of the most surprising things we have learned from this literature
on the history of system of linear equation had to do Gaussian elimination. The first surprise
was learning that that the idea behind Gaussian elimination preceded gauss by over 2000
years. There is evidence that the Chinese was using an equivalent procedure to solve system
of linear equation as eerily as 200 BC (Katz, 1995, Vander waerden,1983).
The second surprise was that Gaussian development the method we know Gaussian
elimination without use of matrices. The third surprise was that Gaussian development the
method we know Gaussian elimination to find the best approximation to solution to system of
equation that technique had no solution because there were twice as many equation
unknowns. We discuss the work of Gauss that give rise to the method of solving system of
linear equation using commonly now referred to as Gaussian elimination.
We expectation of the solution method developed around 200BC In China. In 1683, Japanese
mathematician Seki kava developed aversion of determinant as part of method for solving
nonlinear system of equation. In 1750, Swiss mathematician Gabriel Cramer independently
developed determinants as a way of specifying the solution to a system of linear equations as
a closed form expression comprised purely of fixed by unspecified coefficients of the given
system. Cramer’s development of determinants leveraged the combinatory of cleverly
subscripted but unspecified coefficients. Katz (1995) shows how Cramer expresses a 3x3
linear system in 3 unknowns x, y, z: Cramer then expresses the how the unknown values for
x,y, z in terms of the coefficients. For instance, the value of z is given: While Cramer does
not explain how this result was obtained; he does give a general rule framed in terms of the
combinatory of the subscripts. Each unknown in an nxn system is solved by a fractional
value, with numerators and denominators alike containing n! Terms. Each of those terms: is
composed of the coefficient letters, for example ZYX, always written in the same order, but
the indexes are permuted in all possible ways. The sign is determined by the rule that if in
PAGE \* MERGEFORMAT 21
any given permutation the number of times a larger number precedes a smaller number is
even, then the sign is “+” otherwise it is “-“. (Katz, 1995, p. 192) Cramer also notes that a
zero denominator indicates that the system does not have a unique solution, specifying that in
the case then the numerators are zero, the system will have infinitely many solutions and that
if any of the numerators are nonzero, the system will have no solution. Cramer’s approach
would have been impossible without a shift in the use of algebraic notation introduced by
French mathematician François Viet. For both Seki and Cramer, the way in which their
notational system structured the coefficients shaped the way the determinant was specified.
PAGE \* MERGEFORMAT 21
3. MATERIALS AND METHODS
This chapter outlines the methods and materials that would be used to find the numerical
solution of system of linear equations and materials used in study. Source in the web and
libraries will be used to collect all the pieces of information about numerical solution of
system of linear equations. Specifically,
The project develops through a number of resource and materials. Which are quit
relevant, like reference book and internet
All information that is obtained from library record and collected material where
examined in detail.
The collected information would be arranged from beginning from the end
MATLAB code would be used to make easy the computations by the methods
PAGE \* MERGEFORMAT 21
4. RESULT AND DISSCUSION
constants of real and complex numbers. The constant a n is called the coefficient of x nand b
is called the constant term of the equation.
There are two classes of methods for solving system of linear, algebraic equations: direct and
iterative methods. The common characteristics of direct methods are that they transform the
original equation into equivalent equations (equations that have the same solution) that can be
solved more easily. The transformation is carried out by applying certain operations. The
solution does not contain any truncation errors but the round off errors is introduced due to
floating point operations. Iterative or indirect methods, start with a guess of the solution x,
and then repeatedly refine the solution until a certain convergence criterion is reached.
Iterative methods are generally less efficient than direct methods due to the large number of
operations or iterations required. Iterative procedures are self-correcting, meaning that round
off errors (or even arithmetic mistakes) in one iteration cycle are corrected in subsequent
cycles. The solution contains truncation error. A serious drawback of iterative methods is that
they do not always converge to the solution. The initial guess affects only the number of
iterations that are required for convergence. The indirect solution technique (iterative) is
more useful to solve a set of ill-conditioned equations. In this chapter, we will present six
direct methods and two indirect (iterative) methods.
Direct Methods:
3. Gauss-Jordan Method
Indirect method
4.2 Lu decomposition
Certain matrices are easier to work with than others. In this section, we will see how to write
any square matrix A as the product of two matrices that are easier to work with. We’ll write
A = LU, where: • L is lower triangular. This means that all entries above the main diagonal
[ ]
l 11 0 0
are zero. In notation, L = (l ij) withl ij =0 0 for all j > i. L= l 21 l22 0 • U is upper triangular.
l 31 l32 l 33
[ ]
u11 u 12 u13
This means that all entries below the main diagonal are zero. In notation, U = 0 u 22 u23
0 0 u33
[ ][ ]
l 11 0 0 u11 u12 u13
.A= l 21 l22 0 0 u22 u23 .
l 31 l32 l 33 0 0 u33
l 11=a 11
l 21=a 21
l 11 u13=a 13
l 31 u12 +l 32=a 32
l 11 u12=a 12
l 31=a 31
l 21 u12+l 22=a 22
PAGE \* MERGEFORMAT 21
l 21 u13 +l 22 u23 =a 23
a12
u12= =a /a
l 11 12 11
l 22=a 22-l 21
x 1+ x 2+ x 3=1
3 x 1+ x 2-3 x 3=5
[ ]
1 1 1 x1 1
3 1 −3 x 2 = 5
1 − 2 −5 x 3 10
That means,
PAGE \* MERGEFORMAT 21
[ ][ ][ ]
1 0 0 u11 u12 u13 1 1 1
l 21 1 0 0 u22 u23 = 3 1 −3
l 31 l32 1 0 0 u33 1 − 2 −5
[ ]
u11 u12 u13
l 21 u11 l 21 u12+u 22 l 21 u13 +u23
l 31 u11 l31 u12+l 32 u 22 l 31 u13+ l32 u23+ u33
u11=1,u12 =1,u13 =1
l 21 u11=3,
l 21 u12+u22=1’
l 31 u11=1,
l 31 u12 +l 32 u22=-2,
u22=-2,u23 =-6,u33=3
3
l 21=3,l 31=1,l 32=
2
Step:2 LUX=B
Step: 3 UX=Y
Thus,
PAGE \* MERGEFORMAT 21
[ ][ ] [ ]
1 0 0
y1 1
3 1 0
y2 = 5
3
1 1 y 3 10
2
So, y 1=1
3 y 1+ y 2=5
3
y 1+( ) y 2+ y 3=10
2
y 1=1
y 2=2
y 3=6
[ ][ ] [ ]
1 1 1 x1 1
0 − 2 − 6 x2 = 2
0 0 3 x3 6
x 1+ x 2+ x 3=1
−2 x 2 − 6 x3 =2
3 x 3=6
x 3=2
x 2=-7
x 1=6
Therefore the solution of the given system of linear equations is (6,-7, 2).
PAGE \* MERGEFORMAT 21
4.3 Cholesky method
Here, we counter two words: "lower triangular matrix" and "transpose." If you are reading
this article, it is expected that you are well familiar with these terms. In case you are not, here
is a very brief note on them so that you can recall them. A lower-triangular matrix is a matrix
in which all entries above the main diagonal are all zeros. And if we talk about transpose, it is
also a matrix obtained by just interchanging the rows and columns of the original matrix. So
you take the transpose of the original matrix and then take the complex conjugate of each
entry of the original matrix. This would generate a complex conjugate transpose of the
original matrix.
Note: The Cholesky method does not work on every matrix; although it is a good method
sometimes, it isn’t always the best choice to use.
[ ][ ]
l 11 0 0 l 11 l 12 l31
Form of cholesky method A= L L = l 21 l22 0 0 l 22 l32 , where L is lower triangular
T
l 31 l32 l 33 0 0 l 33
Matrix is symmetric
Positive definite
PAGE \* MERGEFORMAT 21
6x+15y+55z=76
15x+55y+225z=295
55x+225y+979z=1259
Solution
[ ][ ] [ ]
6 15 55 x 76
A= 15 55 225 y = 295
55 225 979 z 1259
[ ] [ ][ ]
6 15 55 x 76
Now A = 15 55 225 y
, X= = 295
55 225 979 z 1259
[ ][ ][ ]
a11 a12 a13 L11 0 0 L11 L12 L13
¿
A a21 a22 a23 = L21 L22 0 0 L22 L32
a31 a32 a33 L31 L32 L33 0 0 L33
[ ]
6 15 55
15 55 225 =
55 225 979
[ ]
2
( L¿¿ 11) ¿ L11 L12 L11 L13 2
L21 L13 + L22 L23¿ L31 L11 ¿ L31 L12+ L32 L22 ¿ L31 L13+ L32 ( L¿¿ 32) + L33 L33
L21 L11 ¿
a21
L21= ,l =15/6=6.1237
l 11 21
a31
l 31= ,l =¿55/2.1237 =22.4537
l 11 31
[ ][ ] [ ]
l 11 0 0 2.4495 0 0 2.4495 6.1237 22.4537
l 21 l22 0 = 6.1237 4.1833 0 t
and l = 0 4.1833 20.9165
l 31 l32 l 33 22.4537 20.9165 6.1101 0 0 6.1101
[ ][ ][ ]
6 15 55 2.4495 0 0 2.4495 6.1237 22.4537
15 55 225 = 6.1237 4.1833 0 0 4.1833 20.9165
55 225 979 22.4537 20.9165 6.1101 0 0 6.1101
[ ][ ] [ ]
2.4495 0 0 y1 76
6.1237 4.1833 0 y 2 = 295
22.4537 20.9165 6.1101 y 3 1259
[ ][ ]
2.4495 y 1 76
6.1237 y 1 +4.1833 y 2 = 295
22.4537 y 1+ 20.9165 y 2+6.1101 y3 1259
2.4495 y 1=76
From (1)
2.4495 y 1=76
PAGE \* MERGEFORMAT 21
y 1=76/2.4495 =31.0269
From (2)
4.1833 y 2 =295-190=105
y 2=105/4.1833 =25.0998
From (3)
1221.6667+6.1101 y 3 =1259
6.1101 y 3=1259-1221.6667=37.3333
6.1101 y 3=37.3333
y 3=37.3333/6.1101 =6.1101
Now l t x=y
[ ][ ] [ ]
2.4459 6.1237 22.4537 x 31.0269
0 4.1833 20.9165 y = 25.0998
0 0 6.1101 z 6.1101
2.4495x+6.1237y+22.4537z=31.0269
4.1833y+20.9165z=25.0998
PAGE \* MERGEFORMAT 21
6.1101z=6.1101
6.1101
Z= =1
6.1101
From (2
4.1833y+20.9165z = 25.0998
4.1833y = 25.0998-20.9165
4.1833y = 4.1833
4.1833
y= =1
4.1833
From (1)
2.4495 x = 31.0269-28.5774
2.4495 x = 2.4495
2.4459
x= =1
2.4459
Both LU and Cholesky Decomposition is matrices factorization method we use for non-
singular (matrices that have inverse) matrices. In general basic different between two
methods. The later one uses only for square matrices AT . However LU decomposition we can
use any matrices that have inverses.
PAGE \* MERGEFORMAT 21
Big question with a lot of possible tangents one could go down. I've tried to provide a
somewhat brief summary.
A matrix has a Cholesky factorization if, and only if, it is symmetric positive definite (SPD).
If you try and compute a Cholesky factorization for matrix which is not SPD, it will always
fail. However, for an SPD matrix, the Cholesky factorization is convenient in that one only
has to store one triangular matrix L rather a pair L and U.
Once a matrix A is factored as either a LU or Cholesky factorization, then the linear system
of equations Ax=B can be solved by first solving Ly=b by forward substitution and
then Ux (or LT x=yfor Cholesky) by backwards substitution. In either forward or backward
substitution, the key insight is that, if you write out the equations for the unknowns x1,
…,xn1,…,.in the right order (forward for L and backwards for U ), each equation only
possesses one new unknown than the previous equation, which can easily be computed.
For linear systems that can be put into symmetric form, the Cholesky decomposition is the
method of choice, for superior efficiency and numerical stability. Compared to the LU
decomposition, it is roughly twice as efficient.
PAGE \* MERGEFORMAT 21
5. SUMMERY AND CONCLUSION
Once a matrix A is factored as either an LU or Cholesky factorization, then the linear system
of equations Ax=b can be solved by first solving Ly=b by forward substitution and then
Ux=y (or LT x=y for Cholesky) by backwards substitution.
PAGE \* MERGEFORMAT 21
6. REFERENCE
Avital, S. (1995). History of Mathematics can help Improve Instruction and learning,
InF.Swetz, J.Fauvel, O.Association of America.
Danilina, N.I., Dubrovskaya, S.N., and Kvasha, O.P., and Smirnov, G.L. Computational
Mathematics. Moscow: Mir Publishers, 1998. 2. Hildebrand, F.B. Introduction of Numerical
Analysis. New York: London: McGrawHill, 1956. 3. Householder, A.S. The Theory of
Matrices in Numerical Analysis. New York: Blaisdell, 1964. 4. Jain, M.K., Iyengar, S.R.K.,
PAGE \* MERGEFORMAT 21
and Jain, R.K. Numerical Methods for Scientific and Engineering Computation. New Delhi:
New Age International (P) Limited, 1984. 5. Krishnamurthy, E.V., and Sen, S.K. Numerical
Algorithms. New Delhi: Affiliated East-West Press Pvt. Ltd., 1986. 6. Mathews, J.H.
Numerical Methods for Mathematics, Science, and Engineering, 2nd ed., NJ: Prentice-Hall,
Inc., 1992. 7. Pal, M. Numerical Analysis for Scientists and Engineers: Theory and C
Programs. New Delhi: Narosa, Oxford:Alpha Sciences, 2007.
Mikami, Y. (1974). The development of Mathematics in china and Japan (2nd ed.). New York,
NY: Chelsea Publishing Company.
PAGE \* MERGEFORMAT 21