You are on page 1of 12

Determinant

MAT307 Numerical Analysis Determinant in Higher Dimensions


System of Linear Equations

MAT307 Numerical Analysis

Matrices II

Dr. Mustafa Ağgül

mustafaaggul@hacettepe.edu.tr

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Definition
The determinant is a function assuming a square matrix as an input and
returning a scalar number. It is denoted by |A| or det(A).
In particular,
h i
for n = 1 a11 a11

" #
a11 a12
for n = 2 a11 a22 − a12 a21
a21 a22
 
a11 a12 a13
a11 a22 a33 + a21 a32 a13 + a31 a12 a23
for n = 3 a21 a22 a23 
 
−a13 a22 a31 − a23 a32 a11 − a33 a12 a21
a31 a32 a33

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Definition
The determinant is a function assuming a square matrix as an input and
returning a scalar number. It is denoted by |A| or det(A).
In particular,

h i
for n = 1 a11 a11

" #
a11 a12
for n = 2 a11 a22 − a12 a21
a21 a22


a11 a12 a13

a a22 a23
21 a11 a22 a33 + a21 a32 a13 + a31 a12 a23
for n = 3 a31 a32 a33

−a13 a22 a31 − a23 a32 a11 − a33 a12 a21
a11 a12 a13

a21 a22 a23

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

However, for 4 × 4 and bigger matrices, we have to drop back down to


the smaller 2 × 2 and 3 × 3 determinants by using minors and cofactors.

Definition
I The minor, Mij is the determinant of the square matrix formed by
deleting the ith row and jth column from the square matrix A.
I The cofactor corresponding to the entry aij is Cij = (−1)i+j Mij

Example
 
1 3 −1
−1

  2 0 3
Given A = 2 0 , M12 = = 4 and M31 = = 1.
 
1
  3 2 1 0
3 1 2

Also, C12 = (−1)1+2 M12 = −4 and C31 = (−1)3+1 M31 = 1

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

In general, picking a row (ith) and using cofactors corresponding to its


entries, determinant can be found by
n
X
|A| = aij Cij = ai1 Ci1 + ai2 Ci2 + · · · + ain Cin
j=1

Similarly, picking a column (jth) and using cofactors corresponding to its


entries, determinant can be found by
n
X
|A| = aij Cij = a1j C1j + a2j C2j + · · · + anj Cnj
i=1

Remark
Both of these formulas give the same determinant regardless of the
choice of which row/column. Therefore, picking the row/column having
lots of zero entries reduces the number of computations.

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Example
 
1 3 −1
 
Consider A = 2 0 .
 
1
 
3 1 0

Picking the 3rd column eliminates two terms in the determinant formula
since a23 = a33 = 0,

|A| = a13 C13 + a23 C23 + a33 C33 = a13 C13




1+3
2 1
|A| = a13 C13 = (−1)(−1)
= (−1)(+1)(−1) = 1.

3 1
You should try to get the same answer by picking another row or column!

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Definition
For arbitrary constants a1 , a2 , . . . , an , c and unknowns x1 , x2 , . . . , xn , the
equality
a1 x1 + a2 x2 + · · · + an xn = c
is called a linear equation. A solution of this linear equation is
x1 , x2 , . . . , xn values that satisfies this linear equation at the same time.

Example

2x1 + x2 + 5x3 = −6
is a linear equation with a solution x1 = −4, x2 = 2, x3 = 0.
Similarly, x1 = −3, x2 = 0, x3 = 0 is another solution to the linear
equation. This is to say that a linear equation may have more than one
solution.

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Example

How can we illustrate all possible solutions of this linear equation?

Simply solving this equation for x2 , we obtain



x2 = −6 − 2x1 − 5x3

Here, x2 is determined by picking x1 and x3 . Hence, choosing x1 = t


and x3 = s, the general solution to the linear equation can be found by

x1 = t, x2 = −6 − 2t − 5s, x3 = s

Letting t = −4 and s = 0, x2 = 2 can be found. Therefore, the first


solution above x1 = −4, x2 = 2, x3 = 0 will be recovered. One can find
any particular solution to the linear system following similar fashion.

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Definition
A system of linear equations is a collection of more than one linear
equation involving the same set of unknowns. A linear system with n
unknowns and m linear equations is as follows:

a11 x1 + a12 x2 + · · · + a1n xn = b1 ,


a21 x1 + a22 x2 + · · · + a2n xn = b2 ,
..
.
am1 x1 + am2 x2 + · · · + amn xn = bm ,

where aij ’s are constant coefficients of unknowns and bi ’s are constants


of linear equations.

The coefficients of unknowns listed above are very similar to the entries
of a matrix. That is not a coincidence since we can rewrite this system as
a matrix-vector product.

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

The following matrix-vector product replicates the given linear system.


    
a11 a12 . . . a1n x1 b1
    
 a21 a22 . . . a2n   x2   b2 
    
 .. .. ..   ..  =  .. 
    
 . . . . . .  .   . 
    
am1 am2 . . . amn xn bm
   
a11 x1 + a12 x2 + · · · + a1n xn b1
   
 a21 x1 + a22 x2 + · · · + a2n xn   b2 
   
= 
..   .. 



 .   . 
  
am1 x1 + am2 x2 + · · · + amn xn bm

Therefore, the linear system can be rewritten as a matrix-vector product


Ax = b, where A is the coefficient matrix, x is the vector of unknowns
and b is the vector of constants.

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Rewriting a linear system as a matrix-vector product Ax = b allows us to


employ matrix algebra to simplify finding out solutions. Given Ax = b
and letting A be an invertible matrix, we multiply the equation by A−1
from the left to get

A−1 Ax = A−1 b ⇒ Ix = A−1 b ⇒ x = A−1 b

The process of finding a solution to the system Ax = b is reduced to a


matrix-vector product once we compute A−1 .

Dr. Mustafa Ağgül Hacettepe University


Determinant
MAT307 Numerical Analysis Determinant in Higher Dimensions
System of Linear Equations

Example
Consider the following linear system:
    
x1 + 2x2 = 1, 1 2 x1 1
⇒    = 
3x1 + 5x2 = 2 3 5 x2 2

      
−5 2 1 2 x1 −5 2 1
⇒     =  
3 −1 3 5 x2 3 −1 2

      
1 0 x1 x −1
⇒     =  1 = 
0 1 x2 x2 1

Dr. Mustafa Ağgül Hacettepe University

You might also like