You are on page 1of 50

APPLIED LINEAR ALGEBRA

2. Determinants
(Section 7.7 of Kreyszig)
Contents

1 Determinants

2 Properties of Determinants

3 Cramer’s Rule
Section 1

Determinants
Introduction

1 Determinants arise naturally when we want to find


volumes of parallelepipeds in n-dimensional space.

2 They can also be used to compute A−1 in terms of the


entries of A.
Determinants

• Let v1 , v2 , . . . , vn be vectors in Rn . We denote by


det(v1 , v2 , . . . , vn ) a function whose absolute value is the
volume of the parallelepiped in Rn whose edges are
v1 , v2 , . . . , vn .
• If A is the matrix with columns v1 , v2 , . . . , vn , we define

|A| = det(A) = det(v1 , v2 , . . . , vn ).

• By examining the scaling and additive properties of


volumes, we will deduce several properties that det need
to satisfy.
Determinants
1 det(v1 , . . . , αvk , . . . , vn ) = α det(v1 , . . . , vk , . . . , vn ) for
any α ∈ R.
2 det(v1 , . . . , uk + wk , . . . , vn ) = det(v1 , . . . , uk , . . . , vn )
+det(v1 , . . . , wk , . . . , vn )
3 det(v1 , . . . , vn ) = 0 if for some j 6= k, vj = vk .
4 For the standard basis e1 , . . . , en , we have

det(e1 , . . . , en ) = 1.

Here ej is the vector whose j-th entry is 1, other entries


are 0.
5 If A0 is the matrix obtained from A by interchanging the
j-th and k-th columns then

det(A0 ) = − det(A).
Determinants of 2 × 2 matrices

From the Linearity Properties 1 and 2, we get


           
a b 1 b 0 b
det( , ) = a det( , ) + c det( , )
c d 0 d 1 d
       
1 1 1 0
= ab det( , ) + ad det( , )
0 0 0 1
       
0 1 0 0
+ cb det( , ) + cd det( , )
1 0 1 1

By Property 3,
       
0 0 1 1
det( , ) = det( , ) = 0.
1 1 0 0
Determinants of 2 × 2 matrices

By Property 5,
       
0 1 1 0
det( , ) = − det( , ) = −1.
1 0 0 1

Thus,    
a b
det( , ) = ad − bc.
c d
Determinants of 3 × 3 matrices
Similarly, we have
   
a11 a12 a13 1 1 1
det( a21
 a22 a23 ) = a11 a12 a13 det( 0 0
  0)
a31 a32 a33 0 0 0
 
1 1 0
+ a11 a12 a23 det(0 0 1)
0 0 0
 
1 1 0
+ a11 a12 a33 det(0 0 0) + · · ·
0 0 1

There are 27 terms on the right hand side, each is the product
of n entries, one from each column, and the determinant of
the corresponding 0-1 matrix.
Determinants of 3 × 3 matrices

Most of these terms are 0, by Property 3. A term can be non


zero only if there are no two entries on the same row. Thus
there are 6 terms left:
   
1 0 0 1 0 0
a11 a22 a33 det( 0 1 0 ) + a11 a32 a23 det( 0 0
   1)
0 0 1 0 1 0
   
0 1 0 0 0 1
+a21 a12 a33 det( 1 0 0 ) + a21 a32 a13 det( 1 0
   0)
0 0 1 0 1 0
   
0 1 0 0 0 1
+a31 a12 a23 det(0 0 1) + a31 a22 a13 det(0 1 0)
1 0 0 1 0 0
Determinants of 3 × 3 matrices
The determinants of the 0-1 matrices can be computed using
Properties 4 and 5. They are 1 or -1 depending on whether the
number of column interchanges needed to bring the matrix to
the identity matrix I3 is even or odd. In the end, we get
 
a11 a12 a13
det(a21 a22 a23 ) = a11 a22 a33 + a12 a23 a31 + a13 a21 a32
a31 a32 a33
− a13 a22 a31 − a11 a23 a32 − a12 a21 a33
Examples
Example

0 5
= 0 × 2 − 1 × 5 = −5
1 2

Example

So
|A| = 0 + 16 − 12 − (−4) − 0 − 6 = 2
Determinants of n × n matrices

In general, we have

a11 a12 · · · a1n


a21 a22 · · · a2n X
.. .. .. . = aσ(1),1 aσ(2),2 . . . aσ(n),n det Pσ
. . . ..
σ(1),σ(2),...,σ(n)
an1 an2 · · · ann

• Here Pσ is the matrix [eσ(1) , eσ(2) , . . . , eσ(n) ] and the sum


is taken over all n-tuple (σ(1), σ(2), . . . , σ(n)) of pairwise
distinct numbers taking values in {1, 2, . . . n}, i.e. ,
(σ(1), σ(2), . . . , σ(n) is a reordering of (1, 2, . . . , n).
• In other words, the maps σ : {1, 2, . . . n} → {1, 2, . . . n}
is one-to-one.
Permutations

• We call such σ a permutation of {1, 2, . . . n} and the


matrix Pσ is called the permutation matrix
corresponding to σ.
• The set of all permutations of {1, 2, . . . n} is denoted by
Sn . E.g.
(4, 3, 1, 2), (3, 2, 4, 1) ∈ S4 .
• Let sign(σ) = 1 or −1 depending on whether the number
of position interchanges that convert
(σ(1), σ(2), . . . , σ(n)) into (1, 2, . . . , n) is even or odd.
E.g.
sign(4, 3, 1, 2) = −1, sign(3, 2, 4, 1) = 1.
• As before, using Property 3, we see that det Pσ = sign(σ).
Determinants

Definition
An inversion of a permutation σ is a pair i < j such that
σ(i) > σ(j).
The number of inversions of σ is denote by I (σ).

Example:
I (2, 3, 1) = 2.
I (4, 3, 1, 2) = 5.
I (3, 2, 4, 1) = 4.
Theorem
For any permutation σ,

sign(σ) = (−1)I (σ) .


Determinants

Definition: Determinants

a11 a12 · · · a1n


a21 a22 · · · a2n X
.. .. . . . .. = sign(σ)aσ(1),1 aσ(2),2 . . . aσ(n),n
. . . σ∈Sn
an1 an2 · · · ann
Cofactors

Let Aij be the matrix obtained by removing the i-th row and
j-th column of the matrix A

Cij = (−1)i+j det(Aij ), 1 ≤ i, j ≤ n are called cofactors of A


Cofactor Matrix

Definition
The matrix of cofactors of A is
 
C11 C12 · · · C1n
 C21 C22 · · · C2n 
C =  .. .. ..
 

 . . . 
Cn1 Cn2 · · · Cnn
Cofactor Expansions

Theorem
• For any i,
n
X
det(A) = ail Cil = ai1 Ci1 + ai2 Ci2 + ... + ain Cin .
l=1

(Cofactor expansion along the i-th row)


• For any j,
n
X
det(A) = alj Clj = a1j C1j + a2j C2j + · · · + anj Cnj
l=1

(Cofactor expansion along the j-th column)


Examples
Determinants of 2 × 2 matrices

a11 a12
= a11 a22 − a21 a12 .
a21 a22

Determinant of a 3 × 3 matrix

a11 a12 a13


a22 a23 a21 a23
a21 a22 a23 = a11 − a12
a32 a33 a31 a33
a31 a32 a33
a21 a22
+ a13
a31 a32
= a11 a22 a33 + a12 a23 a31 + a13 a21 a32
− a13 a22 a31 − a11 a23 a32 − a12 a21 a33
Determinants of a matrix of order 3
Example
Compute det(A) where
 
1 −4 2
A =  −2 8 −9 
−1 7 0

Answer: det(A) = 15

Exercises
Find the determinant
a 0 0
1 b 0
3 −5 c

Answer: abc.
Cofactor expansions
Example
Compute
5 −7 2 2
0 3 0 −4
−5 −8 0 3
0 5 0 −6

Solution:
5 −7 2 2
0 3 −4
0 3 0 −4 1+3
= (−1) 2 −5 −8 3
−5 −8 0 3
0 5 −6
0 5 0 −6

3 −4
= 2 (−1)2+1 (−5) = 20
5 −6
Cofactor expansions
Example
Find the determinant of
 
1 −2 3 0
 −1 1 0 2 
A=
 0

2 0 3 
3 4 0 −2

Solution:

det(A) = (3)(C13 ) + (0)(C23 ) + (0)(C33 ) + (0)(C43 ) = 3C13

−1 1 2 −1 1 2
= 3(−1)1+3 0 2 3 =3 0 2 3
3 4 −2 3 4 −2
Cofactor expansions

Solution (Cont.)

−1 1 2
1 2 −1 2
0 2 3 = (0)(−1)2+1 +(2)(−1)2+2
4 −2 3 −2
3 4 −2

−1 1
+(3)(−1)2+3
3 4
= 0 + (2)(1)(−4) + (3)(−1)(−7) = 13
Thus, det(A) = 39.
Section 2

Properties of Determinants
Triangular matrices
Theorem
If A is an n × n triangular matrix (upper triangular, lower
triangular, or diagonal), then its determinant is the product of
the entries on the main diagonal. That is

det(A) = a11 a22 a33 · · · ann

Example
If  
−2 0 0 0 0

 10 4 0 0 0 

A=
 5 0 2 0 0 

 7 6 0 5 0 
9 2 4 1 −1
then det(A) = (−2)(4)(2)(5)(−1) = 80
Determinant of Transpose
Theorem
If A is a n × n matrix A then det(AT ) = det(A).
Proof: Let A = [aij ], AT = [bij ]. Then
 X
det AT = sign(σ)bσ(1),1 bσ(2),2 ...bσ(n),n
σ

We have
bσ(1),1 bσ(2),2 ...bσ(n),n = a1,σ(1) a2,σ(2) ...an,σ(n)
= aσ−1 (1),1 aσ−1 (2),2 ...aσ−1 (n),n
where σ −1 is the inverse permutation of σ.
Since sign(σ −1 ) = sign(σ), we get
sign(σ)bσ(1),1 bσ(2),2 ...bσ(n),n = sign(σ −1 )aσ−1 (1),1 aσ−1 (2),2 ...aσ−1 (n),n .
Thus the terms in det(AT ) and det A are equal, hence
det(AT ) = det(A).
Example

If  
1 2 3
A= 2 1 3 
3 1 2
then  
1 2 3
AT =  2 1 1 
3 3 2
and
|A| = 6 = AT
Determinant and elementary row operations
Theorem
Let A be a square matrix.
1 If B is obtained from A by interchanging two rows then
det(B) = − det(A).
2 If B is obtained from A by multipling on row of A with α
then det(B) = α det(A).
3 If B is obtained from A by adding multiple of one row to
another then det(B) = det(A).

Corollary
1 If two rows (columns) of A are equal, then det(A) = 0.
2 If a row (column) of A consists entirely of zeros, then
det(A) = 0.
3 det(αA) = αn det(A), where α is a constant.
Example

• Let
   
1 2 3 1 2 3
A =  0 1 4 , A1 =  −2 −3 −2 
1 2 1 1 2 1

A1 is obtained from A by R2 − 2R1 . We have


det(A1 ) = det(A) = −2.
• Let  
4 8 12
A2 =  0 1 4  .
1 2 1
Then det(A2 ) = 4 det(A) = −8.
Example

Evaluate
1 −4 2
−2 8 −9
−1 7 0
Solution:
1 −4 2 1 −4 2
R2 +2R1
−2 8 −9 = 0 0 −5
−1 7 0 −1 7 0

1 −4
=5 = 15.
−1 7
Example

Compute det(A) where


 
3 −1 2 −5
 0 5 −3 −6 
A=
 −6 7 −7 4 

−5 −8 0 9

Solution:
Add 2 times row 1 to row 3 to obtain
3 −1 2 −5
0 5 −3 −6
det(A) = =0
0 5 −3 −6
−5 −8 0 9
Example
Compute
1 1 1 1 .. 1
1 0 1 1 .. 1
1 1 0 1 .. 1
Dn =
. . . . . .
1 1 .. 1 0 1
1 1 1 .. 1 0

Solution: Employ the row operations: Rk − R1 , for


k = 2, 3, .., n.
1 1 1 1 .. 1
0 −1 0 0 .. 0
0 0 −1 0 .. 0
Dn = = (−1)n−1
. . . . . .
0 0 .. 0 −1 0
0 0 0 .. 0 −1
Example
Compute
0 1 1 1 .. 1
1 0 1 1 .. 1
1 1 0 1 .. 1
En =
. . . . . .
1 1 .. 1 0 1
1 1 1 .. 1 0
Exercises
Find the determinant of the following matrices
1.  
0 1 2 −1
 2 5 −7 3 
A=  0

3 6 2 
−2 −5 4 −2
2.  
1 1 1
V3 =  x0 x1 x2 
x02 x12 x22
3*.  
1 1 1 1 1

 x0 x1 x2 ... xn−1 

Vn = 
 x02 x12 x22 2
... xn−1 

 . . . . . 
x0n−1 x1n−1 x2n−1 n−1
... xn−1
Determinants of Products

Definition
An n × n elementary matrix of type I, type II, or type III is a
matrix obtained from the identity matrix In by performing a
single elementary row (or elementary column) operation of
type I, type II or type III, respectively.

Example
Let    
0 0 1 1 0 0
E1 =  0 1 0  , E2 =  0 −2 0 
1 0 0 0 0 1
Then E1 is an elementary matrix of type I and E2 is an
elementary matrix of type II.
Determinants of Products
Theorem
If E is an elementary matrix, then

det(EA) = det(AE ) = det(E ) det(A).

Theorem
If A and B are n × n matrices then

det(AB) = det(A) det(B).

Corollary
If det(A) 6= 0 then A−1 exists and
1
det(A−1 ) = .
det(A)
Determinants and Invertibility

Equivalent conditions for invertibility


If A is an n × n matrix, then the following statements are
equivalent
1 A is invertible.

2 Ax = b has a unique solution for every n × 1 matrix b.

3 Ax = 0 has only the trivial solution.

4 det(A) 6= 0.

Corollary
If A is a square matrix, then Ax = 0 has a nontrivial solution if
and only if det(A) = 0.
Examples
Let  
1 0 3
A =  0 −1 2 
2 1 0
Compute det(A−1 ), det(2A).
Solution:
1 0 3
|A| = 0 −1 2 = 4.
2 1 0
Thus
1 1
A−1 = =
|A| 4
and
|2A| = 23 |A| = 32
Exercises

1. Let A and B be 4 × 4 matrices, with det(A) = −1 and


det(B) = 2. Compute
a. det(AB), b. det(B 5 ), c. det(2A), d. det(AT A).

2. Let A and P be square matrices, with P invertible. Show


that det(PAP −1 ) = det(A).

3. Suppose that A is a square matrix such that det(A4 ) = 0.


Explain why A can not be invertible.
Section 3

Cramer’s Rule
Cramer’s Rule

Consider a linear system of n equations in n unknowns:

a11 x1 + a12 x2 + ... + a1n xn = b1


a21 x1 + a22 x2 + ... + a2n xn = b2
..
.
an1 x1 + an2 x2 + ... + ann xn = bn

or in matrix notation Ax = b, where A = (aij )n×n .


Cramer’s Rule
1 If D = |A| =
6 0, the system of linear equations has a
unique solution
Dk
xk = , k = 1, 2, ..., n
D
where Dk is the determinant of the matrix obtained by
substituting the k-th column of the matrix A by the
column T
b = b1 b2 · · · bn
For example:
b1 a12 · · · a1n
b2 a22 · · · a2n
D1 = .. .. .. .
. . . ..
bn an2 · · · ann
2 If D = 0 and at least one of the Dk ’s is non-zero, then
the system has no solution.
Example
Use Cramer’s rule to solve the system
(
3x − 2y = 6
−5x + 4y = 8

We have
3 −2
D = det(A) = = 2,
−5 4
6 −2 3 6
D1 = = 40, D2 = = 54.
8 4 −5 8
Therefore,
D1 40 D2 54
x= = = 20, y = = = 27.
D 2 D 2
Example
Use Cramer’s rule to solve the system

 x+ y
 + z = −2
3x − y + 2z = 4

4x + 2y + z = −8

1 1 1 −2 1 1
D= 3 −1 2 = 10, D1 = 4 −1 2 = −10
4 2 1 −8 2 1
1 −2 1 1 1 −2
D2 = 3 4 2 = −30, D3 = 3 −1 4 = 20
4 −8 1 4 2 −8
Thus,
D1 D2 D3
x= = −1, y = = −3, z = =2
Example

Use Cramer’s rule to solve the system



−2x1 + 3x2 − x3 = 1

x1 + 2x2 − x3 = 4

−2x1 − x2 + x3 = −3

−2 3 −1 1 3 −1
D= 1 2 −1 = −2, D1 = 4 2 −1 = −4
−2 −1 1 3 −1 1

−2 1 −1 −2 3 1
D2 = 1 4 −1 = −6, D3 = 1 2 4 = −8
−2 3 1 −2 −1 3
Thus, x1 = 2, x2 = 3, x3 = 4.
Exercises

Solve the following system using both Gaussian elimination


and Cramer’s rule.
1 
2x + 5y − z = 15

x − y + 3z = 4

3x + 3y − 5z = 2

2 
2x + 3y − z = 7

x− y+ z =1

4x − 5y + 2z = 3

Adjoint Matrix and Inverse Formula
Definition
The adjoint matrix of A, denoted by adj(A), is the transpose
of the matrix of cofactors of A,

adj (A) = C T .

A formula for A−1


If A is an n × n matrix, then

A adj (A) = (det A) In

Thus if det A 6= 0 then


1
A−1 = adj (A)
det A
Example
Let  
2 −3 1
A =  4 0 −2 
3 −1 −3
Thus, det A = −26 and the the matrix of cofactors is
 
−2 6 −4
C =  −10 −9 −7 
6 8 12

Therefore,
 
−2 −10 6
1 −1 
A−1 = adj (A) = 6 −9 8 
det A 26
−4 −7 12
Homework

Section 7.7 (p. 300): 7-15, 20-25


Section 7.8 (p. 308): 1-10

You might also like