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)

[122102220102]

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

[122101110102]

Step 4. multiply (bottom row) by -1

[122101110102]

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

[122101110013]

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=[100010101]
  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 P1P2Pn at the start, then we can proceed with Gaussian elimination without pivoting.

Let A~:=PnP2P1A

Now since EkE3E2A~=U, we have A=(EkE3E2)1U, so (EkE3E2)1=L=E21E31Ek1

What is Ei1?

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


To multiply these inverses, take superposition of matrices

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

[100010101][1000120001]=[1000120101]


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

In practice, we can store L and U in the same matrix: [11uijijnn]


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

L=[10ij1] U=[u11uij0unn]

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


Diagonalization

LU=[100211031321]*[u11u12u130u22u2300u33]=[100211031321]*[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|ji|aij|0

"strictly" variant: |aii|>ji|aij|0

We will consider only this "strict" case

Positive Definite

For any x0, we have xTAx0

also called non-negative definite

"strictly" variant: xTAx>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 (x0)

Case 1: A is diagonally dominant. Take x=[x1x2xn]. Find xj such that |xj|=max1in|xi|

Solve the system for ajjxj=k=1;kjnajkxk. Hence

|ajj||xj|=|kjajkxk|kj|ajk||xk||ajj|kj|akj||xkxj|

Observe that |xkxj|1, so

|ajj|kj|akj||xkxj|kj|ajk|<ajj

→CONTRADICTION


Case 2: A is positive definite and Ax=0 for some x0.

0<xTAx=xT0=0

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

x1Ax1=x1Tλ1x1=λ1x1Tx1>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