Sei sulla pagina 1di 32

Determinants &

CRAMER’S RULE
Introduction
Every square matrix has associated with it a scalar called its determinant.
Given a matrix A, we use det(A) or |A| to designate its determinant.
We can also designate the determinant of matrix A by replacing the
brackets by vertical straight lines. For example,

2 1 2 1
A  det( A) 
 0 3 0 3
Definition 1: The determinant of a 11 matrix [a] is the scalar a.

Definition 2: The determinant of a 22 matrix a b  is the scalar ad-bc.


c d 

For higher order matrices, we will use a recursive procedure to compute
determinants.
Expansion by Cofactors
Definition 1: Given a matrix A, a minor is the determinant of any
square submatrix of A.
Definition 2: Given a matrix A=[aij] , the cofactor of the element
aij is a scalar obtained by multiplying together the term (-1)i+j
and the minor obtained from A by removing the ith row and the
jth column.
In other words, the cofactor Cij is given by Cij = (1)i+jMij.
For example,
a12 a13
 a11 a12 a13  M 21   C 2 1  (  1) 2  1 M  M
A  a21 a22 a23 
21 21
a32 a33

a31 a32 a33  M 22 


a11 a13
 C 2 2  (  1) 2  2 M M
22 22
a31 a33
Expansion by Cofactors
To find the determinant of a matrix A of arbitrary order,
a) Pick any one row or any one column of the matrix;
b) For each element in the row or column chosen, find its
cofactor;
c) Multiply each element in the row or column chosen by its
cofactor and sum the results. This sum is the determinant of
the matrix.
In other words, the determinant of A is given by
n
det( A )  A   a ij C ij  a i1C i1  a i 2 C i 2    a in C in ith row
expansion
j 1
n
det( A )  A   a ij C ij  a1 j C 1 j  a 2 j C 2 j    a n j C n j jth column
i 1 expansion
Example 1: 1 2 3
We can compute the determinant
T  4 5 6
7 8 9
by expanding along the first row,

5 6 1 2 4 6 13 4 5
T  1    2    3  
11
 3  12  9  0
8 9 7 9 7 8

Or expand down the second column:

4 6 2 2 1 3 3 2 1 3
T  2     5    8  
1 2
 12  60  48  0
7 9 7 9 4 6

Example 2: (using a row or column with many zeroes)

1 5 0
23 1 5
2 1 1  1    16
3 1
3 1 0
Properties of determinants
Property 1: If one row of a matrix consists entirely of zeros, then
the determinant is zero.
Property 2: If two rows of a matrix are interchanged, the
determinant changes sign.
Property 3: If two rows of a matrix are identical, the determinant
is zero.
Property 4: If the matrix B is obtained from the matrix A by
multiplying every element in one row of A by the scalar λ, then
|B|= λ|A|.
Property 5: For an n  n matrix A and any scalar λ, det(λA)=
λndet(A).
Properties of determinants
Property 6: If a matrix B is obtained from a matrix A by adding to
one row of A, a scalar times another row of A, then |A|=|B|.

Property 7: det(A) = det(AT).

Property 8: The determinant of a triangular matrix, either upper or


lower, is the product of the elements on the main diagonal.

Property 9: If A and B are of the same order, then


det(AB)=det(A) det(B).
Pivotal condensation
Properties 2, 4, 6 of the previous section describe the effects on
the determinant when applying row operations.
These properties comprise part of an efficient algorithm for
computing determinants, technique known as pivotal
condensation.
- A given matrix is transformed into row-reduced form using
elementary row operations
- A record is kept of the changes to the determinant as a result of
properties 2, 4, 6.
- Once the transformation is complete, the row-reduced matrix is
in upper triangular form, and its determinant is easily found by
property 8.
Example in the next slide
Pivotal condensation

• Find the determinant of 2  3 10


A   1 2  2
0 1  3
2  3 10 1 2  2 (2) 1 2 2
1 2  2   2  3 10   0  7 14
0 1 3 0 1 3 0 1 3
Factor 7 out of the 2nd row
1 2 2 1 2 2
 70 1 2  7 0 1  2  7(1)(1)( 1)  7
(1)
0 1 3 0 0 1
Inversion
Theorem 1: A square matrix has an inverse if and only if its
determinant is not zero.

Below we develop a method to calculate the inverse of


nonsingular matrices using determinants.

Definition 1: The cofactor matrix associated with an n  n matrix


A is an n  n matrix Ac obtained from A by replacing each
element of A by its cofactor.

Definition 2: The adjugate of an n  n matrix A is the transpose


of the cofactor matrix of A: Aa = (Ac)T
Example of finding adjugate
• Find the adjugate of  1 3 2
A   0  2 1
 1 0  2
Solution:
The cofactor matrix of A:

2 1 0 1 0 2
  
 0 2 1 2 1 0  4 1 2
 3 2 1 2 1 3   6 0 3
 0  2 1 2

1 0 
 7 1 2
 3 2 1 2 1 3
 2 1  0 1 0  2 

4 6 7 
Aa   1 0 1
2 3 2
Inversion using determinants
Theorem 2: A Aa = Aa A = |A| I .
 Aa   Aa 
If |A| ≠ 0 then from Theorem 2, A     A  I
 A  A
1 1 a
A  A if A  0
A

That is, if |A| ≠ 0, then A-1 may be obtained by dividing the


adjugate of A by the determinant of A.
For example, if A  a b ,
c d 
then  
1 1 a 1  d  b
A  A 
A ad  bc   c a 
Inversion using determinants: example
 1 3 2
A   0 2 1 -1
Use the adjugate of   to find A
 1 0  2

A  (1)(2)(2)  (3)(1)(1)  (1)(2)(2)  3


4 6 7 
A a   1 0 1
2 3 2

4 6 7   43 2 7
3 
A   1 0 1   13 
1 1 a 1
A  0 1
3 
A 3
2 3 2  23 1 2
3

Cramer’s Rule
Linear Equations and Determinants

The solutions of linear equations


can sometimes be expressed using
determinants.

• To illustrate, let’s solve the following pair


of linear equations for the variable x.

ax  by  r

cx  dy  s
Linear Equations and Determinants

To eliminate the variable y, we multiply


the first equation by d and the second
by b, and subtract.

adx  bdy  rd
bcx  bdy  bs
adx  bcx  rd  bs
Linear Equations and Determinants

Factoring the left-hand side, we get:


(ad – bc)x = rd – bs

• Assuming that ad – bc ≠ 0, we can now


solve this equation for x: rd  bs
x
ad  bc

• Similarly, we find: as  cr
y
ad  bc
Linear Equations and Determinants

The numerator and denominator of the


fractions for x and y are determinants
of 2 x 2 matrices.

• So, we can express the solution of the system


using determinants as follows.
Cramer’s Rule for Systems in Two Variables

The linear system ax  by  r



cx  dy  s
has the solution
r b a r
s d c s
x y
a b a b
c d c d
provided
a b
0
c d
Cramer’s Rule

Using the notation

a b  r b  a r 
D  Dx    Dy   
c d  s d  c s 
the solution of the system can be written
as:
Dx Dy
x and y 
D D
E.g. 6—Cramer’s Rule for a System with Two Variables

Use Cramer’s Rule to solve


the system.
2 x  6 y  1

 x  8y  2
E.g. 6—Cramer’s Rule for a System with Two Variables

For this system, we have:

2 6
D   2  8  6  1  10
1 8
1 6
Dx   ( 1)8  6  2  20
2 8
2 1
Dy   2  2  ( 1)1  5
1 2
E.g. 6—Cramer’s Rule for a System with Two Variables

The solution is:


Dx20
x   2
D 10

Dy 5 1
y  
D 10 2
Cramer’s Rule

Cramer’s Rule can be extended to apply


to any system of n linear equations
in n variables in which the determinant
of the coefficient matrix is not zero.
Cramer’s Rule

As we saw in the preceding section, any


such system can be written in matrix form
as:
 a11 a12 a1n   x1   b1 
a a    
a2n   x2   b2  
 21 22

    
    
an1 an 2 ann   xn  bn 
Cramer’s Rule

By analogy with our derivation of Cramer’s


Rule in the case of two equations in two
unknowns, we let:
• D be the coefficient matrix in this system.
• Dxi be the matrix obtained by replacing the ith
column of D by the numbers b1, b2, . . . , bn
that appear to the right of the equal sign.

The solution of the system is then given by


the following rule.
Cramer’s Rule

Suppose a system of n linear equations


in the n variables x1, x2, . . . , xn is equivalent
to the matrix equation DX = B, and |D| ≠ 0.

• Then, its solutions are:


Dx1 Dx2 Dxn
x1  , x2  , ..., xn 
D D D
where Dxi is the matrix obtained by replacing
the ith column of D by the n x 1 matrix B.
E.g. 7—Cramer’s Rule for a System of Three Variables

Use Cramer’s Rule to solve the system.

2 x  3 y  4 z  1

 x  6z  0
3 x  2y 5

• First, we evaluate the determinants


that appear in Cramer’s Rule.
E.g. 7—Cramer’s Rule for a System of Three Variables

2 3 4 1 3 4
D  1 0 6  38 Dx  0 0 6  78
3 2 0 5 2 0
2 1 4 2 3 1
Dy  1 0 6  22 Dz  1 0 0  13
3 5 0 3 2 5

• Note that D is the coefficient matrix and that Dx, Dy,


and Dz are obtained by replacing the first, second,
and third columns of D by the constant terms.
E.g. 7—Cramer’s Rule for a System of Three Variables

Now, we use Cramer’s Rule to get


the solution:
Dx 78 39
x  
D 38 19

22 11
Dy
y  
D 38 19
Dz13 13
z  
D 38 38
Limitations of Cramer’s Rule

Moreover, the rule doesn’t apply if


| D | = 0 or if D is not a square matrix.

• So, Cramer’s Rule is a useful alternative


to Gaussian elimination—but only in some
situations.
Your Turn
• Use Cramer’s Rule to solve the system of linear equation.
 x  2 y  3z  1
2x  z 0
3x  4 y  4 z  2

1 2 3
A 2 0 1  10
3 4 4 1 2 3
0 0 1
A1 2 4 4 (2)(1)( 2)  (4)(1)(1) 8 4
x    
A 10 10 10 5

3 8
y , z
2 5

Potrebbero piacerti anche