MATH661 Homework 5 - Matrix factorizations

Posted: 09/27/21

First draft due: 10/04/21, 11:55PM, Final draft due: 10/11/21

Note: This will be the last homework assignment with the two-stage submission process (first draft/comments/final draft). Subsequent homework assignments will use a single-stage submission.

Various

1Track 1

  1. Consider 𝑨=[aij]m×m with elements

    aii=1,aij=-1fori>j,aij=0forj>iandjm,aim=1foralli.
    1. Implement Gaussian elimination with partial pivoting (searching for maximum element in current column).

    2. Verify your implementation by generating random 𝒙m for m=10k, k=1,2,,6, computing 𝒃=𝑨𝒙, applying your implementation to solve the system and obtain 𝒙. Compute ||𝒙-𝒙|| in 1,2, inf-norms.

    3. Compare the above errors with built-in solver 𝒙=𝑨\𝒃.

    4. Repeat (b) and (c) with

      aii=1+4ϵr

      with ϵ machine epsilon, and r a uniform random number in the interval (0,1).

  2. With 𝑨 from problem 1, construct the symmetric matrix

    𝑩=12(𝑨+𝑨T)+m𝑰.
    1. Implement the Cholesky algorithm to solve 𝑩𝒚=𝒄.

    2. Carry out steps from Problem 1.b. How do the errors ||𝒚-𝒚|| compare with those from 1.b?

2Track 2

  1. For 𝑨m×m,𝒙m, find the relative condition number of the following mathematical problems:

    1. 𝒇:mm, 𝒇(𝒙)=𝑨𝒙

    2. 𝒈:mm, 𝒈(𝒃)=𝑨-1𝒃

    3. 𝒉:m×mm, 𝒉(𝑨)=𝑨-1𝒃

  2. For 𝑨,𝑩m×m, suppose an efficient solver for 𝑨𝒙=𝒃 is available. Answer the following questions, with a view to solving 𝑩𝒚=𝒄, with 𝑩 assumed to be a good approximation of 𝑨.

    1. For 𝒖,𝒗m, 𝑨,𝑨+𝒖𝒗 of full rank, prove the Sherman-Morrison formula

      (𝑨+𝒖𝒗)-1=𝑨-1-𝑨-1𝒖𝒗𝑨-11+𝒗𝑨-1𝒖.

      Write a pseudo-code algorithm on how to use the Sherman-Morrison formula to solve 𝑩𝒚=𝒄, with 𝑩=𝑨+𝒖𝒗.

    2. (Extra credit: 1 course point). Prove the generalization to rank-k updates (Sherman-Morrison-Woodbury formula), 𝑼,𝑽m×k

      (𝑨+𝑼𝑽)-1=𝑨-1-𝑨-1𝑼(𝑰+𝑽𝑨-1𝑼)-1𝑽𝑨-1.

      Again, write a pseudo-code algorithm on using the above to solve 𝑩𝒚=𝒄, with 𝑩=𝑨+𝑼𝑽.

  3. Consider a decomposition of 𝑨m×m into blocks of size k×k

    𝑨=[ 𝑨11 𝑨12 𝑨1n 𝑨21 𝑨22 𝑨2n 𝑨n1 𝑨n2 𝑨nn ].
    1. Write pseudo-code for the block form of Gaussian elimination. Carefully consider conditions to be checked at each step.

    2. Modify the above algorithm for 𝑨 block tridiagonal.

    Solve Exercise 12.3, p. 96 of Trefethen & Bau, Numerical Linear Algebra.