Week 3 Self check questions and solutions#

Question 1:

Let ARn×n. Proof that the LU decomposition exists with nonsingular L and U if and only if the determinant of all minors is nonzero. (Note: The minors are the submatrices A[:m,:m]).

Does the LU decomposition exist for the following matrix? Justify your answer.

[0.522145958]

Solution:

First assume that the LU Decomposition exists. We then have A=LU with nonsingular L and U and hence, for each minor A[:m,:m]=L[:m,:m]×U[:m,:m]. Since L and U are nonsingular it follows that also the minors are nonsingular and therefore have nonzero determinant.

Now assume that all minors have nonzero determinant. We proceed by induction. Let the statement be true for all matrices have dimension n1. We now partition ARn×n as

A=[A^bcTγ]=[L^0T1][U^r0δ]

with b,c,,rRn1, γ,δR, L^,U^Rn1×n1. Here A^=L^×U^ is a nonsingular LU decomposition of A^, which exists by induction hypothesis. To construct an LU decomposition of dimension n we need to find , r and a nonzero δ such that the above decomposition is valid.

By inspection we obtain r=L^1b^ and T=cTU^1, which exists since L^ and U^ are nonsingular. For δ we have the expression

δ=γlTr=γcTA^1b.

Since A^ is nonsingular δ exists. It is left to show that δ0. However, this follows from

detA=δdetL^detU^=δdetA^

and that detA and detA^ are nonzero by induction hypothesis.

For the matrix

[0.522145958]

the first 2×2 subblock is singular. Hence, its determinant is zero and therefore the LU decomposition does not exist.

Question 2:

Let ARn×n be tridiagonal, that is only the main diagonal and the first upper and lower off-diagonals can be nonzero. Assume that an LU decomposition exists. Show that it can be computed in O(n) operations.

Solution

In each outer loop of the Gaussian elimination only one off-diagonal element needs to be reduced. Hence, the cost for each outer loop is constant and independent of n, leading to a total cost of O(n).

Question 3:

Proof the Sherman-Morrison formula

(A+uvT)1=A1A1uvTA11+vTA1u

if 1+vTA1u0.

Solution:

We have

(A+uvT)[A1A1uvTA11+vTA1u]=IuvTA11+vTA1u+uvTA1uvTA1uvTA11+vTA1u=I[uvTA1+uvTA1uvTA11+vTA1uuvTA1]=Iu[1+vTA1u1+vTA1u1]vTA1=I

Similarly, we show that

[A1A1uvTA11+vTA1u](A+uvT)=IA1u[1+vTA1u1+vTA1u1]vT=I

Hence, the formula holds.