









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Convex Optimization — Boyd & Vandenberghe
-^ matrix structure and algorithm complexity •^ solving linear equations with factored matrices •^ LU, Cholesky, LDL
T^ factorization
-^ block elimination and the matrix inversion lemma •^ solving underdetermined equations
cost (execution time) of solving
Ax
=^ b
with
n R ×n
-^ for general methods, grows as
(^3) n
-^ less if
A^ is structured (banded, sparse, Toeplitz,... ) flop counts^ •^ flop (floating-point operation): one addition, subtraction,multiplication, or division of two floating-point numbers^ •^ to estimate complexity of an algorithm: express number of flops as a(polynomial) function of the problem dimensions, and simplify bykeeping only the leading terms^ •^ not an accurate predictor of computation time on modern computers^ •^ useful as a rough estimate of complexity Numerical linear algebra background
diagonal matrices
(aij
if^ i
6 =^ j
):^ n
flops
x^ =
1 b^ = (
b/a^1
,... , b 11
/an
)nn
lower triangular
(aij
if^ j > i
):^ n
2 flops
x^1
b/a^1
11
x^2
(b^2 −^ a
x 211 )/a^22
x^3
(b^3 −^ a
x 311 −^ a
x 322 )/a 33
xn^
(bn^
−^ a
xn 1
an^2 x− · · · −^2
an,n
x− 1 n−^1
)/a nn
called forward substitution upper triangular
(aij
if^ j < i
):^ n
2 flops via backward substitution
Numerical linear algebra background
orthogonal matrices:
(^2) nflops to compute
x^ =
b^ for general
-^ less with structure,
e.g.
, if^
2 uu
T^ with
‖u‖
, we can
compute
x^ =
b^ =
b^ −
2(u
T^ b)u
in^4
n^ flops
permutation matrices:
aij^
j^ =
πi 0 otherwise
where
π^ = (
π, π^1
,... , π 2
)^ is a permutation ofn
2 ,... , n
-^ interpretation:
Ax
x,... , xπ^1
)πn
-^ satisfies
, hence cost of solving
Ax
=^ b
is 0 flops
example:
Numerical linear algebra background
every nonsingular matrix
A^ can be factored as
with
a permutation matrix,
L^ lower triangular,
upper triangular
cost:
3)n 3 flops Solving linear equations by LU factorization. given
a set of linear equations
Ax
=^ b
, with
A^ nonsingular.
1.^ LU factorization.
Factor
A^ as
A^ =
P LU
((
/3)n
3 flops).
2.^ Permutation.
Solve
P z
=^1 b^ (^0
flops).
3.^ Forward substitution.
Solve
Lz^2
=^ z
(n 1 2 flops).
4.^ Backward substitution.
Solve
U x
=^ z
(n 2 2 flops).
cost:
3)n
(^2) n≈
3)n
3 for large
n
Numerical linear algebra background
sparse LU factorization
2
-^ adding permutation matrix
offers possibility of sparser
U^ (hence,
cheaper factor and solve steps) • Pand^1
chosen (heuristically) to yield sparse
-^ choice of
and
depends on sparsity pattern and values of
-^ cost is usually much less than
3)n
3 ; exact value depends in a
complicated way on
n, number of zeros in
A, sparsity pattern
Numerical linear algebra background
sparse Cholesky factorization
-^ adding permutation matrix
offers possibility of sparser
chosen (heuristically) to yield sparse
-^ choice of
only depends on sparsity pattern of
A^ (unlike sparse LU)
-^ cost is usually much less than
3)n
3 ; exact value depends in a
complicated way on
n, number of zeros in
A, sparsity pattern
Numerical linear algebra background
every nonsingular symmetric matrix
A^ can be factored as A^ =
with
a permutation matrix,
L^ lower triangular,
block diagonal with
1 or
2 diagonal blocks
cost:
3)n 3
-^ cost of solving symmetric sets of linear equations by LDL
T^ factorization:
(^3) n+ 2
(^2) n≈
3)n
3 for large
n
-^ for sparse
A, can choose
to yield sparse
L; cost
(^3) n
Numerical linear algebra background
dominant terms in flop count^ •^ step 1:
f^ +
ns^2
(f^
is cost of factoring
;^ s^ is cost of solve step)
-^ step 2:
2 n
2 n^1
(cost dominated by product of
and
-^ step 3:
3)n
32
total:
f^ +
ns^2
(^2) nn 2
/3)n
32
examples^ •^ general
(f^
/3)n
3 ,^ s 1
(^2) n): no gain over standard method 1
#flops
/3)n
(^2) nn 1
(^2) nn 2
/3)n
n+^1
n)^2
3
-^ block elimination is useful for structured
(f^ ≪^ n
for example, diagonal (
f^ = 0
,^ s^ =
n): #flops^1
(^2) nn 2
/3)n
32
Numerical linear algebra background
)x^ =
b
n×n
n×p
p×n
-^ assume
A^ has structure (
Ax^
=^ b
easy to solve)
first write as
x y
[^ b^0
now apply block elimination: solve
)y^ =
−^1 b,
then solve
Ax
=^ b
−^ By
this proves the
matrix inversion lemma:
if^ A
and
nonsingular,
−^1
Numerical linear algebra background
if^ A
p×n
with
p < n
,^ rank
p,
{x^ |
Ax
=^ b
{F z
|^ z^
n−p
-^ ˆx
is (any) particular solution
-^ columns of
n R ×(n−
p)^ span nullspace of
-^ there exist several numerical methods for computing
(QR factorization, rectangular LU factorization,... ) Numerical linear algebra background