MATH 417 Lecture 20

From Notes
Jump to navigation Jump to search

« previous | Thursday, April 3, 2014 | next »


Gaussian Elimination with Partial Pivoting

Step 0. System of equations Ax=b

[022212211123]

Step 1. cell [1,1] is 0. That's unfortunate, so Switch rows 1 & 2

[122102221123]

Step 2. subtract 1*(top row) from (bottom row)

[122102220−102]

Step 3. multiply (second row) by 1/2

[122101110−102]

Step 4. multiply (bottom row) by -1

[12210111010−2]

Step 5. subtract (second row) from (bottom row)

[1221011100−1−3]

Step 5. multiply (bottom row) by -1

[122101110013]=U

Step 7. Perform back substitution to get

x3=3x2=−2x1=−1


At each step, we left multiply by an elementary matrix. This elementary matrix is the identity matrix with the same operation performed on it:

  1. I=[100010001]⟶E1=[010100001]
  2. I=[100010001]⟶E2=[100010−101]
  3. I=[100010001]⟶E3=[1000120001]

and so on...


Observation: Each Ek has two possibilities:

  1. row permutations
  2. lower triangular matrix

Note, if we perform row permutations P1⋅P2…Pn at the start, then we can proceed with Gaussian elimination without pivoting.

Let A~:=Pn…P2P1A

Now since Ek…E3E2A~=U, we have A=(Ek…E3E2)−1U, so (Ek…E3E2)−1=L=E2−1E3−1…Ek−1

What is Ei−1?

  1. row-scaling: E=[λ000010001]⟶E−1=[1λ00010001]
  2. row-addition: E=[100010α01]⟶E−1=[100010−α01]


To multiply these inverses, take superposition of matrices

  • combine nonzero entries not along diagonal
  • multiply corresponding entries on diagonals

[100010−101]⋅[1000120001]=[1000120−101]


Therefore, given A, if we can run gaussian elimination without pivoting, then A=LU and L=[ℓ110ℓijlnn]; U=[1uij01]

In practice, we can store L and U in the same matrix: [ℓ11uijℓijℓnn]


In contrast, we can do Gaussian elimination without pivoting (i.e. leave diagonal entries ≠ 1). In this case, our LU decomposition is

L=[10ℓij1] U=[u11uij0unn]

If we have A=AT, can we get A=L~=L~T? we should be able to (see later)


Diagonalization

LU=[100ℓ2110ℓ31ℓ321]*[u11u12u130u22u2300u33]=[100ℓ2110ℓ31ℓ321]*[u11000u22000u33]*[1u12u11u13u1101u23u22001]=LΔU~

In this case, the diagonal entries of Δ are the eigenvalues of the matrix.


Theorem: If there are n eigenvalues, then there will be n independent eigenvectors.


LDL Decomposition / Choleski Factorization

Above we saw a decomposition of the form A=LDLT. This is called LDL decomposition.

We can alternatively write this as LDDLT=(LD)(LD)T=L~L~T

So in the example above, we have ℓ21=u12u11


Special Matrices

Diagonally Dominant

Given A=(aij), for every row, we have |aii|≥∑j≠i|aij|≥0

"strictly" variant: |aii|>∑j≠i|aij|≥0

We will consider only this "strict" case

Positive Definite

For any x→≠0→, we have x→TAx→≥0

also called non-negative definite

"strictly" variant: x→TAx→>0

We will consider only this "strict" case


Theorem

Theorem. If A is strictly diagonally dominant or strictly positive definite, then A is non-singular.

Proof. Assume to the contrary that A is singular. Then Ax→=0→ has a non-trivial solution (x→≠0→)

Case 1: A is diagonally dominant. Take x→=[x1x2⋮xn]. Find xj such that |xj|=max1≤i≤n|xi|

Solve the system for ajjxj=−∑k=1;k≠jnajkxk. Hence

|ajj||xj|=|∑k≠jajkxk|≤∑k≠j|ajk||xk||ajj|≤∑k≠j|akj||xkxj|

Observe that |xkxj|≤1, so

|ajj|≤∑k≠j|akj||xkxj|≤∑k≠j|ajk|<ajj

→CONTRADICTION


Case 2: A is positive definite and Ax→=0→ for some x→≠0→.

0<x→TAx→=x→T0→=0

If λ1 is an eigenvalue of A, then Ax1→=λ1x1 for some x1.

x→1Ax→1=x→1Tλ1x→1=λ1x→1Tx→1>0

Hence λ1>0.

...

quod erat demonstrandum


Going back to diagonal dominance. If we do Gaussian elimination, we are guaranteed that we will not need any pivoting