Determinants and Cramer's Rule: Example 1: Find The Determinants of The Following Matrices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Determinants and Cramer's Rule

This section will deal with how to find the determinant of a square matrix. Every square
matrix can be associated with a real number known as its determinant. The determinant of a
matrix, in this case a 2x2 matrix, is defined below:

⎡a a12 ⎤
Given the matrix A = ⎢ 11 ⎥
⎣ a 21 a 22 ⎦
det ( A ) = A = a11a 22 − a 21a12

The following example will show how to find the determinant of a 2x2 matrix and that

these determinants may be positive, negative or zero.

Example 1: Find the determinants of the following matrices:

⎡ 2 −3 ⎤ ⎡ 2 1⎤ ⎡ 0 3⎤
a.) A = ⎢ ⎥ b.) B = ⎢ ⎥ c.) C = ⎢ ⎥
⎣ 1 2⎦ ⎣ 4 2⎦ ⎣ 2 4⎦

2 −3 2 1
a.) A = b.) B =
1 2 4 2
= ( 2 )( 2 ) − (1)( −3) = ( 2 )( 2 ) − ( 4 )(1)
= 4 − ( −3 ) = 4−4
= 4+3 =0
=7

0 3
c.) C =
2 4
= ( 0 )( 4 ) − ( 2 )( 3)
= 0−6
= −6

By Ewald Fox SLAC/San Antonio College 1


Solving a matrix greater than a 2x2 is simplified by using minors and cofactors of that
matrix. Given a matrix, the minor of an element of that matrix is found using the remaining
elements of the matrix after the row and column containing the original element are removed and
then evaluated as in example 1. Example 2 will demonstrate this concept using a 3x3 matrix.

Example 2: Find all the minors of the following 3x3 matrix.

⎡ 0 2 1⎤
A = ⎢⎢ 3 −1 2 ⎥⎥
⎢⎣ 4 0 1⎥⎦

Step 1: Analysis.

The minors of the given matrix are labeled as:

⎡ M 11 M 12 M 13 ⎤
⎢ ⎥
⎢ M 21 M 22 M 23 ⎥
⎢⎣ M 31 M 32 M 33 ⎥⎦

in order to better identify their location with respect to their


row and column.

Step 2: Set up and solve each minor.

The row and column containing each minor is eliminated and the
remaining elements are arranged to solve for that elements minor.

−1 2
M 11 = = ( −1)(1) − ( 0 )( 2 ) = −1 − 0 = −1
0 1
3 2
M 12 = = ( 3)(1) − ( 4 )( 2 ) = 3 − 8 = −5
4 1
3 −1
M 13 = = ( 3)( 0 ) − ( 4 )( −1) = 0 + 4 = 4
4 0

2 1
M 21 = = ( 2 )(1) − ( 0 )(1) = 2 − 0 = 2
0 1
0 1
M 22 = = ( 0 )(1) − ( 4 )(1) = 0 − 4 = −4
4 1
0 2
M 23 = = ( 0 )( 0 ) − ( 4 )( 2 ) = 0 − 8 = −8
4 0

By Ewald Fox SLAC/San Antonio College 2


Example 2 (Continued):

2 1
M 31 = = ( 2 )( 2 ) − ( −1)(1) = 4 + 1 = 5
−1 2
0 1
M 32 = = ( 0 )( 2 ) − ( 3)(1) = 0 − 3 = −3
3 2
0 2
M 33 = = ( 0 )( −1) − ( 3)( 2 ) = 0 − 6 = −6
3 −1

Having found the minors of the 3x3 matrix, the cofactors are found by raising “-1” to a
power equal to the sum of the elements row and column number and multiplying that value by
the minor result (i.e. M23 would result in -1 being raised to the 2+3 or 5th power). Example 3 will
demonstrate how to find the cofactors of the matrix given in example 2.

⎡ 0 2 1⎤
Example 3: Find the cofactors of the matrix A = ⎢⎢ 3 −1 2 ⎥⎥
⎣⎢ 4 0 1⎥⎦

Step 1: Find the minors of the matrix.

Example 2 found the minors of the matrix to be:

M 11 = − 1 M 12 = − 5 M 13 = 4
M 21 = 2 M 22 = − 4 M 23 = − 8
M 31 = 5 M 32 = − 3 M 33 = − 6

Step 2: Determine the cofactors using the formula C i j = ( −1)


i+ j
Mi j

C11 = ( −1) M 11 = ( −1) ( −1) = (1)( −1) = −1


1+1 2

C12 = ( −1) M 12 = ( −1) ( −5 ) = ( −1)( −5 ) = 5


1+ 2 3

C13 = ( −1) M 13 = ( −1) ( 4 ) = (1)( 4 ) = 4


1+ 3 4

C21 = ( −1) M 21 = ( −1) ( 2 ) = ( −1)( 2 ) = −2


2 +1 3

C22 = ( −1) M 22 = ( −1) ( −4 ) = (1)( −4 ) = −4


2+ 2 4

C23 = ( −1) M 23 = ( −1) ( −8 ) = ( −1)( −8 ) = 8


2+3 5

By Ewald Fox SLAC/San Antonio College 3


Example 3 (Continued):

C31 = ( −1) M 31 = ( −1) ( 5 ) = (1)( 5 ) = 5


3+1 4

C32 = ( −1) M 32 = ( −1) ( −3) = ( −1)( −3) = 3


3+ 2 5

C33 = ( −1) M 33 = ( −1) ( −6 ) = (1)( −6 ) = −6


3+ 3 6

Having now found the cofactors, the determinant of the matrix may be found by finding
the sum of the products of the entries of any row or column of the given matrix and their
respective cofactor (i.e. |A| = a11C11 + a12C12 + … + a1nC1n). Example 4 will show how to solve
for the determinant of the matrix given in examples 2 and 3.

⎡ 0 2 1⎤
Example 4: Find the determinant of the matrix A = ⎢⎢ 3 −1 2 ⎥⎥
⎣⎢ 4 0 1⎥⎦

Step 1: Find the cofactors of the given matrix.

From example 3 the cofactors of the matrix were found to be:

C11 = − 1 C12 = 5 C13 = 4


C 21 = − 2 C 22 = − 4 C 23 = 8
C 31 = 5 C 32 = 3 C 33 = − 6

Step 2: Select any row or column of the matrix and then, using the formula
|A| = a11C11 + a12C12 + … + a1nC1n, find the determinant. For this
example, the second row and the third column will be evaluated.

A = a21C21 + a22C22 + a23C23


= ( 3)( −2 ) + ( −1)( −4 ) + ( 2 )( 8 )
= −6 + 4 + 16
= 14

A = a13C13 + a23C23 + a33C33


= (1)( 4 ) + ( 2 )( 8 ) + (1)( −6 )
= 4 + 16 − 6
= 14

By Ewald Fox SLAC/San Antonio College 4


Using the ideas demonstrated to this point, example 5 will demonstrate how to find the
determinant of a 4x4 matrix.
⎡ 1 −2 3 0⎤
⎢ −1 1 0 2 ⎥⎥
Example 5: Find the determinant of the matrix A = ⎢ .
⎢ 0 2 0 3⎥
⎢ ⎥
⎣ 3 4 0 2⎦

Step 1: Analyze.

Recall that |A| = a11C11 + a12C12 + … + a1nC1n . For this example, the
second column will be used even though the third column is the simplest
to solve for. This means that for this example

A = 2C12 + 1C 22 + 2C 32 + 4C 42

Step 2: Solve for C12, C22, C32, and C42.

−1 0 2
C12 = ( −1)
3
0 0 3
3 0 2
−1 0 2
=− 0 0 3
3 0 2
⎡ 4 0 0 5 −1 0 6 −1 0 ⎤
= − ⎢ 2 ( −1) + 3 ( −1) + 2 ( −1) ⎥
⎣ 3 0 3 0 0 0⎦
= − ⎡⎣ 2 ( 0 − 0 ) − 3 ( 0 − 0 ) + 2 ( 0 − 0 ) ⎤⎦
=0

By Ewald Fox SLAC/San Antonio College 5


Example 5 (Continued):

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

0 2 0 2 0 3
= 1( 0 − 0 ) + 0 ( 6 − 0 ) + 3 ( 9 − 0 )
= 0 + 0 + 27
= 27

1 3 0
C32 = ( −1) −1 0 2
5

3 0 2
1 3 0
= − −1 0 2
3 0 2
⎡ 2 0 2 3 3 0 4 3 0⎤
= − ⎢1( −1) + ( −1)( −1) + 3 ( −1) ⎥
⎣ 0 2 0 2 0 2⎦
= − ⎡⎣1( 0 − 0 ) + 1( 6 − 0 ) + 3 ( 6 − 0 ) ⎤⎦
= − ( 0 + 6 + 18 )
= −24

1 3 0
C42 = ( −1) −1 0 2
6

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

0 3 0 3 0 2
= 1( 0 − 0 ) + 1( 9 − 0 ) + 0 ( 6 − 0 )
= 0+9+0
=9

By Ewald Fox SLAC/San Antonio College 6


Example 5 (Continued):

Step 3: Solve for |A|.

A = 2C12 + 1C22 + 2C32 + 4C42


= 2 ( 0 ) + 1( 27 ) + 2 ( −24 ) + 4 ( 9 )
= 0 + 27 − 48 + 36
= 63 − 48
= 15

By Ewald Fox SLAC/San Antonio College 7


This section will define and show how to use Cramer’s rule to solve for systems of
equations consisting of two equations and two variables or three equations and three variables.

Cramer’s rule for a system of two equations with two variables is defined by:

a11 x + a12 y = k1 a a12


Given with D = 11 ≠0
a21 x + a22 y = k2 a21 a22

k1 a12 a11 k1
k2 a22 a21 k2
then X = and Y =
D D

a11 a12
The matrix of D = is known as the coefficient matrix.
a21 a22

Example 6: Given 4x – 2y = 10 and 3x – 5y = 11, solve for x and y using Cramer’s rule.

Solution:

Step 1: Analyze.

Using the given definition of Cramer’s rule, the equations of


4x – 2y = 10 and 3x – 5y = 11 yield the elements:

a11 = 4 ; a12 = − 2 ; k1 = 10
and
a21 = 3 ; a22 = − 5 ; k2 = 11

By Ewald Fox SLAC/San Antonio College 8


Example 6 (Continued):

Step 2: Substitute and solve for the coefficient matrix.

a11 a12
D=
a21 a22
4 −2
=
3 −5
= ( 4 )( −5 ) − ( 3 )( −2 )
= − 20 − ( −6 )
= − 20 + 6
= − 14

Step 3: Solve for X and Y.

k1 a12 a11 k1
k2 a22 a21 k2
X= Y=
D D
10 −2 4 10
11 −5 3 11
= =
−14 −14
( 10 )( −5 ) − ( 11)( −2 ) ( 4 )( 11) − ( 3 )(10 )
= =
−14 −14
−50 + 22 44 − 30
= =
−14 −14
−28 14
= =2 = = −1
−14 −14

∴ ( x , y ) = ( 2 , − 1)

By Ewald Fox SLAC/San Antonio College 9


Cramer’s rule for solving a system of three equations and three unknowns is defined by:

a11 x + a12 y + a13 z = k1 a11 a12 a13


Given a21 x + a22 y + a23 z = k1 with D = a21 a22 a23 ≠ 0
a31 x + a32 y + a33 z = k1 a31 a32 a33

k1 a12 a13 a11 k1 a13 a11 a12 k1


k2 a22 a23 a21 k2 a23 a21 a22 k2
k3 a32 a33 a31 k3 a33 a31 a32 k3
then X = ,Y= , Z=
D D D

The matrix D is known as the coefficient matrix.

Example 7: Use Cramer’s rule to solve for the following system:

− x + 2 y − 3z = 1
2x + 0 y + z = 0
3 x − 4 y + 4z = 2

Solution:

Step 1: Analyze.

a11 = − 1 a12 = 2 a13 = − 3 k1 = 1


a21 = 2 a22 = 0 a23 = 1 k2 = 0
a31 = 3 a32 = − 4 a33 = 4 k3 = 2

Step 2: Find the coefficient matrix, D.

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

−4 4 −4 4 0 1
= ( −1)( 1) ⎡⎣ ( 0 ) − ( −4 ) ⎤⎦ + ( 2 )( −1) ⎡⎣ ( 8 ) − ( 12 ) ⎤⎦ + ( 3 )( 1) ⎡⎣( 2 ) − ( 0 ) ⎤⎦
= ( −1)( 4 ) + ( −2 )( −4 ) + ( 3 )( 2 )
= −4 + 8 + 6
= 10

By Ewald Fox SLAC/San Antonio College 10


Example 7 (Continued):

Step 3: Solve for x, y and z.

1 2 −3
0 0 1
2 −4 4
x=
10
0 0 1 2 1 2
( −3 )( −1) + ( 1)( −1) + ( 4 )( −1)
4 5 6

2 −4 2 −4 0 0
=
10
( −3 )( 1) ⎡⎣( 0 ) − ( 0 ) ⎤⎦ + ( 1)( −1) ⎡⎣( −4 ) − ( 4 ) ⎤⎦ + ( 4 )( 1) ⎡⎣( 0 ) − ( 0 ) ⎤⎦
=
10
( −3 )( 0 ) + ( −1)( −8 ) + ( 4 )( 0 )
=
10
0+ 8+ 0
=
10
8 4
= =
10 5

−1 1 −3
2 0 1
3 2 4
y=
10
2 0 5 −1 1 6 −1 1
( −3 )( −1) + ( 1)( −1) + ( 4 )( −1)
4

3 2 3 2 2 0
=
10
( −3 )( 1) ⎡⎣( 4 ) − ( 0 ) ⎤⎦ + ( 1)( −1) ⎡⎣( −2 ) − ( 3 ) ⎤⎦ + ( 4 )( 1) ⎡⎣( 0 ) − ( 2 ) ⎤⎦
=
10
( −3 )( 4 ) + ( −1)( −5 ) + ( 4 )( −2 )
=
10
−12 + 5 − 8
=
10
15 3
=− =−
10 2

By Ewald Fox SLAC/San Antonio College 11


Example 7 (Continued):

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

−4 2 −4 2 0 0
=
10
( −1)( 1) ⎣⎡( 0 ) − ( 0 ) ⎤⎦ + ( 2 )( −1) ⎡⎣( 4 ) − ( −4 ) ⎤⎦ + ( 3 )( 1) ⎡⎣( 0 ) − ( 0 ) ⎤⎦
=
10
( −1)( 0 ) + ( −2 )( 8 ) + ( 3 )( 0 )
=
10
0 − 16 + 0
=
10
16 8
=− =−
10 5

Step 4: Analyze.

4 3 8
The solutions found were x = , y = − and z = − .
5 2 5

This indicates that the solution set or point of interception for the three
given lines is:

( x , y , z ) = ⎛⎜ , − , − ⎞⎟
4 3 8
⎝5 2 5⎠

By Ewald Fox SLAC/San Antonio College 12

You might also like