Dela 7-2
Dela 7-2
Dela 7-2
396
Positive
definite
symmetric
1.
2.
3.
There is also a test on the pivots .all > 0/ and a test on n determinants .all > 0/.
Are these matrices positive definite ? When their eigenvalues are positive,
construct matrices A with S D AT A and find the positive energy x T S x.
4 0
5 4
4 5
(a) S D
(b) S D
(c) S D
0 1
4 5
5 4
Example 1
Solution
(a)
The answers are yes, yes, and no. The eigenvalues of those matrices S are
4 and 1 : positive
(b)
9 and 1 : positive
(c)
A quicker test than eigenvalues uses two determinants : the 1 by 1 determinant S11 and
the 2 by 2 determinant of S . Example (b) has S11 D 5 and det S D 25 16 D 9 (pass).
Example (c) has S11 D 4 but det S D 16 25 D 9 (fail the test).
397
x1
x2
x1
x2
x1
x2
4
0
0
1
5
4
4
5
4
5
5
4
x1
x2
x1
x2
x1
x2
Positive energy is a fundamental property. This is the best definition of positive definiteness.
When the eigenvalues are positive, there will be many matrices A that give AT A D S .
One choice
of A is symmetric and positive definite ! Then AT A is A2 , and this choice
p
A D S is a true square root of S . The successful examples (a) and (b) have S D A 2 :
4 0
0 1
2
0
0
1
2
0
0
1
and
5 4
4 5
2
1
1
2
2
1
1
2
We know that all symmetric matrices have the form S pD VV T with orthonormal
eigenvectors in V . The diagonal
matrix
p
p has a square root , when all eigenvalues are
positive. In this case A D S D V V T is the symmetric positive definite square root :
p p
p
p
p p
S S D .V V T /.V V T / D V V T D S because V T V D I:
p
p
Starting from this unique square root S , other choices of A come easily. p
Multiply S
by any matrix Q that has orthonormal columns (so that QT Q D I ). Then Q S is another
choice for A (not a symmetric choice). In fact all choices come this way :
ATA D
p
p
p
p
AT A D .Q S /T .Q S / D SQT Q S D S:
I will choose a particular Q in Example 1, to get particular choices of A.
p
0
1
Example 1 (continued) Choose Q D
to multiply S . Then A D
1
0
0
1
2 0
0
1
4
T
A D
D
has S D A A D
1
0
0 1
2
0
0
0
1
2 1
1
2
5
A D
D
has S D AT A D
1
0
1 2
2
1
4
(1)
p
Q S.
0
1
4
5
398
The first two matrices are singular and positive semidefinitebut not the
third :
(d)
SD
0 0
0 1
(e)
SD
4
4
4
4
(f)
SD
4
4
4
4
.
The eigenvalues are 1; 0 and 8; 0 and 8; 0. The energies x T S x are x22 and 4.x1 C x2 /2
and 4.x1 x2 /2 . So the third matrix is actually negative semidefinite.
:::
Av r D r ur
Av rC1 D 0
Av n D 0
:::
(2)
The last n r vectors in V are a basis for the nullspace of A. The last m r vectors in U
are a basis for the nullspace of AT . The diagonal matrix is m by n, with r nonzeros.
Remember that V 1 D V T , because the columns v 1 ; : : : ; v n are orthonormal in Rn :
Singular Value Decomposition
AV D U
becomes
A D U V T :
(4)
399
i2
0
if j D i
if j i
(5)
This says that the vectors ui D Av i =i are orthonormal for i D 1; : : : ; r. They are a basis
for the column space of A. And the us are eigenvectors of the symmetric matrix AAT ,
which is usually different from S D AT A (but the eigenvalues 12 ; : : : ; r2 are the same).
Find the input and output eigenvectors v and u for the rectangular matrix A :
Example 3
AD
2
1
2 0
1 0
D U V T :
Solution
Compute S D AT A and its unit eigenvectors
v 1 ; v 2p
; v 3 . The eigenvalues 2
p
are 8; 2; 0 so the positive singular values are 1 D 8 and 2 D 2 :
2
5
AT A D 4 3
0
3
0
05
0
3
5
0
2p 3
2
1 4p 5
has v 1 D
2 ;
2
0
2 p 3
2
14 p 5
v2 D
2 ;
2
0
2 3
0
v3 D 4 0 5 :
1
The outputs
u1 D Av 1 =1 and u2 D Av 2 =2 are also orthonormal, with 1 D
p
2 D 2. Those vectors u1 and u2 are in the column space of A :
u1 D
2 2
1 1
0
0
v1
p D
8
1
0
and u2 D
2 2
1 1
0
0
v2
p D
2
0
1
p
8 and
2 2
1 1
0
0
1
0
0
1
" p
8 p0
0
2
0
0
2 p
2
1 4 p
2
2
0
p
p2
2
0
3T
0
0 5 :
2
400
Av j D j uj
SVD
Av j D 0
for j r
for j > r
AT uj D j v j
for j r
A uj D 0
for j > r
dim r
column
space
of A
row
space
of A
v1
vr
R
Avr D r ur
R
Avn D 0
vrC1 vn
nullspace
of A
dim n
1 u1
u1
Av1 D 1 u1
ur
r ur
um
urC1
nullspace
of A T
dim m
100
100
100
100
(6)
401
The first piece gives the norm of A which is 1 . The last piece gives the norm of A
which is 1=n when A is invertible. The condition number is 1 times 1=n :
Condition number of A
jj D
1
:
n
(8)
402
b 2 are
.
x T S x D 2x1 x2 certainly has a saddle point and not a minimum at .0; 0/. What
symmetric matrix S produces this energy ? What are its eigenvalues ?
2
:
1
10
403
11
If S and T are positive definite, their sum S C T is positive definite. Pivots and
eigenvalues are not convenient for S C T . Better to prove x T .S C T /x > 0.
12
A positive definite matrix cannot have a zero (or even worse, a negative number)
on its diagonal. Show that this matrix fails to have x T S x > 0 :
2
32 3
x1
4 1 1
x1 x2 x3 4 1 0 2 5 4 x2 5 is not positive when .x1 ; x2 ; x3 / D . ; ; /:
1 2 5
x3
13
A diagonal entry ajj of a symmetric matrix cannot be smaller than all the s. If it
eigenvalues and would be positive definite.
were, then A ajj I would have
But A ajj I has a
on the main diagonal.
14
Show that if all > 0 then x T S x > 0. We must do this for every nonzero x,
not just the eigenvectors. So write x as a combination of the eigenvectors and
explain why all cross terms are x Ti x j D 0. Then x T S x is
.c1 x 1 C C cn x n /T .c1 1 x 1 C C cn n xn / D c12 1 x T1 x 1 C C cn2 n x Tn x n > 0:
15
16
(d) A symmetric matrix with a positive determinant might not be positive definite !
p p
T
With positive pivots in D, the factorization
S D LDLT becomes
p p
p L T D DL .
(Square roots of the pivots give D D D D.) Then A D DL yields the
Cholesky factorization S D AT A which is symmetrized L U :
3 1
4 8
From A D
find S:
From S D
find A D chol.S /:
0 2
8 25
404
17
cos
Without multiplying S D
sin
(a) the determinant of S
(c) the eigenvectors of S
18
sin
cos
2 0
cos
0 5
sin
sin
, find
cos
19
20
Which values of c give a bowl and which c give a saddle point for the graph of
z D 4x 2 C 12xy C cy 2 ? Describe this graph at the borderline value of c.
21
When S and T are symmetric positive definite, S T might not even be symmetric.
But its eigenvalues are still positive. Start from S T x D x and take dot products
with T x. Then prove > 0.
22
Suppose C is positive definite (so y T C y > 0 whenever y 0) and A has independent columns (so Ax 0 whenever x 0). Apply the energy test to x T AT CAx
to show that AT CA is positive definite : the crucial matrix in engineering.
23
24
25
Write down orthonormal bases for the four fundamental subspaces of this A.
2
(a) Why is the trace of AT A equal to the sum of all aij
?
2
(b) For every rank-one matrix, why is 12 D sum of all aij
?
405
26
Find the eigenvalues and unit eigenvectors of AT A and AAT . Keep each Av D u:
1 1
Fibonacci matrix
AD
1 0
Construct the singular value decomposition and verify that A equals U V T .
27
Compute AT A and AAT and their eigenvalues and unit eigenvectors for V and U:
1 1 0
Rectangular matrix
AD
:
0 1 1
Check AV D U (this will decide signs in U ). has the same shape as A.
1
2 .1; 1; 1; 1/
28
Construct the matrix with rank one that has Av D 12u for v D
u D 13 .2; 2; 1/. Its only singular value is 1 D
.
29
30
The SVD for A C I doesnt use C I . Why is .A C I / not just .A/ C I ?
31
32
My favorite example of the SVD is when Av.x/ D dv=dx, with the endpoint conditions v.0/ D 0 and v.1/ D 0. We are looking for orthogonal functions v.x/
so that their derivatives Av D dv=dx are also orthogonal. The perfect choice is
v1 D sin x and v2 D sin 2x and vk D sin kx. Then each uk is a cosine.
and