MATH 661.FA23 Midterm Examination 1 - Solution

Solve the problems for your appropriate course track. Problems probe understanding of the definitions and results from the module on floating point arithmetic and linear algebra. Formulate your answers clearly, cogently, and include a concise description of your approach. Each question is meant to be completely answered within ten minutes. Allowed test time is 75 minutes.

1Common problems

  1. Matrix 𝑨m×m, rank(𝑨)=m, has the singular value decomposition (SVD) 𝑨=𝑼𝚺𝑽T (𝑼𝑼T=𝑼T𝑼=𝑰, 𝑽𝑽T=𝑽T𝑽=𝑰, 𝚺=diag(σ1,..,σm), σ1σ2σm>0) and the pseudoinverse 𝑨+=𝑽𝚺+𝑼T, 𝚺+=diag(1/σ1,..,1/σm). Find the SVDs of:

    1. 𝑨T𝑨 ;

    2. (𝑨T𝑨)+ ;

    3. (𝑨T𝑨)+𝑨T ;

    4. 𝑨(𝑨T𝑨)+ ;

    5. 𝑨(𝑨T𝑨)+𝑨T .

    Solution.

    1. 𝑨T𝑨=(𝑼𝚺𝑽T)T𝑼𝚺𝑽T=𝑽𝚺T𝑼T𝑼𝚺𝑽T=𝑽𝚺T𝚺𝑽T=𝑽𝚺2𝑽T, since 𝚺T=𝚺. The SVD is

      𝑨T𝑨=𝑽𝚺2𝑽T

      and the singular values of 𝑨T𝑨 are the squares of those of 𝑨.

    2. (𝑨T𝑨)+=(𝑽𝚺2𝑽T)+=𝑽(𝚺2)+𝑽T. This is not an SVD since

      (𝚺2)+=diag(1/σ12,..,1/σm2),1/σ121/σ221/σm2.

      Introduce permutation matrix 𝑷=[ 𝒆m 𝒆m-1 ... 𝒆1 ] which is orthogonal, 𝑷𝑷T=𝑰 and symmetric 𝑷=𝑷T to obtain

      (𝚺2)+𝑷=diag(1/σm2,..,1/σ12)=𝚲,

      the correct ordering and the SVD

      (𝑨T𝑨)+=𝑽(𝚺2)+𝑽T=𝑽(𝚺2)+𝑷𝑷T𝑽T=𝑽𝚲(𝑽𝑷)T,

      since 𝑽𝑷, the product of two orthogonal matrices, is itself orthogonal.

    3. Calculate

      (𝑨T𝑨)+𝑨T=𝑽𝚲(𝑽𝑷)T𝑽𝚺T𝑼T=𝑽𝚲𝑷T𝑽T𝑽𝚺𝑼T=𝑽𝚲𝑷T𝚺𝑼T.

      Since

      𝑷T𝚺=𝑷𝚺=diag(σm,..,σ1),

      obtain

      𝚲𝑷T𝚺=diag(1/σm,..,1/σ1)=𝚪,

      and the SVD

      (𝑨T𝑨)+𝑨T=𝑽𝚪𝑼T.
    4. Calculate

      𝑨(𝑨T𝑨)+=𝑼𝚺𝑽T𝑽𝚲(𝑽𝑷)T=𝑼𝚺𝚲(𝑽𝑷)T=𝑼𝚪(𝑽𝑷)T,

      which is an SVD.

    5. Use above and 𝚺𝚪=𝑰 to write

      𝑨(𝑨T𝑨)+𝑨T=𝑼𝚺𝑽T𝑽𝚪𝑼T=𝑼𝚺𝚪𝑼T=𝑰.

2Track 1

  1. Write pseudo-code to accurately evaluate the sum

    S2n=k=12n(-1)k+1kxk

    in floating point arithmetic when x=1+ε, 1ε>0. (limnS2n=ln(1+x)).

    Solution. There is possible loss of precision from successive terms of alternating signs, the effect of which can be attenuated by adding two terms at a time to the sum accumulator

    S2n=k=1nx2k-1(12k-1-x2k)

    S=0; y=x; x2=x2

    for k=1 to n

    l=2k;d=1/(l-1)-x/l

    t=yl; S=S+t; y=yx2

  2. Use the SVD of 𝑨m×n to express the Moore-Penrose pseudoinverse as a sum of rank-one matrices.

    Solution. The SVD of 𝑨 is 𝑨=𝑼𝚺𝑽T and the pseudoinverse is written as

    𝑨+=𝑽𝚺+𝑼T=[ 𝒗1 .. 𝒗n ][ 1/σ1 1/σr 0 ][ 𝒖1T 𝒖mT ]=j=1r1σj𝒗j𝒖jT,

    a sum of the rank-1 updates 𝒗j𝒖jT/σj.

3Track 2

  1. Let 𝑨m×n. Show that the Moore-Penrose pseudoinverse 𝑿=𝑨+ minimizes ||𝑨𝑿-𝑰||F over all n by m matrices.

    Solution. The squared Frobenius norm of 𝑨𝑿-𝑰=[ 𝑨𝒙1-𝒆1 𝑨𝒙n-𝒆n ] is the sum of its squared column vector 2-norms

    ||𝑨𝑿-𝑰||F2=j=1n||𝑨𝒙j-𝒆j||22,

    and the minimum is attained by the solution of the n least squares problems

    min𝒙j||𝑨𝒙j-𝒆j||2𝒙j=𝑽𝚺+𝑼T𝒆j𝑿=𝑨+𝑰=𝑨+.

  2. Let 𝑨m×m be skew-Hermitian, i.e., 𝑨=-𝑨. Prove that:

    1. 𝑰-𝑨 is nonsingular;

    2. 𝑪=(𝑰-𝑨)-1(𝑰+𝑨) is unitary.

    Solution. a) For m=1, a+a=0, and b=1-a nonsingular implies ||b||22=bb>0, readily verified

    bb=(1-a)(1-a)=1+aa>0.

    This also holds for m>1, 𝑨+𝑨=0, and 𝑩=𝑰-𝑨 nonsingular implies ||𝑩𝒙||22=||𝒚||22>0 for any 𝒙 of unit norm. Compute

    𝒚𝒚=𝒙𝑩𝑩𝒙=𝒙(𝑰+𝑨𝑨)𝒙=1+||𝒚||22>0.

    b) Again, use m=1 to gain insight in which case c=(1-a)-1(1+a) and compute

    cc=(1+a)(1-a)-1(1-a)-1(1+a)=(1-a)[(1-a)(1+a)]-1(1+a)=(1-a)(1-a2)-1(1+a)
    cc=(1-a)[(1+a)(1-a)]-1(1+a)=(1-a)(1-a)-1(1+a)-1(1+a)=1

    Similarily, for m>1

    𝑪𝑪=(𝑰+𝑨)(𝑰-𝑨)-1(𝑰-𝑨)-1(𝑰+𝑨)=(𝑰-𝑨)[(𝑰-𝑨)(𝑰-𝑨)]-1(𝑰+𝑨)

    𝑪𝑪=(𝑰-𝑨)[(𝑰+𝑨)(𝑰-𝑨)]-1(𝑰+𝑨)=(𝑰-𝑨)(𝑰-𝑨)-1(𝑰+𝑨)-1(𝑰+𝑨)=𝑰.