Homework 2 Solutions for Numerical Analysis | MATH 128A, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Material Type: Assignment; Class: Numerical Analysis; Subject: Mathematics; University: University of California - Berkeley; Term: Spring 2005;

Typology: Assignments

Pre 2010

Uploaded on 10/01/2009

koofers-user-4b7
koofers-user-4b7 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Math128B
Feb. 1, 2005
Jonathan Dorfman
Homework 2 Solutions
Problem 2.1
First, a quick review of some facts about complex numbers:
1. for z=x+iy =rcos θ+ir sin θ=re Cwe have (magnitude of complex scalar)
|z|def
=px2+y2=r
2. if we think of z=x+iy as a point in the ”complex plane”, then
|z|=k(x, y)k2= Euclidean length of (x, y)R2
3. since the triangle inequality for the Euclidean norm states:
k(x, y)+(X, Y )k2 k(x, y )k2+k(X, Y )k2
we also know |z+w| |z|+|w|
4. if α=a+ib =re and z=x+iy =ReiΘthen
|αz|=|re ·ReiΘ|=|rRei(θ+Θ)|=Rr =|α|·|z|
Now for v= (z1, z2, . . . , zn) = (x1+iy1, x2+iy2, . . . , xn+iyn)Cnwe define
kvk1
def
=|z1|+|z2|+· ·· +|zn|=k(x1, y1)k2+k(x2, y2)k2+· ·· +k(xn, yn)k2
We must verify that the defining properties of a norm are satisfied.
1. kvk10 and = 0 v= 0 Proof: This follows easily from the fact that each of the terms
k(xk, yk)k20 and = 0 (2)
xk=yk= 0
2. kα·vk1=|α|kvk1(αC) Proof: This follows easily from the definitions:
kα·vk1
def
=k(αz1, . . . , αzn)k1
def
=|αz1|+|αz2|+·· ·+|αzn|(4)
=|α||z1|+·· ·+|α||zn|=|α||z1|+·· ·+|zn|def
=|α|kvk1
3. kv+wk1 kvk1+kwk1(v, w Cn) Proof: Again this follows from the corresponding
property of the Euclidean-norm in R2applied to each of the terms:
kv+wk1=k(z1, . . . , zn)+(w1, . . . , wn)k1=k(z1+w1, . . . , zn+wn)k1
=|z1+w1|+· ·· +|zn+wn|(3)
|z1|+|w1|+· ·· +|zn|+|wn|=kvk1+kwk1
Finally, kvk1 kvk2follows easily from the inequality
kvk2
1=
n
X
k=1 |zk|2+ 2
n
X
i=1
n
X
j>i |zi||zj|
n
X
k=1 |zk|2=kvk2
2
pf3
pf4
pf5

Partial preview of the text

Download Homework 2 Solutions for Numerical Analysis | MATH 128A and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Math128B

Feb. 1, 2005 Jonathan Dorfman Homework 2 Solutions

Problem 2.

First, a quick review of some facts about complex numbers:

  1. for z = x + iy = r cos θ + ir sin θ = reiθ^ ∈ C we have (magnitude of complex scalar)

|z| def =

x^2 + y^2 = r

  1. if we think of z = x + iy as a point in the ”complex plane”, then

|z| = ‖(x, y)‖ 2 = Euclidean length of (x, y) ∈ R^2

  1. since the triangle inequality for the Euclidean norm states:

‖(x, y) + (X, Y )‖ 2 ≤ ‖(x, y)‖ 2 + ‖(X, Y )‖ 2

we also know |z + w| ≤ |z| + |w|

  1. if α = a + ib = reiθ^ and z = x + iy = ReiΘ^ then

|αz| = |reiθ^ · ReiΘ| = |rRei(θ+Θ)| = Rr = |α| · |z|

Now for v = (z 1 , z 2 ,... , zn) = (x 1 + iy 1 , x 2 + iy 2 ,... , xn + iyn) ∈ Cn^ we define

‖v‖ 1 def = |z 1 | + |z 2 | + · · · + |zn| = ‖(x 1 , y 1 )‖ 2 + ‖(x 2 , y 2 )‖ 2 + · · · + ‖(xn, yn)‖ 2

We must verify that the defining properties of a norm are satisfied.

  1. ‖v‖ 1 ≥ 0 and = 0 ⇐⇒ v = 0 Proof: This follows easily from the fact that each of the terms ‖(xk, yk)‖ 2 ≥ 0 and = 0

(2) ⇐⇒ xk = yk = 0

  1. ‖α · v‖ 1 = |α|‖v‖ 1 (∀α ∈ C) Proof: This follows easily from the definitions:

‖α·v‖ 1 def = ‖(αz 1 ,... , αzn)‖ 1 def = |αz 1 |+|αz 2 |+· · ·+|αzn|

(4) = |α||z 1 |+· · ·+|α||zn| = |α|

|z 1 |+· · ·+|zn|

) (^) def = |α|‖v‖ 1

  1. ‖v + w‖ 1 ≤ ‖v‖ 1 + ‖w‖ 1 (∀v, w ∈ Cn) Proof: Again this follows from the corresponding property of the Euclidean-norm in R^2 applied to each of the terms:

‖v + w‖ 1 = ‖(z 1 ,... , zn) + (w 1 ,... , wn)‖ 1 = ‖(z 1 + w 1 ,... , zn + wn)‖ 1

= |z 1 + w 1 | + · · · + |zn + wn|

(3) ≤ |z 1 | + |w 1 | + · · · + |zn| + |wn| = ‖v‖ 1 + ‖w‖ 1

Finally, ‖v‖ 1 ≥ ‖v‖ 2 follows easily from the inequality

‖v‖^21 =

∑^ n

k=

|zk|^2 + 2

∑^ n

i=

∑^ n

j>i

|zi||zj | ≥

∑^ n

k=

|zk|^2 = ‖v‖^22

Problem 2.2 & 2.

file function Hmwk2Main.m receives matrix A as input, calls EigenInfo, DisplayEigenInfo, FormatPoly EigenInfo.m calls Matlab functions to compute eigenvalues, eigenvectors, norms DisplayEigenInfo.m displays eigenvalues and eigenvectors in formatted text output FormatPoly.m displays polynomial in formatted output

The main functionality is contained in the EigenInfo function:

%EigenInfo.m %Math 128B Spring 2005 %Hmwk2 - Solutions (Feb. 1, 2005)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [V, eigValues, radius, charPoly] = EigenInfo(A)

%use Matlab’s poly to return characteristic polynomial charPoly = poly(A);

%use Matlab’s eig to return matrix of eigenvalues and matrix of eigenvectors %V(:,i)=i’th eigenvector corresponding to eigenvalue D(i,i) [V, D] = eig(A);

%eigenvalues are diag(D) eigValues = diag(D);

%spectral radius is max of absolute values (= complex norm) of eigenvalues radius = norm(eigValues, inf);

return

A diary of the output follows:

A =

Hmwk2Main(A) spectral radius = 4

Characteristic Polynomial = 1x^2 - 3x - 4 eigenvalues: -1, 4

eigenvector corresponding to eigVal=-1: [-0.70711 0.70711] eigenvector corresponding to eigVal=4: [-0.5547 -0.83205]

Problem 2.

We wish to establish (for A real): A = At^ =⇒ ‖A‖ 2 = ρ(A)

First, we know that for any matrix A ρ(A) ≤ ‖A‖ 2 , so we need only show that when A is sym- metric the reverse inequality holds. Since A is symmetric we know by the ”Principal Axis Theorem” that there exists an orthonormal basis of eigenvectors fk for which

A(fk) = λkfk (1)

where the {λk} are the (real) eigenvalues of A. Also, since the {fk} are orthonormal we know that every x can be rewritten in terms of the {fk}:

x =

∑^ n

k=

〈x, fk〉fk =

∑^ n

k=

xkfk (2)

and by the above formula for A

Ax (2) = A

( ∑n

k=

xkfk

∑^ n

k=

A(xkfk) =

∑^ n

k=

xkAfk (1) =

∑^ n

k=

xkλkfk (3)

Next, letting M = max{λ^2 k} = ρ(A)^2 , we compute Ax:

‖Ax‖^22 def =

Ax, Ax

(by (3) above) =

〈 ∑n

j=

xj λj fj,

∑^ n

k=

xkλkfk

∑^ n

j=

∑^ n

k=

xj · xk · λj · λk ·

fj, fk

(since fj are orthonormal) =

∑^ n

j=

∑^ n

k=

xj · xk · λj · λk · δj,k

(only j = k terms survive) =

∑^ n

k=

x^2 k · λ^2 k

≤ max{λ^2 k}

∑^ n

k=

x^2 k

(definition of M ) = M · ‖x‖^22

Dividing both sides by ‖x‖^22 we get: ‖Ax‖^22 ‖x‖^22

≤ M

and taking the sup over x 6 = 0 of the LHS we get ‖A‖^22 ≤ M , which implies ‖A‖ 2 ≤

M = ρ(A)

Remark: If you’re not used to this type of abstract argument, a much more concrete presentation is given on the following pages. Also, if you use the formula ‖A‖ 2 =

ρ(A∗A) (Theorem 7.15, part (i)) then the result is quite immediate since ‖A‖^22 = ρ(A∗A) = ρ(A^2 ) = ρ(A)^2 - but this is not really valid (in spite of the author’s comment on page 434) since its proof could (the one I know in fact does) logically depend on the result you’re asked to prove in this homework assignment.

Problem 2.4 (concrete version)

We wish to establish (for A real): A = At^ =⇒ ‖A‖ 2 = ρ(A)

We break the proof up into several steps:

  1. The result is true if A is a real diagonal matrix: A = D =

λ 1 0... 0 0 λ 2... 0 .. .

0 0... λn

  1. The LHS of the equality is unchanged if A is replaced by U AU −^1 with U orthogonal:

‖U AU −^1 ‖ 2 = ‖A‖ 2

  1. The RHS of the equality is unchanged if A is replaced by U AU −^1 with U orthogonal:

ρ(U AU −^1 ) = ρ(A)

  1. Finally, for every real symmetric A there exists an orthogonal U such that U AU −^1 = D is (real) diagonal.

Proof of (1): If A = D and M = max{|λk|} and ‖x‖ 2 = 1 then

‖Ax‖^22 =

Ax, Ax

(λ 1 x 1 ,... , λnxn), (λ 1 x 1 ,... , λnxn)

= (λ 1 x 1 )^2 + · · · + (λnxn)^2 = λ^21 x^21 + · · · + λ^2 nx^2 n ≤ (M 2 )(x^21 + · · · + x^2 n) = M 2 ‖x‖^22 = M 2

Since the above inequality holds for each x with ‖x‖ 2 = 1, it will remain true after taking the sup of

the

LHS

over all such x. But sup ‖x‖ 2 =

LHS

) (^) def = ‖A‖^22 , so we’ve proved ‖A‖ 2 ≤ max{|λk|}

Also note that if k is the index for which M = |λk| then letting x = ek gives Ax = λkek = λkx which gives ‖Ax‖ 2 = |λk|‖x‖ 2 = M , proving the LHS attains the value M.

Remark: The matrix D takes the unit sphere (in the 2-norm) into an ellipsoid whose major axis (and all other principal axes) are along the coordinate axes. The norm of D and the spectral radius of D agree because they’re both equal to the length of this major axis.

Proof of (2): We will prove a more general result, namely that ‖U AV ‖ 2 = ‖A‖ 2 for any isometries U, V. Recall U is defined to be an isometry if it preserves lengths:

‖U x‖ = ‖x‖ ∀x