Mathematical Foundations For Data Science: BITS Pilani
Mathematical Foundations For Data Science: BITS Pilani
Data Science
BITS Pilani MFDS Team
Pilani Campus
BITS Pilani
Pilani Campus
Lecture No.1
Agenda
• LU decomposition methods
• Doolittle’s method
• Crout’s method
is called the augmented matrix of the system (1). The dashed vertical line could
be omitted, as we shall do later. It is merely a reminder that the last column of
à did not come from matrix A but came from vector b. Thus, we augmented the
matrix A.
Triangular form:
Triangular means that all the nonzero entries of the
corresponding coefficient matrix lie above the diagonal and
form an upside-down 90° triangle. Then we can solve the
system by back substitution.
Since a linear system is completely determined by its
augmented matrix, Gauss elimination can be done by
merely considering the matrices.
(We do this again in the next example, emphasizing the matrices by writing
them first and the equations behind them, just as a help in order not to lose
track.)
• the rhs would also have the last (m-r) rows zero
• any one of the (m-r) last rows in non-zero would imply inconsistency
Division by zero
It is possible that during both elimination and back-substitution
phases a division by zero can occur.
For example:
2x2 + 3x3 = 8 0 2 3
4x1 + 6x2 + 7x3 = -3 A=4 6 7
2x1 + x2 + 6x3 = 5 2 1 6
a11 = 0
(the pivot element)
It is possible that during both elimination and back-substitution
phases
a division by zero can occur.
Solution: Pivoting
Round-off errors
Because computers carry only a limited number of significant figures,
round-off errors will occur and they will propagate from one iteration to
the next.
It is also a good idea to substitute your results back into the original
equations and check whether a substantial error has occurred.
x1 + 2x2 = 10
1.1x1 + 2x2 = 10.4 x1 = 4.0 & x2 = 3.0
x1 + 2x2 = 10
x1 = 8.0 & x2 = 1.0
1.05x1 + 2x2 = 10.4
Complete pivoting
• Searching for the largest element in all rows and columns then
switching.
• This is rarely used because switching columns changes the order of x’s
and adds significant complexity and overhead costly
å ( n - k ) =O(n )
2
k=1
BITS Pilani, Pilani Campus
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Operation Count – Gauss
Elimination
In back substitution total number of additions, multiplications
and divisions required are
n
2
2. n k n O ( n )
k 1
Cholesky’s Method: U = LT