Numerical Method For Linear Algebra
Numerical Method For Linear Algebra
91
92
93
94
orthogonal matrices: A1 = AT
2n2 flops to compute x = AT b for general A
less with structure, e.g., if A = I 2uuT with kuk2 = 1, we can
compute x = AT b = b 2(uT b)u in 4n flops
permutation matrices:
aij =
1 j = i
0 otherwise
0 1 0
A = 0 0 1 ,
1 0 0
Numerical linear algebra background
A1
0 0 1
= AT = 1 0 0
0 1 0
95
A
compute x = A1b = A1
2 A1 b by solving k easy equations
k
A1x1 = b,
A2 x 2 = x 1 ,
...,
Ak x = xk1
Ax2 = b2,
...,
Axm = bm
96
LU factorization
every nonsingular matrix A can be factored as
A = P LU
with P a permutation matrix, L lower triangular, U upper triangular
cost: (2/3)n3 flops
97
sparse LU factorization
A = P1LU P2
adding permutation matrix P2 offers possibility of sparser L, U (hence,
cheaper factor and solve steps)
P1 and P2 chosen (heuristically) to yield sparse L, U
choice of P1 and P2 depends on sparsity pattern and values of A
cost is usually much less than (2/3)n3; exact value depends in a
complicated way on n, number of zeros in A, sparsity pattern
98
Cholesky factorization
every positive definite A can be factored as
A = LLT
with L lower triangular
cost: (1/3)n3 flops
99
910
LDLT factorization
every nonsingular symmetric matrix A can be factored as
A = P LDLT P T
with P a permutation matrix, L lower triangular, D block diagonal with
1 1 or 2 2 diagonal blocks
cost: (1/3)n3
cost of solving symmetric sets of linear equations by LDLT factorization:
(1/3)n3 + 2n2 (1/3)n3 for large n
for sparse A, can choose P to yield sparse L; cost (1/3)n3
911
A11 A12
A21 A22
x1
x2
b1
b2
(1)
A
A
(A22 A21A1
12
2
2
21
11 b1
11
912
913
A B
C I
x
y
b
0
914
(2)
915
916