CSE6643/MATH6643:Numerical Linear Algebra: Haesun Park
CSE6643/MATH6643:Numerical Linear Algebra: Haesun Park
CSE6643/MATH6643:Numerical Linear Algebra: Haesun Park
Haesun Park
hpark@cc.gatech.edu
Lecture 2
Introduction
1
1.1
Introduction
Topics
3. Eigenvalue problem Ax = x, (x 6= 0)
Introduction
1.2
Sherman-Morrison formula
Sherman-Morrison formula:
A is a nonsingular, and v T A1 u 6= 1 then
T 1
(A + uv )
=A
A1 uv T A1
1 + v T A1 u
T
1
T 1
A1 uv T A1
Iuv T A1
uv T A1 uv T A1
(A+uv ) A 1+vT A1 u = I 1+v
+uv
A
=
T A1 u
1+v T A1 u
I
uv T A1 +(v T A1 u)uv T A1
1+v T A1 u
+ uv T A1 = I
Introduction
Sherman-Morrison-Woodbury formula:
A is nonsingular and A Rnn . U Rnk , V Rnk and Ik + V T A1 U is
nonsingular, then
(A + U V T )1 = A1 A1 U (Ik + V T A1 U )1 V A1
0
1
0
1
1 2 3
1
B
C
B
C
Example: A = @ 4 5 6 A, b = @ 1 A
7 8 10
1
Assume
to 3,0i.e. 1
0 A(1, 1) changes
1
3 2 3
2
B
C
B
C
A = @ 4 5 6 A = A + @ 0 A 1 0 0
7 8 10
0
1 uT vA1
1
1
A
b
then x
= A b = A
T
1+v Au
Introduction
1.3
Misc
Outer product u v T : n n
Inner product: uT v, 1 1
Range(A) or Ran(A)
6
A A=6
4
aT1
h
.. 7
7
. 5 a1
aTn
an
= (aTi aj ) = In
Introduction
Special matrix:
diagonal matrix
triangle matrix: upper and lower
Hessenberg matrix: upper and lower
Symmetric matrix AT = A
Symmetric positive (semi) definite: if for all v 6= 0, v T Av > 0 (v T Av 0)
2.1
Vector norm
`Pn
p 1/p
|x
|
p-norms kxkp =
Pn i=1 i
p = 1, kxk1 = i=1 |xi |
qP
2
n
p = 2, kxk2 =
|x
|
i
i=1
p = , kxk = max1in |xi |
kxk = lim kxkp = lim (|xi |p )1/p = max1in |xi |
p
1
2
1
1
1
n
1
1
n
1
Matrix Norm
1.
2.
3.
4.
For A Rmn :
\
1
2
1
1
m
m
2
n
1
m
n
n
1
F
n
n
nm
we have kAk2 kAkF
X:n n,non-singular
kAkX = X AX
e.g. kA BkF = 105
Exercise: prove
kAk1 n kAk
kAk1 n kAkF
m
1
n
1
2. kAZkF = kAkF
1. kQAkF = Q a1
kQa1 k22
kQan k22
T
an
i2
2
2
= kQa1 k + + kQan k =
F
+ +
note: kXk22 = X X
kQai k22 = (Qai )T Qai = aTi QT Qai = aTi ai = kai k22
2
3
T
1
6 . 7
7
6
2. exercise kAZkF =
4 .. 5 Z
a
m
F
Floating-Point Arithmetic
Floating-point representation:
Set of floating point numbers
F = (b, t, L, u) = {d1 dt be | 0 dk b 1, d16=0 , L e U } , {0}
where [L, U ] is exponent range, b is the base, t is mantissa length.
For any f F , m |F | M , m = bL1 , M = bu (1 bt ).
overflow |f | > M
underflow |f | < M
LU Factorization
3
LU Factorization
3.1
Linear Equations
LU Factorization
For what matrix A is Ax = b an easy problem?
1. A is diagonal
2. A is triangular, focus on upper-triangular here
"
#"
# "
#
a11 a12
x1
b1
e.g. n = 2,
=
0
a12
x2
b2
a22 x2 = b2 x2 = b2 /a22
consider general n, k-th equation is
0 + + 0 + akk xk + ak,k+1 xk+1 + + ak,n xn = bk
n
P
xk = (bk
akj xj )/akk
j=k+1
LU Factorization
Algorithm 1: Back Substitution
P
2
for k = n : 1 : 1 > n
(2(n
k)
+
1)
n
flops
k=1
for j = k + 1 : n -> 2(n k) flops
bk = bk akj xj
end
xk = bk /ak,k
end
LU Factorization
Flops
1 flop one (, /, +, )
(old version) 1 flop one (or/, +or)
What about general A?
6
6
Lets assume A can be factored into A = LU where L = 6
4
and U is upper-triangular.
Then Ax = b can be solved by Ax = b L(U x) = b
1. Solve Ly = b for y
2. Solve U x = y for x
1
x
x
x
1
x
x
1
x
3
1
7
7
7,
5