You are on page 1of 15

Cramer’s Rule


for solving a system of two equations in two


unknowns

By Dalos “Dale” D. Miguel

School of Accountancy, Management, Computing and


Information Studies

Saint Louis University

Baguio City
Objective

• Solve a system of 2 equations in two unknowns using


Cramer’s Rule
Cramer’s Rule
• Cramer’s rule is a procedure for getting the values for variables that satisfy a system of
n equations in n unknowns:

• System of 2 equations in 2 unknowns

• System of 3 equations in 3 unknowns

• System of 4 equations in 4 unknowns

• …

• Cramer’s Rule is used if a unique solution to the system of equations exists. A course
in Linear Algebra (or Readings of references for Linear Algebra) provides the procedure
for determining a priori if a system has a unique solution or not.

• For this course (CS 132), we just assume that the system has a unique solution.
Furthermore, we consider only the case of a system of 2 equations in 2 unknowns.
Cramer’s Rule

for solving a system of two equations in two
unknowns

• General Idea

Given a system of two equations in 2 unknowns of the form

ax + by = h ! equation 1

cx + dy = k ! equation 2

where a,b,c,d,h and k are certain constants and x and y are


variables

The system may be presented in matric form:

a b x h

* =

c d y k
Cramer’s Rule

for solving a system of two equations in two
unknowns

• General Idea:

Coefficient Matrix * Unknown Matrix = Constant Matrix

a b x h

* =

c d y k

• When multiplying a 2 by 2 matrix and a 2 by 1 matrix are multiplied,


the numbers in each row of the 2 by 2 matrix are multiplied by
corresponding numbers in the numbers in in 2 by 1 matrix. Hence,
the left side of the above matric equation is equivalent to the two
expressions (ax + by) and (cx +dy). Essentially, we have

ax + by h

cx + dy k

Cramer’s Rule

for solving a system of two equations in two
unknowns

• General Idea:

Coefficient Matrix * Unknown Matrix = Constant Matrix

a b x h

* =

c d y k

• Cramer’s Rule says the value of an unknown is a quotient of two


determinants.

x = determinant formed by replacing the coefficients of x in the


coefficient matrix by the constants divided by the determinant of
the coefficient matrix

y = determinant formed by replacing the coefficients of y in the


coefficient matrix divided by the determinant of the coefficient
matrix.
Cramer’s Rule

for solving a system of two equations in two
unknowns

• General Idea:

Coefficient Matrix * Unknown Matrix = Constant Matrix

a b x h

* =

c d y k

• Cramer’s Rule says the value of an unknown is a quotient of two


determinants.

x = determinant formed by replacing the coefficients of x in the


coefficient matrix by the constants divided by the determinant of the
coefficient matrix

h b

k d

x = -----------------------

a b

c d
Cramer’s Rule

for solving a system of two equations in two
unknowns

• General Idea:

Coefficient Matrix * Unknown Matrix = Constant Matrix

a b x h

* =

c d y k

• Cramer’s Rule says the value of an unknown is a quotient of two


determinants.

y = determinant formed by replacing the coefficients of y in the


coefficient matrix by the constants divided by the determinant of the
coefficient matrix

a h

c k

y = -----------------------

a b

c d
Value of a 2 by 2 Determinant

• The value of the determinant a b

c d

is the product (a)(d) minus the product (c)(d)

a b

c d
Value of a 2 by 2 Determinant

Example

• The value of the determinant 5 1

-3 -2

is the product (5)(-2) minus the product (-3)(1) = (-10)-(-3) = -10 + 3 = -7

5 1

-3 -2
Cramer’s Rule

Example

• Solve the system

2x + 3y = 12

1x – 5y = -7

Cramer’s Rule

Example

• Solve the system

2x + 3y = 12

1x – 5y = -7

x=3, y=2
Validate the solution:
2x + 3y = 12 ? ! 2(3)+3(2) =12 ? ! 12 = 12
checked!
x - 5y = -7 ? ! (3) -5(2) = -7? ! -7 = -7 checked!
Cramer’s Rule

Example

• Solve the system

3a + 4b = 5

2a – 3b = -4

Cramer’s Rule

Example

• Solve the system

3a + 4b = 5

2a – 3b = -4

a=1/-17 = -1/17, b=-22/-17 = 22/17


Expected Observation

(Using Cramer’s Rule) versus (Using Elimination by Substitution or Elimination by Addition and Subtraction)

• When you are to solve a system of 2 equations in 2 unknowns,


you may use an algebraic method called elimination by
substitution or elimination by addition and subtraction.

• If you make a reflection, the Cramer’s Rule is a convenient


method to solve a system of equations when the numerical
coefficients involved are not whole numbers or when the
numerical coefficients are big numbers such that factoring the
numerical coefficients demands time.

• Having numerical coefficients that are not whole numbers or


having numerical coefficients which are big numbers is most
probable when doing linear regression.

You might also like