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/σ12⩽1/σ22⩽⋯⩽1/σ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+1k⁡xk

    in floating point arithmetic when x=1+ε, 1≫ε>0. (limn→∞S2n=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=y⋅l; S=S+t; y=y⋅x2

  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=b∗b>0, readily verified

    b∗b=(1-a∗)(1-a)=1+a∗a>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

    c∗c=(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)
    c∗c=(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(𝑰+𝑨)=𝑰.