COSC85 Numerical Analysis
Joeren Cruz Jarin, BSCpE
Cavite State University – Silang Campus
REVIEW
2
Multiply -3[4 -7 -1/2]
[-12 21 1.5]
3
[2 3 4] + [-2 -3 -4]
[0 0 0]
4
Solve the system of linear
equations by graphing.
x + 2y = -4
4y = 3x + 12
5
x + 2y = -4
4y = 3x +12
6
He was a Genevan
mathematician and the In 1750 he
son of physician Jean published Cramer's rule,
Cramer and Anne Mallet giving a general formula
Cramer.
for the solution for any
unknown in a linear
Cramer showed promise equation system having a
in mathematics from an unique solution, in terms
early age. At 18 he of determinants implied
received his doctorate and
by the system. This rule is
at 20 he was co-chair of
mathematics at the still standard.
University of Geneva.
GABRIEL CRAMER
31 July 1704 – 4 January 1752
7
CRAMER’S
RULE
Coefficient Matrices
Cramer’s Rule for 2x2 System
Determinants
8
DETERMINANT
Every square matrix (n by n) has
an associated value called its
determinant, shown by straight
1 2
[
vertical brackets, such as
3 4
].
9
DETERMINANT (2X2 Matrix)
WORDS NUMBERS ALGEBRA
The determinant 1 2
of a 2x2 matrix is
det [3 4
] det [ 𝑎
𝑐
𝑏
𝑑
]
the difference of
= ad - cb
the products of = (1)(4) – (3)(2)
the diagonals. = -2
10
EXAMPLE #1
Find the determinant of each
matrix.
1 5 1/2 −1
1. [ 4 8
] 2. [
−1/2 2
]
11
SOLUTION #1
Find the determinant.
1 5 1 5
[ 4 8
] = [
4 8
]
= (1)(8) – (4)(5)
= 8 – 20
= -12
12
SOLUTION #2
Find the determinant.
1/2 −1 1/2 −1
[ −1/2 2
]= [
−1/2 2
]
= (1/2)(2) – (-1/2)(-1)
= 1 – 1/2
= 1/2
13
EXAMPLE #3
Find the determinant.
1/2 1/8
[ 4 2𝞹
]
14
“
You can use the determinant of a matrix to help you
solve a system of equations. For two equations with
two variables written in ax + by = c form, you can
construct a matrix of the coefficients of the variables.
15
“
For the system a1x + b1y = c1
a2x + b2y = c2
𝑎1 𝑏1
the coefficient matrix is [ ]
𝑎2 𝑏2
16
“
The coefficient matrix for a system of linear
equations in standard form is the matrix formed by
the coefficients for the variables in the equations.
17
“
The determinant D of the coefficient matrix is
𝑎1 𝑏1
[ ]
𝑎2 𝑏2
18
CRAMER’S RULE FOR TWO EQUATIONS
a1x + b1y = c1
a2x + b2y = c2
c1 b1 a1 c1
has solutions x =[c2 b2];y= [ a2 ]
c2 ,
𝑎1 𝑏1
[
where D = 𝑎 𝑏2
]
2
19
“
You can use Cramer’s rule to tell whether the system
represented by the matrix has one solution, no solution,
or infinitely many solutions.
20
SOLUTIONS OF SYSTEM
If D = 0, and at least
If D = 0 and neither
one numerator
If D ≠ 0, the system is numerator determinant
determinant is 0, the
consistent and has one is 0, the system is
system is dependent
unique solution. inconsistent and has
and has infinitely many
no solution.
solutions
21
Using Cramer’s Rule for Two Equations
2x + y = 10
3x – 2y = 8
Step 1. Find D, the determinant of the coefficient matrix.
2 1
D= [3 2
] = (2)(-2) – (3)(1) = - 7 D ≠ 0, so the
− system is consistent.
22
Using Cramer’s Rule for Two Equations
Step 2. Solve for each variable by replacing the coefficients
of that variable with the constants as shown below.
c1 b1 a1 c1
x=
c2[ b2
;y=] [ a2 c2 , ]
10 1 2 10
x= [8 −2
] ;y=[
3 8
]
23
Using Cramer’s Rule for Two Equations
10 1 2 10
[ 8 −2 ]
x= [ 3 8]
y=
x = -28/-7 y = -14/-7
X=4 y=2
The solution is (4,2).
24
EXAMPLE #4
Use Cramer’s Rule to solve the equations.
3x + 5 = 2y
15x - 6y = -9x
25
STEPS
1. Write the equation in standard form.
2. Find the determinant of the coefficient
matrix.
26
“
Since at least one numerator is 0, the
system is dependent
and has infinitely many solutions.
27
EXAMPLE #5
Use Cramer’s Rule to solve the equations.
6x – 2y = 14
3x = y + 7
Step 1. Write the equation in standard form.
Step 2. Find the determinant of the coefficient
matrix.
28
“
Because D = 0 and one of the
numerator determinants is equal to
0, the system is dependent and has
infinitely many solutions.
29
“
Because D = 0 and one of the
numerator determinants is equal to
0, the system is dependent and has
infinitely many solutions.
30
3 x 3 Matrix
To apply Cramer’s rule to 3 x 3 systems, you need to
find the determinant of a 3 x 3 matrix. One method is
shown below.
31
EXAMPLE #6
Find the determinant of M.
Step 1 Multiply each “down” diagonal and add.
2(2)(8)+ 4(3)(1) + 1(5)(4) = 64
Step 2 Multiply each “up” diagonal and add.
1(2)(1)+ 4(3)(2) + 8(5)(4) = 186
32
EXAMPLE #6
Step 3 Find the difference of the sums.
64 – 186 = -122
The determinant is –122.
33
SEATWORK
Find the determinant of
34
ASSIGNMENT
A nutritionist creates a diet for a long-distance runner that includes
3400 Calories from 680 grams of food, with half the Calories coming
from carbohydrates. How many grams of protein, carbohydrates, and
fat will this diet include?
Calories per Gram The diet will include
Food Calories p grams of protein, c
grams of carbohydrates,
Protein 4
and f grams of fat.
Carbohydrates 4
Fats 9
35
Thank You!
36