Docsity

Elementary Matrices and LU Factorization - Prof. Stefania Tracogna, Study notes of Linear Algebra

Toggle sidebar
bg1
Contents
1.4 Elementary Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Elementary Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Equivalent conditions for non singularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Computing the Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
LU Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Solving systems using the LU Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . 6
iii
pf3
pf4
pf5
pf8

Partial preview of the text

Download Elementary Matrices and LU Factorization - Prof. Stefania Tracogna and more Study notes Linear Algebra in PDF only on Docsity!

Contents

1.4 Elementary Matrices........................................ 1 Elementary Matrices....................................... 1 Equivalent conditions for non singularity............................ 3 Computing the Inverse...................................... 4 LU Factorization......................................... 5 Solving systems using the LU Factorization.......................... 6

iii

Elementary Matrices

Elementary Matrices

If we start with the identity matrix I and perform exactly one elementary row operation, the resulting matrix is called an Elementary Matrix. There are 3 types of elementary matrices corresponding to the three types of elementary row operations: Type I: obtained by interchanging two rows of I (Permutation matrix ). Type II: obtained by multiplying a row of I by a nonzero constant. Type III: obtained by adding a multiple of one row to another row. (Elimination Matrix ).

PROPERTY: Left multiplication by E performs the same row operation on A as the one done on the Identity matrix to obtain E.

EXAMPLE: Consider the elementary matrix E obtained by interchanging row2 and row3 of the Identity matrix:

I =

 R 2 ↔ R 3 → E =

Now left multiply an arbitrary 3 × 3 matrix A by the matrix E:

E · A =

a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33

a 11 a 12 a 13 a 31 a 32 a 33 a 21 a 22 a 23

EA interchanges row2 and row3 of A.

EXAMPLE: Let A be a 3 × 3 matrix. What 3 × 3 matrix F adds 5 times row2 to row3 and then adds 2 times row1 to row2 when it multiplies A?

Solution: First find an elementary matrix E 1 that adds 5 · row2 to row3. We can obtain this matrix by performing this row operation on the identity:

I =

 (^) R 3 = r 3 + 5r 2 →

 = E 1

Then find E 2 that performs R 2 = r 2 + 2r 1

I =

 (^) R 2 = r 2 + 2r 1 →

 = E 2

To perform the two operations in sequence we need 1st to multiply by E 1 and then by E 2.

⇒ F = E 2 · E 1 =

F is the 3 × 3 matrix that performs the two operations in sequence.

CHECK:

F A = E 2 E 1 A =

a 11 a 12 a 13 2 a 11 + a 21 2 a 12 + a 22 2 a 13 + a 23 5 a 21 + a 31 5 a 22 + a 32 5 a 23 + a 33

Theorem: Equivalent conditions for non singularity

Let A be an n × n matrix. The following conditions are equivalent:

(a) A is non singular (i.e. A−^1 exists).

(b) The homogeneous system Ax = 0 has only the trivial solution x = (0, 0 ,... , 0)T^.

(c) A is row equivalent to I( i.e. we can obtain the Identity by performing a finite sequence of row operations on A, that is, I = EkEk− 1 · · · E 1 A for some elementary matrices Ej , i.e. the RREF of A is the Identity matrix)

Proof.

(a)⇒ (b) Ax = 0 ⇒ A−^1 Ax = 0 ⇒ x = 0.

(b)⇒ (c) If A is not row equivalent to I, then rref(A) has a row of zeros and the system Ax = 0 would have infinitely many solutions which contradicts (b).

(c)⇒ (a) If I = EkEk− 1 · · · E 1 A then A−^1 = (EkEk− 1 · · · E 1 ), thus A−^1 exists and the matrix is nonsingular.



Corollary: Let A be n × n, then A is nonsingular, iff the system Ax = b has a unique solution for every vector b.

Proof: If A is nonsingular, then Ax = b has the unique solution x = A−^1 b. Conversely, if Ax = b has a unique solution for every b, then, in particular, Ax = 0 has a unique solution and therefore A is nonsingular by the Theorem on equivalent condition for nonsingularity. 

EXAMPLE Let A =

[

]

(i) Show that A is row equivalent to I.

(ii) Write A−^1 as a product of elementary matrices.

(iii) Solve the system Ax =

[

]

using A−^1.

Soln.

(i) We need to find elementary matrices s.t. I = EkEk− 1 · · · E 2 E 1 A. The elementary matrices corre-

spond to the row operations needed to put A in RREF. A =

[

]

To zero out 5 we need to perform the row operation R 2 = r 2 − 5 r 1. If we perform this same row operation on the identity

matrix we obtain the elementary matrix E 1 =

[

]

We have E 1 A =

[

]

To make the 2 a 1, we need to perform the row operation R 2 = r 2 /2. Performing the same row

operation on the identity matrix gives the elementary matrix E 2 =

[

]

Now we can easily check that I = E 2 E 1 A.

(ii) From I = E 2 E 1 A we have I = (E 2 E 1 )A. Let B = E 2 E 1 , then B ·A = I and B = A−^1 by definition of inverse. Thus

A−^1 = E 2 E 1 =

[

] [

]

[

]

(iii) From the Corollary:

x = A−^1

[

]

[

] [

]

[

]

← Solution to the system.

From (c) in Theorem (Equivalent conditions for nonsingularity), we have that the same row operations that transform A into I will transform I into A−^1 (in the Example, I = E 2 E 1 A ⇒ A−^1 = E 2 E 1 ⇒ A−^1 = E 2 E 1 I). This gives us a method for computing A−^1 :

Computing the Inverse

  1. Create the augmented matrix [A|I].
  2. Perform row operations that transform A into I on the augmented matrix [A|I].
  3. The RREF of [A|I] will be [I|A−^1 ].

EXAMPLE

Find the inverse of A =

Solution

[A|I] =

 (^) R 2 = r 2 + r 1 R 3 = r 3 + r 1

R 3 = r 3 + 2r 2

 (^) R 3 = r 3 / 2 →

R 1 = r 1 − r 3 R 2 = r 2 − 2 r 3

 = [I|A−^1 ] ⇒ A−^1 =

NOTE: A diagonal matrix has an inverse provided no diagonal entries are zero.

If A =

d 1

.. . dn

, then^ A−^1 =

1 d 1

.. . 1 dn

IMPORTANT REMARK

In practice we never use the inverse to solve a system b/c it is computationally inefficient and it introduces round off errors. Solving the system using RREF is better. In MATLAB, use A\b to solve the system Ax = b

Definition: A matrix is upper triangular if all elements below the diagonal are zero, it is lower triangular if all elements above the diagonal are zero.

U is determined with the usual row reduction but using only row operations of TYPE III.

EXAMPLE

Find the LU factorization of A =

Solution

R 2 = r 2 + 4r 1 ⇒ l 21 = − 4 R 3 = r 3 + 2r 1 ⇒ l 31 = − 2

R 3 = r 3 − 4 r 2 ⇒ l 32 = 4 ⇒

 = U L =

WE CAN EASILY CHECK THAT A = LU.

NOTE: Not all matrices have an LU factorization b/c not all matrices can be reduced to upper triangular form using only row operation III, but if we allow the rows to be interchanged, then all matrices have an LU factorization (but we have to keep track of the rows we permute).

EXAMPLE

A =

 (^) does not have an LU (when we try to zero out the entries in the first column we

obtain

, and it is impossible to put this matrix in triangular form without permuting

the rows). However, the matrix

 (^) does have an LU factorization.

Solving systems using LU Factorization

The LU factorization is very useful when studying computer methods for solving linear systems. We can use the LU to solve systems in the following manner:

To solve Ax = b or, equivalently: LU x = b, Let y = U x First solve Ly = b (USING SUBSTITUTION!) and then U x = y (USING SUBSTITUTION!!!!)

EXAMPLE

Solve the system using the LU factorization:

x 1 x 2 x 3

Solution: We already found before the LU decomposition of the coefficient matrix.

First solve Ly = b, i.e.

y 1 y 2 y 3

This system reduces to y 1 = − 22 − 4 y 1 + y 2 = 88 − 2 y 1 + 4y 2 + y 3 = 46 and using forward substitution we find the solution y 1 = − 22 , y 2 = 0 and y 3 = 2.

We now solve U x = y, i.e.

x 1 x 2 x 3

The system reduces to −x 1 + 4x 2 + x 3 = − 22 −x 2 + 2x 3 = 0 −x 3 = 2 and using back substitution we find the solution

x = (4, − 4 , −2)T