Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » MATH 1508 (Laboratory) Engineering Applications of PreCalculus » Cramer's Rule

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Cramer's Rule

Module by: Scott Starks. E-mail the author

Cramer’s Rule

Introduction

Cramer’s Rule is a technique that can be used to solve simultaneous linear equations. It is most often utilized when one is required to solve the system by hand rather than by computer. This is due to the fact that there are quicker, more efficient procedures such as Gauss elimination that can be implemented on the computer. The approach is based upon the use of determinants.

Mathematical Preliminaries

Before we describe the procedure known as Cramer’s Rule, we begin with some mathematical preliminaries. Let us consider a pair of two simultaneous linear equations in two unknowns (x1 and x2). We can write these equations as

a 11 x 1 + a 12 x 2 = b 1 a 11 x 1 + a 12 x 2 = b 1 size 12{a rSub { size 8{"11"} } x rSub { size 8{1} } +a rSub { size 8{"12"} } x rSub { size 8{2} } =b rSub { size 8{1} } } {}
(1)

and

a 21 x 1 + a 22 x x = b 2 a 21 x 1 + a 22 x x = b 2 size 12{a rSub { size 8{"21"} } x rSub { size 8{1} } +a rSub { size 8{"22"} } x rSub { size 8{x} } =b rSub { size 8{2} } } {}
(2)

Here the coefficients a11, a12, a21, and a22 are known constants.

Now, let us solve this system of equations via Gauss elimination. We should recall that the basic idea behind Gauss elimination is to reduce the original set of equations into an equivalent form which is triangular and to use back-substitution once the first unknown is discovered.

We begin by multiplying each side of equation (1) by the value (-a21/a11). This yields an equivalent equation of the form

a 21 x 1 a 21 a 12 a 11 x 2 = a 21 a 11 b 1 a 21 x 1 a 21 a 12 a 11 x 2 = a 21 a 11 b 1 size 12{ - a rSub { size 8{"21"} } x rSub { size 8{1} } - { {a rSub { size 8{"21"} } a rSub { size 8{"12"} } } over {a rSub { size 8{"11"} } } } x rSub { size 8{2} } = - { {a rSub { size 8{"21"} } } over {a rSub { size 8{"11"} } } } b rSub { size 8{1} } } {}
(3)

Next, we add equation (3) to equation (2). In doing so, we note that the term involving x1 is removed. The result of the addition of the two equations is

a 22 a 21 a 12 a 11 x 2 = b 2 a 21 a 11 b 1 a 22 a 21 a 12 a 11 x 2 = b 2 a 21 a 11 b 1 size 12{ left (a rSub { size 8{"22"} } - { {a rSub { size 8{"21"} } a rSub { size 8{"12"} } } over {a rSub { size 8{"11"} } } } right )`x rSub { size 8{2} } =b rSub { size 8{2} } - left ( { {a rSub { size 8{"21"} } } over {a rSub { size 8{"11"} } } } right )`b rSub { size 8{1} } } {}
(4)

The value for the unknown x2 can be easily found using equation (4). The solution is

x 2 = a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 x 2 = a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 size 12{x rSub { size 8{2} } = { {a rSub { size 8{"11"} } `b rSub { size 8{2} } - a rSub { size 8{"21"} } `b rSub { size 8{1} } } over {a rSub { size 8{"11"} } a rSub { size 8{"22"} } - a rSub { size 8{"12"} } a rSub { size 8{"21"} } } } } {}
(5)

This result can be substituted back into equation (1) to produce an equation that can be solved for the unknown x1.

a 11 x 1 + a 12 a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 = b 1 a 11 x 1 + a 12 a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 = b 1 size 12{a rSub { size 8{"11"} } `x rSub { size 8{1} } +a rSub { size 8{"12"} } left ( { {a rSub { size 8{"11"} } `b rSub { size 8{2} } - a rSub { size 8{"21"} } `b rSub { size 8{1} } } over {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } } right )`=b rSub { size 8{1} } } {}
(6)

The solution for the unknown, x1, proceeds as follows. The equation ( ) tells us

a 11 x 1 = b 1 a 12 a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 a 11 x 1 = b 1 a 12 a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21 size 12{a rSub { size 8{"11"} } x rSub { size 8{1} } =b rSub { size 8{1} } - a rSub { size 8{"12"} } left ( { {a rSub { size 8{"11"} } `b rSub { size 8{2} } - a rSub { size 8{"21"} } `b rSub { size 8{1} } } over {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } } right )} {}
(7)

which can be expressed as

a 11 x 1 = a 11 a 22 b 1 a 12 a 21 b 1 a 11 a 12 b 2 + a 12 a 21 b 1 a 11 a 22 a 12 a 21 a 11 x 1 = a 11 a 22 b 1 a 12 a 21 b 1 a 11 a 12 b 2 + a 12 a 21 b 1 a 11 a 22 a 12 a 21 size 12{a rSub { size 8{"11"} } `x rSub { size 8{1} } = { {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } `b rSub { size 8{1} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } `b rSub { size 8{1} } - a rSub { size 8{"11"} } `a rSub { size 8{"12"} } `b rSub { size 8{2} } +a rSub { size 8{"12"} } `a rSub { size 8{"21"} } `b rSub { size 8{1} } } over {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } } } {}
(8)

This can be reduced to the following equation

a 11 x 1 = a 11 a 22 b 1 a 11 a 12 b 2 a 11 a 22 a 12 a 21 a 11 x 1 = a 11 a 22 b 1 a 11 a 12 b 2 a 11 a 22 a 12 a 21 size 12{a rSub { size 8{"11"} } `x rSub { size 8{1} } = { {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } `b rSub { size 8{1} } - a rSub { size 8{"11"} } `a rSub { size 8{"12"} } `b rSub { size 8{2} } } over {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } } } {}
(9)

Dividing through by the constant a11 yields an expression for x1.

x 1 = a 22 b 1 a 12 b 2 a 11 a 22 a 12 a 21 x 1 = a 22 b 1 a 12 b 2 a 11 a 22 a 12 a 21 size 12{x rSub { size 8{1} } = { {a rSub { size 8{"22"} } `b rSub { size 8{1} } - a rSub { size 8{"12"} } `b rSub { size 8{2} } } over {a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } } } {}
(10)

Equations (5) and (10) provide us the solution for the variables in terms of the set of constants associated with the original equations. Examination of equations (5) and (10) reveals that the solution for each variable includes the common term

Δ = a 11 a 22 a 12 a 21 Δ = a 11 a 22 a 12 a 21 size 12{Δ=a rSub { size 8{"11"} } `a rSub { size 8{"22"} } - a rSub { size 8{"12"} } `a rSub { size 8{"21"} } } {}
(11)

Suppose we write our original equations in matrix-vector form as follows

A x 1 x 2 = b 1 b 2 A x 1 x 2 = b 1 b 2 size 12{A` left [ matrix { x rSub { size 8{1} } {} ## x rSub { size 8{2} } } right ]= left [ matrix { b rSub { size 8{1} } {} ## b rSub { size 8{2} } } right ]} {}
(12)

where we define the coefficient matrix as

A = a 1,1 a 1,2 a 2,1 a 2,2 A = a 1,1 a 1,2 a 2,1 a 2,2 size 12{A= left [ matrix { a rSub { size 8{1,1} } {} # a rSub { size 8{1,2} } {} ## a rSub { size 8{2,1} } {} # a rSub { size 8{2,2} } {} } right ]} {}
(13)

Clearly, we see that the term Δ is equal to the determinant of the coefficient matrix

Δ = det ( A ) = A Δ = det ( A ) = A size 12{Δ="det"` \( A \) = lline A rline } {}
(14)

Next let us consider the numerator for the solution of the unknown x1 as expressed in equation (10). We recognize that it, too, can be expressed by means of a determinant as is shown below

x 1 = a 2,2 b 1 a 1,2 b 2 = det b 1 a 1,2 b 2 a 2,2 x 1 = a 2,2 b 1 a 1,2 b 2 = det b 1 a 1,2 b 2 a 2,2 size 12{x rSub { size 8{1} } =a rSub { size 8{2,2} } `b rSub { size 8{1} } - a rSub { size 8{1,2} } `b rSub { size 8{2} } ="det" left [ matrix { b rSub { size 8{1} } {} # a rSub { size 8{1,2} } {} ## b rSub { size 8{2} } {} # a rSub { size 8{2,2} } {} } right ]} {}
(15)

We note that the matrix in the equation can be obtained by merely replacing the first column of the original coefficient matrix with the vector

B = b 1 b 2 B = b 1 b 2 size 12{B= left [ matrix { b rSub { size 8{1} } {} ## b rSub { size 8{2} } } right ]} {}
(16)

So the solution for the unknown x1 can be written as a ratio of determinants

x 1 = det b 1 a 1,2 b 2 a 2,2 Δ x 1 = det b 1 a 1,2 b 2 a 2,2 Δ size 12{x rSub { size 8{1} } = { {"det" left [ matrix { b rSub { size 8{1} } {} # a rSub { size 8{1,2} } {} ## b rSub { size 8{2} } {} # a rSub { size 8{2,2} } {} } right ]} over {Δ} } } {}
(17)

Before we solve for the variable x2, we replace the second column of the original coefficient matrix with the vector B. With this replacement accomplished, we may write the solution for the unknown x2 as a ratio of determinants

x 2 = det a 1,1 b 1 a 2,1 b 2 Δ x 2 = det a 1,1 b 1 a 2,1 b 2 Δ size 12{x rSub { size 8{2} } = { {"det" left [ matrix { a rSub { size 8{1,1} } {} # b rSub { size 8{1} } {} ## a rSub { size 8{2,1} } {} # b rSub { size 8{2} } {} } right ]} over {Δ} } } {}
(18)

In the following section, we will outline a procedure that can be used to solve simultaneous linear equations based upon determinants which is called solution via Cramer’s Rule.

Solution via Cramer’s Rule

It is important that one begin by writing the set of simultaneous equations in normal form. That is, the equations should be written as

a 11 x 1 + a 12 x 2 = b 1 a 11 x 1 + a 12 x 2 = b 1 size 12{a rSub { size 8{"11"} } x rSub { size 8{1} } +a rSub { size 8{"12"} } x rSub { size 8{2} } =b rSub { size 8{1} } } {}
(19)
a 21 x 1 + a 22 x x = b 2 a 21 x 1 + a 22 x x = b 2 size 12{a rSub { size 8{"21"} } x rSub { size 8{1} } +a rSub { size 8{"22"} } x rSub { size 8{x} } =b rSub { size 8{2} } } {}
(20)

Next, we form the coefficient matrix

A = a 1,1 a 1,2 a 2,1 a 2, s A = a 1,1 a 1,2 a 2,1 a 2, s size 12{A= left [ matrix { a rSub { size 8{1,1} } {} # a rSub { size 8{1,2} } {} ## a rSub { size 8{2,1} } {} # a rSub { size 8{2,s} } {} } right ]} {}
(21)

At this point, we can solve for the value of Δ by taking the determinant of A.

In anticipation of solving for the unknown x1, we replace the first column of A with the elements contained in the column vector

B = b 1 b 2 B = b 1 b 2 size 12{B= left [ matrix { b rSub { size 8{1} } {} ## b rSub { size 8{2} } } right ]} {}
(22)

Once this is accomplished we can express the solution for x1 as the ratio

x 1 = det b 1 a 1,2 b 2 a 2,2 Δ x 1 = det b 1 a 1,2 b 2 a 2,2 Δ size 12{x rSub { size 8{1} } = { {"det" left [ matrix { b rSub { size 8{1} } {} # a rSub { size 8{1,2} } {} ## b rSub { size 8{2} } {} # a rSub { size 8{2,2} } {} } right ]} over {Δ} } } {}
(23)

To obtain the solution for the unknown x2, we return to the original coefficient matrix A. This time, we replace the second column of A with the column vector B. Now, we can solve for x2 as a ratio

x 2 = det a 1,1 b 1 a 2,1 b 2 Δ x 2 = det a 1,1 b 1 a 2,1 b 2 Δ size 12{x rSub { size 8{2} } = { {"det" left [ matrix { a rSub { size 8{1,1} } {} # b rSub { size 8{1} } {} ## a rSub { size 8{2,1} } {} # b rSub { size 8{2} } {} } right ]} over {Δ} } } {}
(24)

This constitutes the procedure for solving a system of two linear equations in two unknowns via Cramer’s Rule.

Example: Mesh Current Analysis

Mesh current analysis is one of the techniques that are often employed to analyze an electric circuit that contains more than one mesh or loop. Figure 1 provides an example of an electric circuit containing two meshs.

Figure 1: Electric circuit with two independent mesh currents.
Figure 1 (graphics1.png)

The mesh currents are identified as I1 and I2. The set of equations that govern the behavior of the circuit in terms of the mesh currents are

( R 1 + R 3 ) I 1 + R 3 I 1 = V 1 ( R 1 + R 3 ) I 1 + R 3 I 1 = V 1 size 12{ \( R rSub { size 8{1} } +R rSub { size 8{3} } \) `I rSub { size 8{1} } +R rSub { size 8{3} } `I rSub { size 8{1} } =V rSub { size 8{1} } } {}
(25)
R 3 I 1 + ( R 2 + R 3 ) = V 2 R 3 I 1 + ( R 2 + R 3 ) = V 2 size 12{R rSub { size 8{3} } `I rSub { size 8{1} } + \( R rSub { size 8{2} } +R rSub { size 8{3} } \) =V rSub { size 8{2} } } {}
(26)

Suppose that the values for R1, R2 and R3 are 2 Ω, 3Ω, and 1 Ω respectively. Also, suppose that values for V1 and V2 are 6 V and 9 V. With these values defined, the set of equations can be written as

3 I 1 + I 2 = 6 3 I 1 + I 2 = 6 size 12{3`I rSub { size 8{1} } +I rSub { size 8{2} } =6} {}
(27)

and

I 1 + 4 I 2 = 9 I 1 + 4 I 2 = 9 size 12{I rSub { size 8{1} } +4`I rSub { size 8{2} } =9} {}
(28)

We can use Cramer’s Rule to find the mesh currents. We begin by finding the value for Δ

Δ = det 3 1 1 4 = 12 1 = 11 Δ = det 3 1 1 4 = 12 1 = 11 size 12{Δ="det" left [ matrix { 3 {} # 1 {} ## 1 {} # 4{} } right ]="12" - 1="11"} {}
(29)

Next, we find the value for I1.

I 1 = det 6 1 9 4 Δ = 24 9 11 = 1 . 364 A I 1 = det 6 1 9 4 Δ = 24 9 11 = 1 . 364 A size 12{I rSub { size 8{1} } = { {"det" left [ matrix { 6 {} # 1 {} ## 9 {} # 4{} } right ]} over {Δ} } = { {"24" - 9} over {"11"} } =1 "." "364"`A} {}
(30)

By a similar approach, we solve for I2.

I 2 = det 3 6 1 9 Δ = 27 6 11 = 1 . 909 A I 2 = det 3 6 1 9 Δ = 27 6 11 = 1 . 909 A size 12{I rSub { size 8{2} } = { {"det" left [ matrix { 3 {} # 6 {} ## 1 {} # 9{} } right ]} over {Δ} } = { {"27" - 6} over {"11"} } =1 "." "909"`A} {}
(31)

Summary

This module has presented Cramer’s Rule as a technique for solving simultaneous linear equations. The discussion in this module was limited to systems involving two simultaneous equations. This limitation was deliberate in that Cramer’s Rule is typically not applied for linear systems comprised of large numbers of equations. An application involving the mesh analysis of an electric circuit was provided.

Exercises

  1. Consider the two mesh circuit depicted in Figure 1. Assume the following values for the resistors in the circuit: R1=10Ω,R2=20Ω,R3=50ΩR1=10Ω,R2=20Ω,R3=50Ω size 12{R rSub { size 8{1} } ="10"` %OMEGA ,`R rSub { size 8{2} } ="20"` %OMEGA ,`R rSub { size 8{3} } ="50"` %OMEGA } {}. Let V1=24VV1=24V size 12{V rSub { size 8{1} } ="24"`V} {}and V2=6VV2=6V size 12{V rSub { size 8{2} } =6`V} {}. Find the two mesh currents through the use of Cramer’s Rule.
  2. A civil engineering firm plans to sign a contract with a customer. The contract calls for the construction of two office buildings which are denoted as Building X and Building Y. According to estimates derived in the preliminary design phase, the firm knows that the total cost of the project will be $50.000,000. It is also known that Building X will cost $5,000,000 more to construct than Building Y. Use Cramer’s Rule to find the cost of each building.
  3. Two types of pumps provide input into a municipal reservoir. Let us refer to the two types of pumps as A and B. If 4 type A and 2 type B pumps operate at maximum flow, the input to the reservoir is 1,200 gallons/min. If 3 type A and 5 type B pumps operate at maximum flow, the input to the reservoir is 1,600 gallons/min. Find the flow rates for type A and type B pumps using Cramer’s Rule.
  4. The combined cost of 12 microprocessors and 36 random access memory chips is $7,200. The combined cost of 8 microprocessors and 42 random access memory chips is $6,600. Find the cost of each microprocessor chip and each random access memory chip using Cramer’s Rule.
  5. The design of an electronic thermometer is based in part upon the incorporation of a component known as a thermistor. A thermistor has the property that its resistance varies linearly as a function of temperature. This linear relationship is R=R0+mTR=R0+mT size 12{R=R rSub { size 8{0} } +m`T} {}. The term (R0) represents the value of the resistance at 00 C. At a temperature T = 250 C, the resistance of the thermistor (R) is 100 Ω. A a temperature of 550 C, the resistance of the thermistor is 104 Ω. Use Cramer’s Rule to find the values for R0 and m.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks