You are on page 1of 11

DM559

Linear and Integer Programming

Lecture 4
Elementary Matrices, Matrix Inverse, Determinants,
More on Linear Systems

Marco Chiarandini
Department of Mathematics & Computer Science
University of Southern Denmark
Elementary Matrices
Matrix Inverse
Determinants
Outline Cramer’s rule

1. Elementary Matrices

2. Matrix Inverse

3. Determinants

4. Cramer’s rule

8
Elementary Matrices
Matrix Inverse
Determinants
Invertible Matrices Cramer’s rule

Theorem
If A is an n × n matrix, then the following statements are equivalent:

1. A−1 exists
2. Ax = b has a unique solution for any b ∈ Rn
3. Ax = 0 only has the trivial solution, x = 0
4. The reduced row echelon form of A is I .

Proof: (1) =⇒ (2) =⇒ (3) =⇒ (4) =⇒ (1).

11
Elementary Matrices
Matrix Inverse
Determinants
Matrix Inverse via Row Operations Cramer’s rule

We saw that:
A = E1−1 · · · Er−1 −1
−1 Er I

taking the inverse of both sides:


A−1 = (E1−1 · · · Er−1 −1 −1
−1 Er ) = Er · · · E1 = Er · · · E1 I
Hence:
if Er Er −1 E · · · E1 A = I then A−1 = Er Er −1 · · · E1 I

Method:
• Construct [A | I ]
• Use row operations to reduce this to [I | B]
• If this is not possible then the matrix is not invertible
• If it is possible then B = A−1
14
Elementary Matrices
Matrix Inverse
Determinants
Example Cramer’s rule

     
1 2 4 1 2 4 1 0 0 ii−i 1 2 4 1 0 0
iii+i
A =  1 3 6  → [A | I ] =  1 3 6 0 1 0  −−→  0 1 2 −1 1 0 
−1 0 1 −1 0 1 0 0 1 0 2 5 1 0 1
   
1 2 4 1 0 0 i−4iii 1 2 0 −11 8 −4
iii−2ii ii−2iii
−−−→  0 1 2 −1 1 0  −−−→  0 1 0 −7 5 −2 
0 0 1 3 −2 1 0 0 1 3 −2 1
 
1 0 0 3 −2 0
i−2ii
−−−→  0 1 0 −7 5 −2 
0 0 1 3 −2 1
 
3 −2 0
A−1 =  −7 5 −2 
3 −2 1

Verify by checking AA−1 = I and A−1 A = I .


What would happen if the matrix is not invertible?
15
Elementary Matrices
Matrix Inverse
Determinants
Verifying an Inverse Cramer’s rule

Theorem
If A and B are n × n matrices and AB = I , then A and B are each invertible matrices, and
A = B −1 and B = A−1 .

Proof: show that Bx = 0 has unique solution x = 0, then B is invertible.

AB=I
Bx = 0 =⇒ A(Bx) = A0 =⇒ (AB)x = 0 =⇒ I x = 0 =⇒ x = 0
So B −1 exists. Hence:
AB = I =⇒ (AB)B −1 = IB −1 =⇒ A(BB −1 ) = B −1 =⇒ A = B −1
So A is the inverse of B, and therefore also invertible and
A−1 = (B −1 )−1 = B
(Corollary: we do not need to verify both A−1 A = I and AA−1 = I , one sufficies)
16
Elementary Matrices
Matrix Inverse
Determinants
Outline Cramer’s rule

1. Elementary Matrices

2. Matrix Inverse

3. Determinants

4. Cramer’s rule

17
Elementary Matrices
Matrix Inverse
Determinants
Determinants Cramer’s rule

• The determinant of a matrix A is a particular number associated with A, written |A| or det(A),
that tells whether the matrix A is invertible.

• For the 2 × 2 case:


   
a b 1 0 (1/a)R1 1 b/a 1/a 0
[A | I ] = −−−−−→
c d 0 1 c d 0 1
   
R −cR 1 b/a 1/a 0 aR 1 b/a 1/a 0
−−2−−−→
1 2
−−→
0 d − cb/a −c/a 1 0 (ad − bc) −c a
Hence A−1 exists if and only if ad − bc 6= 0.

• hence, for a 2 × 2 matrix the determinant is


 
a b a b
= = ad − bc
c d c d

18
Elementary Matrices
Matrix Inverse
Determinants
Properties of Determinants Cramer’s rule

Let A be an n × n matrix, then it follows from the previous theorem:

1. |AT | = |A|

2. If a row of A consists entirely of zeros, then |A| = 0.

3. If A contains two rows which are equal, then |A| = 0.

a b
|A| = = ab − ab = 0
a b

a b c
b c a c a b
|A| = d e f = −d +e −f =0+0+0
b c a c a b
a b c

For 1. we can substitute row with column in 2., 3., 4.


23
Elementary Matrices
Matrix Inverse
Determinants
Outline Cramer’s rule

1. Elementary Matrices

2. Matrix Inverse

3. Determinants

4. Cramer’s rule

37
Elementary Matrices
Matrix Inverse
Determinants
Cramer’s rule Cramer’s rule

Theorem (Cramer’s rule)


6 0, and b ∈ Rn , then the solution x = [x1 , x2 , . . . , xn ]T of the linear system
If A is n × n, |A| =
Ax = b is given by

|Ai |
xi = ,
|A|

where Ai is the matrix obtained from A by replacing the ith column with the vector b.

6 0, A−1 exists
Proof: Since |A| = and we can solve for x by multiplying Ax = b on the left by A−1 .
−1
The x = A b:
    
x1 C11 C21 . . . Cn1 b1
 x2  1 C12 C22 . . . Cn2   b2 
x=.=  . .. .  . 
    
 ..  |A|  .. ..
. . ..   .. 
xn C1n C2n . . . Cnn bn
1
=⇒ xi = |A| (b1 C1i + b2 C2i + · · · + bn Cni ), ie, cofactor expansion of column i of A with column i
replaced by b, ie, |Ai | 38

You might also like