Docsity

Linear Algebra: Finding LU-Decomposition and Diagonalizing Matrices, Exams of Linear Algebra

Toggle sidebar
bg1
MATH 110: LINEAR ALGEBRA
PRACTICE MIDTERM #2
FARMER SCHLUTZENBERG
∗Note
The theorems in sections 5.1 and 5.2 each have two versions, one stated in terms of lin-
ear operators, one in terms of matrices. The book states most of them in terms of linear
operators, whilst in the lecture notes, they are mostly stated in terms of matrices. For
example, compare Theorem 5.5 and its corollary in the book with Theorem 5 and its corol-
lary in the lecture notes; also compare Theorem 5.6 in the book with the computation of
the characteristic polynomial of a diagonalizable matrix done in lectures. In each case, one
can derive one version from the other, by considering LAand [T]β. In these solutions I’ll
reference theorems in the book, but often I literally mean the matrix version of that theorem.
Problem 1.Letγ={e1,...,e
k}be an ordered basis for W.AsWis a subspace of
V,wemayextendγto an ordered basis β={e1,...,e
n}for V.NotethatsinceW=V,
dim(W)<dim(V), so k<n.Letβ∗={f1,...,f
n}be the dual basis to β.Sofi∈V∗.By
definition of dual basis,
fk+1(ei)=δk+1,i.
But then fk+1(u)=0foreachu∈γ.Asγis a basis for W,fk+1(u)=0foreachu∈
span(γ)=W(by linearity of fk+1). But fk+1(ek+1 )=1,sofk+1 =0. Thusfk+1 is as
desired.
Alternatively, one could define fusing the method fk+1 is defined. Let γand βbe as above.
Using Theorem 2.6, there is a unique linear f:V→F(where Vis over the field F) satisfying
f(ei)=0foreachi≤kand i>k,andf(ek+1)=1.
Problem 2. Recall that to find an LU-decomposition for a matrix, we perform Gaussian
elimination, hoping that we’ll never have to swap any rows or columns in order to get our
next pivot point. If we do have to, the decomposition is more complicated. The proof for
this problem is motivated by the following observation: if Ais invertible, one can reduce A
into a lower triangular unit matrix by performing a series of these operations:
(1) Row swaps;
(2) Multiplying a column by a non-zero scalar;
(3) Adding a multiple of column ito column j,wherei<j.
If you were unable to do this problem, I suggest you stop reading here and try to first prove
the above statement, and then use this fact to prove the appropriate LU -decomposition can
be found.
Here is a sketch of how to obtain the appropriate LU-decomposition from the above process
(it’s not a complete proof). Note that (1) is done by multiplying on the left with a permu-
tation matrix, and (2) and (3) are each done by multiplying on the right by an invertible
Date:Novemberx.
1
pf3
pf4
pf5

Partial preview of the text

Download Linear Algebra: Finding LU-Decomposition and Diagonalizing Matrices and more Exams Linear Algebra in PDF only on Docsity!

MATH 110: LINEAR ALGEBRA

PRACTICE MIDTERM

FARMER SCHLUTZENBERG

∗Note

The theorems in sections 5.1 and 5.2 each have two versions, one stated in terms of lin- ear operators, one in terms of matrices. The book states most of them in terms of linear operators, whilst in the lecture notes, they are mostly stated in terms of matrices. For example, compare Theorem 5.5 and its corollary in the book with Theorem 5 and its corol- lary in the lecture notes;also compare Theorem 5.6 in the book with the computation of the characteristic polynomial of a diagonalizable matrix done in lectures. In each case, one can derive one version from the other, by considering LA and [T ]β. In these solutions I’ll reference theorems in the book, but often I literally mean the matrix version of that theorem.

Problem 1. Let γ = {e 1 ,... , ek} be an ordered basis for W. As W is a subspace of V , we may extend γ to an ordered basis β = {e 1 ,... , en} for V. Note that since W = V , dim(W ) < dim(V ), so k < n. Let β∗^ = {f 1 ,... , fn} be the dual basis to β. So fi ∈ V ∗. By definition of dual basis,

fk+1(ei) = δk+1,i.

But then fk+1(u) = 0 for each u ∈ γ. As γ is a basis for W , fk+1(u) = 0 for each u ∈ span(γ) = W (by linearity of fk+1). But fk+1(ek+1) = 1, so fk+1 = 0. Thus fk+1 is as desired. Alternatively, one could define f using the method fk+1 is defined. Let γ and β be as above. Using Theorem 2.6, there is a unique linear f : V → F (where V is over the field F ) satisfying f (ei) = 0 for each i ≤ k and i > k, and f (ek+1) = 1.

Problem 2. Recall that to find an LU-decomposition for a matrix, we perform Gaussian elimination, hoping that we’ll never have to swap any rows or columns in order to get our next pivot point. If we do have to, the decomposition is more complicated. The proof for this problem is motivated by the following observation: if A is invertible, one can reduce A into a lower triangular unit matrix by performing a series of these operations:

(1) Row swaps; (2) Multiplying a column by a non-zero scalar; (3) Adding a multiple of column i to column j, where i < j.

If you were unable to do this problem, I suggest you stop reading here and try to first prove the above statement, and then use this fact to prove the appropriate LU-decomposition can be found. Here is a sketch of how to obtain the appropriate LU-decomposition from the above process (it’s not a complete proof). Note that (1) is done by multiplying on the left with a permu- tation matrix, and (2) and (3) are each done by multiplying on the right by an invertible

Date: November x. 1

2 FARMER SCHLUTZENBERG

upper triangular matrix. Thus we end up with

L = P 1 P 2... PkAU 1 U 2... Uj.

Using some previous homework problems, this means L = P ′AU′, which leads to A = P ′−^1 LU−^1 , which is as required.

The above process also motivates a slicker, though less intuitive proof. This works in the same way as the proof of the existence of LU-decomposition done in lectures. We use in- duction on the size of A to prove: if A is an n ∗ n invertible matrix, there are a permutation matrix P , lower triangular unit L and upper triangular invertible U such that A = P LU. If A is 1 ∗ 1, P = L = [1] and U = A. Suppose n > 1. As A is invertible, its first column is non-zero, so if A 11 = 0 we may swap the first row with another with some permutation matrix P ′, so that (P ′A) 11 = 0. We may then perform operations (2) and (3) above to produce a matrix A′^ such that A′ 11 = 1 and A′ 1 i = 0 for i > 1. There is an invertible upper triangular matrix U′^ which does this when multiplying on the right. So we get

A′^ = P ′AU′^ =

[

X S

]

where A′^ is written as a block matrix with a 1 ∗ 1 upper-left block. Now A′^ is invertible as it is written as the product of invertible matrices. This means S is invertible (if Sv = 0, then setting v′^ = [0;^ vt]t,^ A′v^ = 0, so^ v′^ = 0, so^ v^ = 0). So we can apply the inductive hypothesis and get S = P 1 L 1 U 1. Substituting this and factoring the above block matrix, we get

P ′AU′^ =

[

0 P 1

] [

P 1 − 1 X L 1

] [

0 U 1

]

(Factor it in two steps to obtain this.) Call the three matrices in the above product P ′′, L, U′′. Note that these are a permutation, lower triangular unit, and upper triangular invertible, respectively, as P 1 , L 1 and U 1 were. U′^ is invertible, (as is P ′), so

A = P ′−^1 P ′′LU′′U′−^1 = P LU,

where P = P ′−^1 P ′′^ (so is a permutation, by homework problems) and U = U′′U′−^1 (so is upper triangular and invertible, by homework problems). Thus we have the required decomposition.

Problem 3. Let Li and Ui be the upper-left i ∗ i blocks of L and U respectively. Then Li is lower triangular unit and Ui is upper triangular. Partition L as a 2 ∗ 2 block matrix with Li the upper-left block. Then we have

A = LU =

[

Li 0 Wi Xi

] [

Ui Yi 0 Zi

]

(Wi is the lower-left (n − i) ∗ i block of L, etc.) Block multiplying, we have Ai = LiUi + 0.0 = LiUi. So with i = 1, we have A 11 = L 11 U 11 = 1.U 11. For any i,

det(Ai) = det(LiUi) = det(Li) det(Ui) = (Πjj==1i1)(Πjj==1iUi,jj ) = Πjj==1iUi,jj.

(Here I’ve used the fact that det preserves products, and the det of a triangular matrix is the product of its diagonal elements, and Li is unit.) As U is invertible triangular, its diagonal

4 FARMER SCHLUTZENBERG

Proof: Clearly det(C 1 ) = c 1 = a 1 c 1. Suppose n > 1. Expanding along the first column,

det(Cn) = (−1)n+1cn det( C˜n 1 ) = (−1)n+1cn det(Cn− 1 ),

as it is clear that C˜n 1 = Cn− 1. By induction then,

det(Cn) = (−1)n+1cnan− 1 Πi i==1n −^1 ci = (−1)n+1an− 1 Πii==1n ci.

If n is odd, (−1)n+1^ = 1, so (−1)n+1an− 1 = an− 1 = an. If n is even (−1)n+1^ = −1 and an = −an− 1 , so it works.

Problem 9. Let p be the characteristic polynomial of A,

p(x) = (−1)nxn^ + cn− 1 xn−^1 +... + +c 1 x + c 0.

As A is diagonalizable, by the Cayley-Hamilton theorem for diagonalizable matrices,

p(A) = (−1)nAn^ + cn− 1 An−^1 +... + c 1 A + c 0 I = 0.

Now, as A is invertible, we get

−c 0 A−^1 = (−1)nAn−^1 + cn− 1 An−^2 +... + c 1 I.

Now as long as c 0 = 0, we can divide by −c 0 to get the sort of expression we need (note the ci’s here are different to those in the question). But as p is the characteristic polynomial of A, so by exercise 20 of section 5.1, c 0 = det(A), and det(A) = 0 as A is invertible.

Problem 10. We have β = { 1 , x, x^2 , x^3 }. Recall that β∗^ is the ordered basis {f 0 , f 1 , f 2 , f 3 } for P 3 (R)∗, where fi(xj^ ) = δij ,

or equivalently, the fi are the linear functionals which ”project on β co-ordinates”, so letting q ∈ P 3 (R), if q = c 3 x^3 + c 2 x^2 + c 1 x^1 + c 0 , then as c 0 is q’s coefficient of 1, f 0 (q) = c 0 , and likewise f 1 (q) = c 1 , etc. Now, recall that the columns of [T ]β

∗ β are given by expressing the elements of^ T^ (β) in^ β

∗

co-ordintates. That is, column i + 1 is [T (xi)]β∗. For example, let’s calculate column 2. So this is [T (x)]β∗. So we need to know what T (x) does, and express it in terms of the projection functionals mentioned above. Now T : P 3 (R) → P 3 (R)∗, so T (x) is a linear functional on P 3 (R);that is, T (x) : P 3 (R) → R. So we need to look at what T (x) does given input some q ∈ P 3 (R). By definition,

T (x)(q) =

0

xq(x) dx.

Expressing q in the β basis, q = c 3 x^3 + c 2 x^2 + c 1 x^1 + c 0 , say, then

T (x)(q) =

0

x(c 3 x^3 + c 2 x^2 + c 1 x^1 + c 0 ) dx

= (1/5)c 3 + (1/4)c 2 + (1/3)c 1 + (1/2)c 0.

But note that this

= (1/5)f 3 (q) + (1/4)f 2 (q) + (1/3)f 1 (q) + (1/2)f 0 (q).

As q was arbitrary, we have

T (x) = (1/5)f 3 + (1/4)f 2 + (1/3)f 1 + (1/2)f 0.

MATH 110: PRACTICE MIDTERM #2 5

This expresses T (x) in the form required, and so the second column of [T ]β

∗ β is [

1 2

1 3

1 4

1 5 ]

t.

(Note I had to reverse the order from that in the calculation because of the set ordering on β and β∗). The other columns are computed in exactly the same fashion.

Problem 11. Note that the T given in this problem has domain V , and one is supposed to show T : V ′^ → W ′. Strictly speaking, this doesn’t make sense unless V = V ′, as a function only has one domain. So the problem is really to find a linear T ′^ and a subspace V ′^ of V so that T ′^ : V ′^ → W ′^ is an isomorphism, and T ′^ agrees with T on V ′. With these requirements, there’s only one possible choice. We need V ′^ to be the set of vectors in V that T maps into W ′. So let

V ′^ = {v ∈ V |T (v) ∈ W ′}.

Then V ′^ is a subspace: suppose v 1 , v 2 ∈ V ′. Then T (v 1 + v 2 ) = T (v 1 ) + T (v 2 ) ∈ W ′, as W ′ is cosed under +. Similarly, V ′^ is closed under multiplication and 0 ∈ V ′. Define T ′^ to be the restriction of^ T^ to^ V^ ′^ (i.e. T’(v)=T(v) for each^ v^ ∈^ V^ ′). Then clearly T ′^ : V ′^ → W ′^ and T ′^ is linear because T is. T ′^ is also 1-1 because T is. The key point is Rg(T ′) = W ′. This is because Rg(T ) = W , so given w ∈ W ′, there is v ∈ V such that T (v) = w, and by definition of V ′, v ∈ V ′, and T ′(v) = T (v) = w. Thus w ∈ Rg(T ′), so T ′^ is onto. Therefore T ′^ is an isomorhpism.

Problem 12. We use Gaussian elimination, recording the matrices needed to perform matrix operations, to find an LU-decomposition. Perform the following 3 operations:

(1) Swap rows 1 & 2, by left-multiplying with the permutation matrix P. (2) Add − 5 ∗(Row 1) to (Row 3), by left-multiplying with L 1. (3) Add 2∗(Row 2) to (Row 3), by left-multiplying with L 2.

Call the resulting (upper triangular) matrix U. The matrices involved are

P =

 ; L 1 =

 ; L 2 =

 ; U =

Combining the above process, we have L 2 L 1 P A = U. Each Li and P are invertible, so A = P −^1 L− 1 1 L− 2 1 U = P LU, setting

L = L− 1 1 L− 2 1 =

U has no zero rows, so we don’t need to alter the dimensions of the matrices, so we have an LU-decomposition of A. Now det(A) = det(P LU) = det(P ) det(L) det(U). P is obtained by swapping two rows of I, so det(P ) = −1. L and U are triangular, so their determinants are the product of their eigenvalues. Thus det(L) = 1 and det(U) = −4. So det(A) = 4. Now we solve the equation Ax = [1; −1;0] t^ = b (in this case we already know there is exactly one solution as A is invertible). First we look for solutions to P Ly = b, or equivalently,

Ly = P tb = [−1;1;0] t.