Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Note: sensitivity gauge depends on the chosen norm !<br />
Example 2.5.11 (Intersection of lines in 2D).<br />
In distance metric:<br />
2.6 Sparse Matrices<br />
A classification of matrices:<br />
Dense matrices (ger.: vollbesetzt)<br />
sparse matrices (ger.: dünnbesetzt)<br />
nearly orthogonal intersection: well-conditioned<br />
glancing intersection: ill-conditioned<br />
Notion 2.6.1 (Sparse matrix). A ∈ K m,n , m, n ∈ N, is sparse, if<br />
nnz(A) := #{(i,j) ∈ {1, . ..,m} × {1, ...,n}: a ij ≠ 0} ≪ mn .<br />
Sloppy parlance: matrix sparse :⇔ “almost all” entries = 0 /“only a few percent of” entries ≠ 0<br />
Hessian normal form of line #i, i = 1, 2:<br />
L i = {x ∈ R 2 : x T n i = d i } , n i ∈ R 2 , d i ∈ R .<br />
( ) ( )<br />
n T<br />
intersection: 1 d1<br />
n<br />
} {{ T x = ,<br />
d<br />
2 2<br />
} } {{ }<br />
=:A =:b<br />
n i ˆ= (unit) direction vectors, d i ˆ= distance to origin.<br />
Ôº½¿ ¾º<br />
A more rigorous “mathematical” definition:<br />
Definition 2.6.2 (Sparse matrices).<br />
Given a strictly increasing sequences m : N ↦→ N, n : N ↦→ N, a family (A (l) ) l∈N of matrices<br />
with A (l) ∈ K m l,n l is sparse (opposite: dense), if<br />
nnz(A (l) ) := #{(i,j) ∈ {1, ...,m i } × {1, ...,n i }: a (l)<br />
Ôº½¿ ¾º<br />
ij ≠ 0} = O(n i + m i ) for i → ∞ .<br />
Code 2.5.12: condition numbers of 2 × 2 matrices<br />
1 r = [ ] ;<br />
2 for phi=pi / 2 0 0 : pi / 1 0 0 : pi /2<br />
3 A = [ 1 , cos ( phi ) ; 0 , sin ( phi ) ] ;<br />
4 r = [ r ; phi ,<br />
cond (A) ,cond (A, ’ i n f ’ ) ] ;<br />
5 end<br />
6 plot ( r ( : , 1 ) , r ( : , 2 ) , ’ r−’ ,<br />
r ( : , 1 ) , r ( : , 3 ) , ’ b−−’ ) ;<br />
7 xlabel ( ’ { \ b f angle o f n_1 ,<br />
n_2 } ’ , ’ f o n t s i z e ’ ,14) ;<br />
8 ylabel ( ’ { \ b f c o n d i t i o n<br />
numbers } ’ , ’ f o n t s i z e ’ ,14) ;<br />
9 legend ( ’2−norm ’ , ’max−norm ’ ) ;<br />
10 p r i n t −depsc2<br />
’ . . / PICTURES/ l i n e s e c . eps ’ ;<br />
condition numbers<br />
140<br />
120<br />
100<br />
80<br />
60<br />
40<br />
20<br />
2−norm<br />
max−norm<br />
0<br />
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6<br />
angle of n 1<br />
, n 2<br />
Fig. 10<br />
✸<br />
Simple example: families of diagonal matrices (→ Def. 2.2.1)<br />
Example 2.6.1 (Sparse LSE in circuit modelling).<br />
Modern electric circuits (VLSI chips):<br />
10 5 − 10 7 circuit elements<br />
• Each element is connected to only a few nodes<br />
• Each node is connected to only a few elements<br />
[In the case of a linear circuit]<br />
nodal analysis ➤ sparse circuit matrix<br />
✸<br />
Heuristics:<br />
Ôº½¿ ¾º<br />
cond(A) ≫ 1 ↔ columns/rows of A “almost linearly dependent”<br />
Another important context in which sparse matrices usually arise:<br />
☛ discretization of boundary value problems for partial differential equations (→ 4th semester<br />
course “<strong>Numerical</strong> treatment of PDEs”<br />
Ôº½¼ ¾º