You are on page 1of 96

Introduction to Numerical Analysis

(Linear Systems: Operaton Count; Matrix Norms)

MA 214, Spring 2023-24.

MA 214 - NA Spring 2023-24 1 / 26


LU Factorization (contd.)

There are three special LU decompositions that we will discuss now.

MA 214 - NA Spring 2023-24 2 / 26


LU Factorization (contd.)

There are three special LU decompositions that we will discuss now.

1 Doolittle’s factorization

MA 214 - NA Spring 2023-24 2 / 26


LU Factorization (contd.)

There are three special LU decompositions that we will discuss now.

1 Doolittle’s factorization
2 Crout’s factorization

MA 214 - NA Spring 2023-24 2 / 26


LU Factorization (contd.)

There are three special LU decompositions that we will discuss now.

1 Doolittle’s factorization
2 Crout’s factorization
3 Cholesky’s factorization

MA 214 - NA Spring 2023-24 2 / 26


LU Factorization: Cholesky’s factorization

Definition (Cholesky’s factorization)


A matrix A is said to have a Cholesky’s factorization if there exists a
lower triangular matrix L such that

A = LLT .

MA 214 - NA Spring 2023-24 3 / 26


LU Factorization: Cholesky’s factorization (contd.)

Theorem
Let A be an n × n matrix with real entries such that
A is symmetric and
positive definite.
Then A has a unique factorization
A = LLT
where L is a lower triangular matrix with a positive diagonal.

MA 214 - NA Spring 2023-24 4 / 26


LU Factorization: Cholesky’s factorization (contd.)

Theorem
Let A be an n × n matrix with real entries such that
A is symmetric and
positive definite.
Then A has a unique factorization
A = LLT
where L is a lower triangular matrix with a positive diagonal.
Proof Is by Induction. We can use the proof to construct the
Cholesky’s factorization.

MA 214 - NA Spring 2023-24 4 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let A be a (k + 1) × (k + 1) symmetric positive definite matrix.

MA 214 - NA Spring 2023-24 5 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let A be a (k + 1) × (k + 1) symmetric positive definite matrix.
Let  
Ak a
A= ,
aT a(k+1)(k+1)
where

MA 214 - NA Spring 2023-24 5 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let A be a (k + 1) × (k + 1) symmetric positive definite matrix.
Let  
Ak a
A= ,
aT a(k+1)(k+1)
where
Ak is the k × k principal sub-matrix of A
a = (a1(k+1) , a2(k+1) , · · · , ak(k+1) )T
Observe: Ak is symmetric and positive definite

MA 214 - NA Spring 2023-24 5 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let A be a (k + 1) × (k + 1) symmetric positive definite matrix.
Let  
Ak a
A= ,
aT a(k+1)(k+1)
where
Ak is the k × k principal sub-matrix of A
a = (a1(k+1) , a2(k+1) , · · · , ak(k+1) )T
Observe: Ak is symmetric and positive definite
There exists a unique lower triangular matrix Lk such that
Ak = Lk LTk
MA 214 - NA Spring 2023-24 5 / 26
LU Factorization: Cholesky’s factorization (contd.)
Let the required lower triangular matrix be of the form
 
Lk 0
L= ,
lT l(k+1)(k+1)
where the real number l(k+1)(k+1) and the vector
l = (l1(k+1) , l2(k+1) , · · · , lk(k+1) )T are to be chosen such that

MA 214 - NA Spring 2023-24 6 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let the required lower triangular matrix be of the form
 
Lk 0
L= ,
lT l(k+1)(k+1)
where the real number l(k+1)(k+1) and the vector
l = (l1(k+1) , l2(k+1) , · · · , lk(k+1) )T are to be chosen such that
! ! T
!
Ak a Lk 0 Lk l
= .
aT a(k+1)(k+1) lT l(k+1)(k+1) 0T l(k+1)(k+1)

MA 214 - NA Spring 2023-24 6 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let the required lower triangular matrix be of the form
 
Lk 0
L= ,
lT l(k+1)(k+1)
where the real number l(k+1)(k+1) and the vector
l = (l1(k+1) , l2(k+1) , · · · , lk(k+1) )T are to be chosen such that
! ! T
!
Ak a Lk 0 Lk l
= .
aT a(k+1)(k+1) lT l(k+1)(k+1) 0T l(k+1)(k+1)

⇒ Lk l = a

MA 214 - NA Spring 2023-24 6 / 26


LU Factorization: Cholesky’s factorization (contd.)
Let the required lower triangular matrix be of the form
 
Lk 0
L= ,
lT l(k+1)(k+1)
where the real number l(k+1)(k+1) and the vector
l = (l1(k+1) , l2(k+1) , · · · , lk(k+1) )T are to be chosen such that
! ! T
!
Ak a Lk 0 Lk l
= .
aT a(k+1)(k+1) lT l(k+1)(k+1) 0T l(k+1)(k+1)

⇒ Lk l = a
A forward substitution yields the vector l. (Lk is invertible !?)
MA 214 - NA Spring 2023-24 6 / 26
LU Factorization: Cholesky’s factorization (contd.)

Finally, we have
lT l + l(k+1)(k+1)
2
= a(k+1)(k+1)
and this gives
2
l(k+1)(k+1) = a(k+1)(k+1) − lT l,
Noting that l2(k+1)(k+1) is positive and taking square root, we are done.

MA 214 - NA Spring 2023-24 7 / 26


LU Factorization: Cholesky’s factorization (contd.)
Example:
 
9 3 −2
A=  3 2 3 .
−2 3 23

MA 214 - NA Spring 2023-24 8 / 26


LU Factorization: Cholesky’s factorization (contd.)
Example:
 
9 3 −2
A=  3 2 3 .
−2 3 23

1 L1 = (3).

MA 214 - NA Spring 2023-24 8 / 26


LU Factorization: Cholesky’s factorization (contd.)
Example:
 
9 3 −2
A=  3 2 3 .
−2 3 23

1 L1 = (3).
 
3 0
2 L2 = .
1 1

MA 214 - NA Spring 2023-24 8 / 26


LU Factorization: Cholesky’s factorization (contd.)
Example:
 
9 3 −2
A=  3 2 3 .
−2 3 23

1 L1 = (3).
 
3
0
2 L2 = .
1
1
 
3 0 0
3 L= 1 1 √ 0 .

−2/3 11/3 82/3
MA 214 - NA Spring 2023-24 8 / 26
LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:

MA 214 - NA Spring 2023-24 9 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33

MA 214 - NA Spring 2023-24 9 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33

⇒ l11 = a11 ,

MA 214 - NA Spring 2023-24 9 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l l l33 0 0 l33
q 31 32

⇒ l11 = a11 , l22 = a22 − l21
2,

MA 214 - NA Spring 2023-24 9 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0   0 l22 l32 
a31 a32 a33 l l l 0 0 l33
q 31 32 33 q 

⇒ l11 = a11 , l22 = a22 − l21
2, l =
33 a 33 − l 2 + l2 .
31 32

MA 214 - NA Spring 2023-24 9 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0   0 l22 l32 
a31 a32 a33 l l l 0 0 l33
q 31 32 33 q 

⇒ l11 = a11 , l22 = a22 − l21
2, l =
33 a 33 − l 2 + l2 .
31 32
In general, diagonal elements are
v
u
u Xi−1
t
l = a − l 2 , i = 1, 2, . . . , n.
ii ii ik
k=1
MA 214 - NA Spring 2023-24 9 / 26
LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33

MA 214 - NA Spring 2023-24 10 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33
a21
l21 = ,
l11

MA 214 - NA Spring 2023-24 10 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0  0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33
a21 a31
l21 = , l31 = ,
l11 l11

MA 214 - NA Spring 2023-24 10 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0   0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33
a21 a31 1
l21 = , l31 = , l32 = (a32 − l31 l21 ) .
l11 l11 l22

MA 214 - NA Spring 2023-24 10 / 26


LU Factorization: Cholesky’s factorization (contd.)
Other ways to compute L
Direct comparison:
    
a11 a12 a13 l11 0 0 l11 l21 l31
a21 a22 a23  = l21 l22 0   0 l22 l32 
a31 a32 a33 l31 l32 l33 0 0 l33
a21 a31 1
l21 = , l31 = , l32 = (a32 − l31 l21 ) .
l11 l11 l22
In general, non-diagonal elements are
!
1 Xj−1
lij = aij − lik ljk , i = 1, 2, . . . , n, j = 1, 2, . . . , i − 1.
ljj
k=1
MA 214 - NA Spring 2023-24 10 / 26
Operation Count
Cholesky’s Factorization
Non-diagonal elements are
!
1 X
j−1
lij = aij − lik ljk ;
ljj
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1),
lij = aij − lik ljk ;
ljj
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1, addition: j − 2,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1, addition: j − 2,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1, addition: j − 2,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.
Xn X i−1
⇒ j (Multiplication/Division)
i=1 j=1

MA 214 - NA Spring 2023-24 11 / 26


Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1, addition: j − 2,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.
Xn X i−1
⇒ j (Multiplication/Division)
i=1 j=1

X
n X
i−1
+ (j − 1) (Addition/Subtraction)
i=1 j=1
MA 214 - NA Spring 2023-24 11 / 26
Operation Count
Cholesky’s Factorization
Non-diagonal elements are for each j,
!
1 X
j−1
division: 1(i > 1), subtraction: 1(i > 2, j > 1),
lij = aij − lik ljk ;
ljj multiplication: j − 1, addition: j − 2,
k=1
for i = 1, 2, . . . , n; j = 1, 2, . . . , i − 1.
Xn X i−1
⇒ j (Multiplication/Division)
i=1 j=1

X
n X
i−1
n3
+ (j − 1) (Addition/Subtraction) = + O(n2 ).
3
i=1 j=1
MA 214 - NA Spring 2023-24 11 / 26
Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u
u X
i−1
t
l = a − l 2,
ii ii ik
k=1

for i = 1, 2, . . . , n.

MA 214 - NA Spring 2023-24 12 / 26


Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u subtraction: 1 (i > 1),
u X
i−1
t
l = a − 2
l ,
ii ii ik
k=1

for i = 1, 2, . . . , n.

MA 214 - NA Spring 2023-24 12 / 26


Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u subtraction: 1 (i > 1),
u X
i−1
t
lii = aii − lik , addition: i − 2,
2

k=1

for i = 1, 2, . . . , n.

MA 214 - NA Spring 2023-24 12 / 26


Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u subtraction: 1 (i > 1),
u X
i−1
t
lii = aii − lik , addition: i − 2,
2

k=1 multiplication: i − 1.

for i = 1, 2, . . . , n.

MA 214 - NA Spring 2023-24 12 / 26


Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u subtraction: 1 (i > 1),
u X
i−1
t
lii = aii − lik , addition: i − 2,
2

k=1 multiplication: i − 1.

for i = 1, 2, . . . , n.
X
n
⇒ 2 (i − 1) = n(n − 1).
i=1

MA 214 - NA Spring 2023-24 12 / 26


Operation Count (contd.)
Cholesky’s Factorization
Diagonal elements are
v
u subtraction: 1 (i > 1),
u X
i−1
t
lii = aii − lik , addition: i − 2,
2

k=1 multiplication: i − 1.

for i = 1, 2, . . . , n.
X
n
⇒ 2 (i − 1) = n(n − 1).
i=1
n3
Total arithmetic operations (or Total flops) = +O(n2 )
3
MA 214 - NA Spring 2023-24 12 / 26
Operation Count (contd.)

Gaussian Elimination Method

MA 214 - NA Spring 2023-24 13 / 26


Operation Count (contd.)

Gaussian Elimination Method

Let us divide the count into three parts.


1 The elimination step.
2 Modification of the right side
3 Backward substitution

MA 214 - NA Spring 2023-24 13 / 26


Operation Count (contd.)

1. The Elimination Step

a11 x1 + a12 x2 + · · · + a1n xn = b1


a21 x1 + a22 x2 + · · · + a2n xn = b2
···
···
···
an1 x1 + an2 x2 + · · · + ann xn = bn

MA 214 - NA Spring 2023-24 14 / 26


Operation Count (contd.)
1. The Elimination Step

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
1. The Elimination Step
Step Additions/Subtractions Multiplications Divisions
1 (n − 1)2 (n − 1)2 n−1

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
1. The Elimination Step
Step Additions/Subtractions Multiplications Divisions
1 (n − 1)2 (n − 1)2 n−1
2 (n − 2)2
(n − 2) 2
n−2

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
1. The Elimination Step
Step Additions/Subtractions Multiplications Divisions
1 (n − 1)2 (n − 1)2 n−1
2 (n − 2)2
(n − 2) 2
n−2
. . . .
. . . .
. . . .
n−1 1 1 1

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
1. The Elimination Step
Step Additions/Subtractions Multiplications Divisions
1 (n − 1)2 (n − 1)2 n−1
2 (n − 2) 2
(n − 2) 2
n−2
. . . .
. . . .
. . . .
n−1 1 1 1
n(n−1)(2n−1) n(n−1)(2n−1) n(n−1)
Total 6 6 2

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
1. The Elimination Step
Step Additions/Subtractions Multiplications Divisions
1 (n − 1)2 (n − 1)2 n−1
2 (n − 2) 2
(n − 2) 2
n−2
. . . .
. . . .
. . . .
n−1 1 1 1
n(n−1)(2n−1) n(n−1)(2n−1) n(n−1)
Total 6 6 2
Here we use the formula
Xp
p(p + 1) X 2
p
p(p + 1)(2p + 1)
j= , j = , p ≥ 1.
2 6
j=1 j=1

MA 214 - NA Spring 2023-24 15 / 26


Operation Count (contd.)
2. Modification of the right side

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side
n(n−1)
Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = 2

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2
3. The back substitution

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2
3. The back substitution
n(n−1)
Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = 2

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2
3. The back substitution
Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
Multiplication/Division = n + (n − 1) + · · · + 1 = n(n+1)
2

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2
3. The back substitution
Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
Multiplication/Division = n + (n − 1) + · · · + 1 = n(n+1)
2
Total number of operations

MA 214 - NA Spring 2023-24 16 / 26


Operation Count (contd.)
2. Modification of the right side

Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
n(n−1)
Multiplication/Division = (n − 1) + (n − 2) + · · · + 1 = 2
3. The back substitution
Addition/Subtraction = (n − 1) + (n − 2) + · · · + 1 = n(n−1)
2
Multiplication/Division = n + (n − 1) + · · · + 1 = n(n+1)
2
Total number of operations

Addition/Subtraction = n(n−1)(2n−1)
6 + n(n−1)
2 + n(n−1)
2 = n(n−1)(2n+5)
6
2
Multiplication/Division = n(n +3n−1)
3
MA 214 - NA Spring 2023-24 16 / 26
Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2

MA 214 - NA Spring 2023-24 17 / 26


Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2
1
= (n3 − n)
3

MA 214 - NA Spring 2023-24 17 / 26


Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2
1
= (n3 − n)
3
1 3
= n (1 − 1/n2 )
3

MA 214 - NA Spring 2023-24 17 / 26


Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2
1
= (n3 − n)
3
1 3
= n (1 − 1/n2 )
3
1
≈ n3 ,
3

MA 214 - NA Spring 2023-24 17 / 26


Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2
1
= (n3 − n)
3
1 3
= n (1 − 1/n2 )
3
1
≈ n3 ,
3
whereas the remaining steps counts only
n(n − 1) n(n + 1)
Multiplication/Division = +
2 2
MA 214 - NA Spring 2023-24 17 / 26
Operation Count (contd.)
For elimination, we have
n(n − 1)(2n − 1) n(n − 1)
Multiplication/Division = +
6 2
1
= (n3 − n)
3
1 3
= n (1 − 1/n2 )
3
1
≈ n3 ,
3
whereas the remaining steps counts only
n(n − 1) n(n + 1)
Multiplication/Division = + = n2
2 2
MA 214 - NA Spring 2023-24 17 / 26
Operation Count (contd.)

The operation count in

Elimination step = O(n3 ),

MA 214 - NA Spring 2023-24 18 / 26


Operation Count (contd.)

The operation count in

Elimination step = O(n3 ),


RHS modification = O(n2 ),

MA 214 - NA Spring 2023-24 18 / 26


Operation Count (contd.)

The operation count in

Elimination step = O(n3 ),


RHS modification = O(n2 ),
Backward substitution = O(n2 ),

MA 214 - NA Spring 2023-24 18 / 26


Operation Count (contd.)

The operation count in

Elimination step = O(n3 ),


RHS modification = O(n2 ),
Backward substitution = O(n2 ),

as n → ∞. Hence, once the elimination part is completed, it is much


less expensive to solve the linear system.

MA 214 - NA Spring 2023-24 18 / 26


Operation Count (contd.)

LU factorization of A using naive Gaussian elimination method


2
Total number of operations = n3 + O(n2 ).
3

MA 214 - NA Spring 2023-24 19 / 26


Operation Count (contd.)

LU factorization of A using naive Gaussian elimination method


2
Total number of operations = n3 + O(n2 ).
3

In Cholesky’s factorization
1
Total number of operations = n3 + O(n2 ).
3

MA 214 - NA Spring 2023-24 19 / 26


Vector Norms

Definition (Vector Norm)

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms

Definition (Vector Norm)


A vector norm on Rn is a function ∥ · ∥ : Rn → [0, ∞) having the
following properties:

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms

Definition (Vector Norm)


A vector norm on Rn is a function ∥ · ∥ : Rn → [0, ∞) having the
following properties:
1 ∥x∥ ≥ 0 for all x ∈ Rn .

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms

Definition (Vector Norm)


A vector norm on Rn is a function ∥ · ∥ : Rn → [0, ∞) having the
following properties:
1 ∥x∥ ≥ 0 for all x ∈ Rn .
2 ∥x∥ = 0 if and only if x = 0.

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms

Definition (Vector Norm)


A vector norm on Rn is a function ∥ · ∥ : Rn → [0, ∞) having the
following properties:
1 ∥x∥ ≥ 0 for all x ∈ Rn .
2 ∥x∥ = 0 if and only if x = 0.
3 ∥αx∥ = |α|∥x∥ for all x ∈ Rn and for all α ∈ R.

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms

Definition (Vector Norm)


A vector norm on Rn is a function ∥ · ∥ : Rn → [0, ∞) having the
following properties:
1 ∥x∥ ≥ 0 for all x ∈ Rn .
2 ∥x∥ = 0 if and only if x = 0.
3 ∥αx∥ = |α|∥x∥ for all x ∈ Rn and for all α ∈ R.
4 ∥x + y∥ ≤ ∥x∥ + ∥y∥ for all x, y ∈ Rn .

MA 214 - NA Spring 2023-24 20 / 26


Vector Norms (contd.)
Notation : x = (x1 , x2 , · · · , xn )T ∈ Rn .

MA 214 - NA Spring 2023-24 21 / 26


Vector Norms (contd.)
Notation : x = (x1 , x2 , · · · , xn )T ∈ Rn .
Example:
1 Euclidean norm on Rn is denoted
v by ∥ · ∥2 , and is defined by
u n
uX
∥x∥2 = t |xi |2 .
i=1

MA 214 - NA Spring 2023-24 21 / 26


Vector Norms (contd.)
Notation : x = (x1 , x2 , · · · , xn )T ∈ Rn .
Example:
1 Euclidean norm on Rn is denoted
v by ∥ · ∥2 , and is defined by
u n
uX
∥x∥2 = t |xi |2 .
i=1
2 l∞ norm, which is also called maximum norm, on Rn is denoted
by ∥ · ∥∞ , and is defined by
∥x∥∞ = max { |x1 |, |x2 |, · · · , |xn | } .

MA 214 - NA Spring 2023-24 21 / 26


Vector Norms (contd.)
Notation : x = (x1 , x2 , · · · , xn )T ∈ Rn .
Example:
1 Euclidean norm on Rn is denoted
v by ∥ · ∥2 , and is defined by
u n
uX
∥x∥2 = t |xi |2 .
i=1
2 l∞ norm, which is also called maximum norm, on Rn is denoted
by ∥ · ∥∞ , and is defined by
∥x∥∞ = max { |x1 |, |x2 |, · · · , |xn | } .
3 l1 norm on Rn is denoted by ∥ · ∥1 , and is defined by
∥x∥1 = |x1 | + |x2 | + · · · + |xn |.
MA 214 - NA Spring 2023-24 21 / 26
Equivalent Norms
Two norms ∥ · ∥ and ∥ · ∥′ are said to be equivalent if there exist
positive constants m and M such that

m∥x∥ ≤ ∥x∥′ ≤ M∥x∥ ∀x ∈ Rn

♣ All norms are equivalent on Rn


♣ ∥ · ∥ℓ∞ and ∥ · ∥ℓp norms are equivalent:
! p1
X
n r √
max |xi | ≤ |xi |p ≤ ∥x∥ℓ∞ 1
p |
+ · ·
{z }· + 1 = p
n ∥x∥ℓ∞
1≤i≤n
i=1 n terms

MA 214 - NA Spring 2023-24 22 / 26


Thus we have √
∥x∥ℓ∞ ≤ ∥x∥ℓp ≤ p
n ∥x∥ℓ∞
proving that ∥ · ∥ℓ∞ and ∥ · ∥ℓp norms are equivalent

MA 214 - NA Spring 2023-24 23 / 26


equivalent norms (contd.)
♣ ∥ · ∥ℓ1 and ∥ · ∥ℓ2 norms are equivalent:
Recall the identity:
!2
X
n X
n X
n X
i−1
|xi | = 2
|xi | + 2 |xj | |xi |
i=1 i=1 i=1 j=1
| {z }
≥0

i.e. ∥x∥2ℓ1 ≥ ∥x∥2ℓ2


Cauchy-Schwarz inequality
! 12 ! 21
X
n X
n X
n
|⟨f, g⟩| = fi gi ≤ |fi |2 |gi |2
i=1 i=1 i=1
! 12 ! 21
X
n X
n X
n

=⇒ |xi | ≤ 2
|xi | 1 = n ∥x∥ℓ2
i=1 i=1
MA 214 - NA i=1 Spring 2023-24 24 / 26
So, together we have

∥x∥ℓ2 ≤ ∥x∥ℓ1 ≤ n∥x∥ℓ2

MA 214 - NA Spring 2023-24 25 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:

MA 214 - NA Spring 2023-24 26 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:
1 ∥A∥ ≥ 0 for all A ∈ Mn (R).

MA 214 - NA Spring 2023-24 26 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:
1 ∥A∥ ≥ 0 for all A ∈ Mn (R).
2 ∥A∥ = 0 if and only if A = 0.

MA 214 - NA Spring 2023-24 26 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:
1 ∥A∥ ≥ 0 for all A ∈ Mn (R).
2 ∥A∥ = 0 if and only if A = 0.
3 ∥αA∥ = |α|∥A∥ for all A ∈ Mn (R) and for all α ∈ R.

MA 214 - NA Spring 2023-24 26 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:
1 ∥A∥ ≥ 0 for all A ∈ Mn (R).
2 ∥A∥ = 0 if and only if A = 0.
3 ∥αA∥ = |α|∥A∥ for all A ∈ Mn (R) and for all α ∈ R.
4 ∥A + B∥ ≤ ∥A∥ + ∥B∥ for all A, B ∈ Mn (R).

MA 214 - NA Spring 2023-24 26 / 26


Matrix Norms

Definition (Matrix Norm)


A matrix norm on the vector space of all n × n real matrices Mn (R)
is a function ∥ · ∥ : Mn (R) → [0, ∞) having the following properties:
1 ∥A∥ ≥ 0 for all A ∈ Mn (R).
2 ∥A∥ = 0 if and only if A = 0.
3 ∥αA∥ = |α|∥A∥ for all A ∈ Mn (R) and for all α ∈ R.
4 ∥A + B∥ ≤ ∥A∥ + ∥B∥ for all A, B ∈ Mn (R).
We use the notation
A = (aij )1≤i≤n
1≤j≤n

MA 214 - NA Spring 2023-24 26 / 26

You might also like