Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Matrices with upper and lower bandwidth zero are diagonal. If D E 1Rm x n is diagonal,
then we use the notation
D = diag(d i , . . . , dq) ,
q = min{m, n}
=::::> di = dii
Shortcut notations when the dimension is clear include diag(d) and diag (di ) Note
that if D = diag(d) E 1Rn x n and x E 1Rn , then Dx = d. * x. If A E 1Rm x n , then pre
multiplication by D = diag(d 1 , . . . , dm) E 1Rm x m scales rows,
B(i, : ) = di A(i, : ) , i = l :m
B = DA
B(:, j) = dr A ( : , j ) , j = l :n.
Symmetry
Skew-Symmetric:
2 3
4 5
5 6
'
0 -2 3
2 0 -5
-3 5 0
2 - 3i 4 - 5i
6
7 - 8i
9
7+8i
Hermitian:
, Skew-Hermitian:
'
i
-2+3i -4+5i
2 + 3i
6i
-7+ 8i
4+ 5i 7+8i
9i
For such matrices, storage requirements can be halved by simply storing the lower
triangle of elements, e.g. ,
2 3
4 5
5 6
A. vec = [ 1 2 3 4 5 6 ] .
a ij 1
( 1 .2.2)
1 . 2.
19
y + Ax.
for j = l :n
for i = l :j - 1
y( i ) = y( i ) + A.vec( (i - l)n i(i - 1)/2 + j)x(j)
end
for i = j:n
y( i ) = y( i ) + A.vec( (j - l )n - j (j - 1) /2 + i )x(j)
end
end
-
This algorithm requires the same 2n 2 flops that an ordinary gaxpy requires.
1.2.8
In , e.g. ,
We use the notation e i to designate the 'ith column of In . If the rows of In are reordered,
then the resulting matrix is said to be a permutation matrix, e.g. ,
P
[ nJ
(1 .2.3)
1 .2.9
For permutation matrix work and block matrix manipulation (1 .3) it is convenient to
have a method for specifying structured integer vectors of subscripts. The MATLAB
colon notation is again the proper vehicle and a few examples suffice to show how it
works. If n = 8, then
v = 1:2:n
v = n: -1 : 1
v = [ ( 1 :2:n) (2:2:n) ]
==:}
==:}
==:}
v = [ 1 3 5 7] ,
v= [s165432 1J,
v= [13572468J.