1 Solving two equations in two unknowns

If we have one linear equation

a x = b

in which the unknown is x and a and b are constants then there are just three possibilities:

What happens if we have more than one equation and more than one unknown? We shall find that the solutions to such systems can be characterised in a manner similar to that occurring for a single equation; that is, a system may have a unique solution, an infinity of solutions or no solution at all.

In this Section we examine a method, known as Cramer’s rule and employing determinants, for solving systems of linear equations.

Consider the equations

a x + b y = e (1)

c x + d y = f (2)

where a , b , c , d , e , f are given numbers. The variables x and y are unknowns we wish to find. The pairs of values of x and y which simultaneously satisfy both equations are called solutions. Simple algebra will eliminate the variable y between these equations. We multiply equation (1) by d , equation (2) by b and subtract:

first, ( 1 ) × d a d x + b d y = e d

then , ( 2 ) × b b c x + b d y = b f

(we multiplied in this way to make the coefficients of y equal.)

Now subtract to obtain

( a d b c ) x = e d b f (3)

Task!

Starting with equations (1) and (2) above, eliminate x .

Multiply equation (1) by c and equation (2) by a to obtain

a c x + b c y = e c and a c x + a d y = a f .

Now subtract to obtain

( b c a d ) y = e c a f

If we multiply this last equation in the Task above by 1 we obtain

( a d b c ) y = a f e c (4)

Dividing equations (3) and (4) by a d b c we obtain the solutions

x = e d b f a d b c , y = a f e c a d b c (5)

There is of course one proviso: if a d b c = 0 then neither x nor y has a defined value.

If we choose to express these solutions in terms of determinants we have the formulation for the solution of simultaneous equations known as Cramer’s rule .

If we define Δ as the determinant a b c d and provided Δ 0 then the unique solution of the equations

a x + b y = e

c x + d y = f

is by (5) given by

x = Δ x Δ , y = Δ y Δ where Δ x = e b f d , Δ y = a e c f

Now Δ is the determinant of coefficients on the left-hand sides of the equations. In the expression Δ x the coefficients of x (i.e. a c which is column 1 of Δ ) are replaced by the terms on the right-hand sides of the equations (i.e. by e f ). Similarly in Δ y the coefficients of y (column 2 of Δ ) are replaced by the terms on the right-hand sides of the equations.

Key Point 1

Cramer’s Rule for Two Equations

The unique solution to the equations:

a x + b y = e
c x + d y = f
is given by:
x = Δ x Δ , y = Δ y Δ
in which
Δ = a b c d Δ x = e b f d , Δ y = a e c f

If Δ = 0 this method of solution cannot be used.

Task!

Use Cramer’s rule to solve the simultaneous equations

2 x + y = 7 3 x 4 y = 5

Calculating Δ = 2 1 3 4 = 11 . Since Δ 0 we can proceed with Cramer’s solution.

Δ = 2 1 3 4 = 11 x = 1 Δ 7 1 5 4 , y = 1 Δ 2 7 3 5

i.e. x = ( 28 5 ) ( 11 ) , y = ( 10 21 ) ( 11 ) implying: x = 33 11 = 3 , y = 11 11 = 1.

You can check by direct substitution that these are the exact solutions to the equations.

Task!

Use Cramer’s rule to solve the equations

(a) 2 x 3 y = 6 4 x 6 y = 12 (b) 2 x 3 y = 6 4 x 6 y = 10

You should have checked 2 3 4 6 first, since

2 3 4 6 = 12 ( 12 ) = 0 . Hence there is no unique solution in either case.

In the system

  1. the second equation is twice the first so there are infinitely many solutions. (Here we can give y any value we wish, t say; but then the x value is always ( 6 + 3 t ) 2 . So for each value of t there are values for x and y which simultaneously satisfy both equations. There is an infinite number of possible solutions). In
  2. the equations are inconsistent (since the first is 2 x 3 y = 6 and the second is 2 x 3 y = 5 which is not possible). Hence there are no solutions.

Notation

For ease of generalisation to larger systems we write the two-equation system in a different notation:

a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2

Here the unknowns are x 1 and x 2 , the right-hand sides are b 1 and b 2 and the coefficients are a i j where, for example, a 21 is the coefficient of x 1 in equation two. In general, a i j is the coefficient of x j in equation i .

Cramer’s rule can then be stated as follows:

If a 11 a 12 a 21 a 22 0 , then the equations

a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2

have solution

x 1 = b 1 a 12 b 2 a 22 a 11 a 12 a 21 a 22 , x 2 = a 11 b 1 a 21 b 2 a 11 a 12 a 21 a 22 .