Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Solving simultaneous equations using the inverse matrix

Introduction

8.2

The power of matrix algebra is seen in the representation of a system of simultaneous linear equations as a matrix equation. Matrix algebra allows us to write the solution of the system using the inverse matrix of the coecients. In practice the method is suitable only for small systems. Its main use is the theoretical insight into such problems which it provides.

be familiar with the basic rules of matrix algebra

Prerequisites
Before starting this Block you should . . .

be able to evaluate 2 2 and 3 3 determinants be able to nd the inverse of 2 2 and 3 3 matrices

Learning Outcomes
After completing this Block you should be able to . . .

Learning Style

 use the inverse matrix of coecients to To achieve what is expected of you . . . solve a system of two linear simultaneous equations  allocate sucient study time  use the inverse matrix of coecients to solve a system of three linear simultaneous equations  briey revise the prerequisite material  Recognise and identify cases where there is no unique solution  attempt every guided exercise and most of the other exercises

1. Using the inverse matrix on a system of two equations


If we have one linear equation ax = b in which the unknown is x and a and b are constants then there are just three possibilities a = 0 then x =
b a

a1 b. The equation ax = b has a unique solution for x.

a = 0, b = 0 then the equation ax = b becomes 0 = 0 and any value of x will do. There are innitely many solutions to the equation ax = b. a = 0 and b = 0 then ax = b becomes 0 = b which is a contradiction. In this case the equation ax = b has no solution for x. What happens if we have more than one equation and more than one unknown? In this block we copy the algebraic solution x = a1 b used for a single equation to solve a system of linear equations. As we shall see, this will be a very natural way of solving the system if it is rst written in matrix form. Consider the system 2x1 + 3x2 = 5 x1 2x2 = 1. In matrix form this becomes 2 3 1 2 x1 x2 = 5 1 which is of the form AX = B.

If A1 exists then the solution is X = A1 B. Try each part of this exercise Part (a) Given the matrix A = A 1 ? 2 3 1 2 nd its determinant. What does this tell you about (compare the solution x = a1 b above)

Answer Part (b) Now nd A1 Answer To solve the system AX = B we use X = A1 B Now do this exercise Solve the system AX = B where A = (i) 5 1 (ii) 1 4 (iii) 2 3 1 2 0 . 0 Answer
Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

and B is

2. Non-unique solutions
The key to obtaining a unique solution of the system AX = B is to nd A1 . What happens when A1 does not exist? Consider the system 2x1 + 3x2 = 5 4x2 + 6x2 = 10. In matrix form this becomes 2 3 4 6 x1 x2 5 10 (i) (ii)

Now do this exercise Identify the matrix A and hence nd A1 . Answer Looking at the original system we see that equation (ii) is simply equation (i) with all coecients doubled. In eect we have only one equation for the two unknowns x1 and x2 . The equations are consistent but have innitely many solutions. If we let x2 assume a particular value, t say, then x1 must take the value x1 = 1 (5 3t) i.e. 2 the solution to the given equations is: 1 x2 = t, x1 = (5 3t) 2 For each value of t there are values for x1 and x2 which satisfy the original system of equations. For example, if t = 1, then x2 = 1, x1 = 1, if t = 3 then x2 = 3, x1 = 7 and so on. Now consider the system 2x1 + 3x2 = 5 4x1 + 6x2 = 9 (i) (ii)

Since the left-hand sides are the same as those in the previous system then A is the same and again A1 does not exist. There is no unique solution to the equations (i) and (ii). However, if we double equation (i) we obtain 4x1 + 6x2 = 10, which conicts with equation (ii). There are thus no solutions to (i) and (ii) and the equations are said to be inconsistent. Try each part of this exercise What can you conclude about the solutions of the systems (i) x1 2x2 = 1 3x1 6x2 = 3 (ii) 3x1 + 2x2 = 7 6x1 4x2 = 5

Part (a) First write the systems in matrix form and nd |A|. Answer 3
Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

Part (b) Now compare the equations in each system. Answer

3. Three equations in three unknowns


It is much more tedious to use the inverse matrix to solve a system of three equations although in principle, the method is the same as for two equations. Consider the system x1 2x2 + x3 = 3 2x1 + x2 x3 = 5 3x1 x2 + 2x3 = 12. We met this system in Block 8.1 where we found that |A| = 10. Hence A1 exists. Try each part of this exercise Find A1 by the method of determinants. Part (a) First form the matrix where each element of A is replaced by its minor. Answer Part (b) Now use the 3 3 array of signs to obtain the matrix of cofactors. Answer Part (c) Now transpose this matrix and divide by |A| to obtain A1 . Answer Part (d) Now use X = A1 B to solve the system of linear equations. Answer Comparing this approach to the use of Cramers rule for three equations in section 2 of Block 8.1 we can say that the two methods are both rather tedious.

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

Equations with no unique solution


If |A| = 0, A1 does not exist and therefore, early on, it is easy to see that the system of equations has no unique solution. But it is not obvious whether this is because the equations are inconsistent or whether they have innitely many solutions. Try each part of this exercise Consider the systems (i) x1 x2 + x3 = 4 2x1 + 3x2 2x3 = 3 3x1 + 2x2 x3 = 7 (ii) x1 x2 + x3 = 4 2x1 + 3x2 2x3 = 3 x1 11x2 + 9x3 = 13

Part (a) In system (i) add the rst equation to the second. What does this tell you about the system? Answer Part (b) In system (ii) take the combination 5 times the rst equation minus 2 times the second equation. What does this tell you about the system? Answer In practice, systems containing three or more linear equations are best solved by the method which we shall introduce in Block 8.3. More exercises for you to try 1. Solve the following using the inverse matrix approach: 2x 3y = 1 4x + 4y = 2 2x 5y = 2 4x + 10y = 1 6x y = 0 2x 4y = 1

(a)

(b)

(c)

2. Solve the following equations using matrix methods: 2x1 + x2 x3 = 0 x1 + x3 = 4 x1 + x2 + x3 = 0 x1 x2 + x3 = 1 x1 + x3 = 1 x1 + x2 x3 = 0 Answer

(a)

(b)

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

4. Computer Exercise or Activity

For this exercise it will be necessary for you to access the computer package DERIVE.

Derive is capable of doing matrix algebra and can be used to obtain matrix inverses, and so can be used to solve systems of linear equations using the inverse matrix approach. For example to solve: x1 2x2 + x3 = 3 2x1 + x2 x3 = 5 3x1 x2 + 2x3 = 12. we would key in the coecient matrix A and the matrix of constants B on the right-hand-sides. If these are labelled as A and B so that DERIVE responds: 1 2 1 1 1 a := 2 3 1 2 3 b := 5 12 Now key Author:Expression a (1)b. DERIVE responds with a 1 b Now hit Simplify:Basic and DERIVE responds with: 3 1 2 which are the required solutions. It will be a useful exercise to solve the problems in this block using the matrix facilities of DERIVE.

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

End of Block 8.2

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

|A| = 2 (2) 1 3 = 7 since |A| = 0 then A1 exists. Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

A1 =

1 (7)

2 3 1 2

1 7

2 3 1 2

Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

(i) X = (ii) X =

1 7 1 7 1 7

2 3 1 2 2 3 1 2 2 3 1 2

5 1 1 4 0 0

= = =
1 7

1 7

7 7 14 7 0 0

= = =

1 . Hence x1 = 1, x2 = 1. 1 2 . Hence x1 = 2, x2 = 1. 1 0 0 . Hence x1 = 0, x2 = 0, as might have been

(iii) X = expected.

1 7

Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

10

A=

2 3 4 6

and |A| = 2 6 4 3 = 0. Hence A1 does not exist.

Back to the theory

11

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

(i) (ii)

1 2 3 6 3 2 6 4

x1 x2 x1 x2

= =

1 3 7 5

|A| = 6 + 6 = 0; |A| = 12 + 12 = 0.

Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

12

(i) The second equation is 3 times the rst equation. There are innitely many solutions of the form x2 = t, x1 = 1 + 2t where t is arbitrary. (ii) If we multiply the rst equation by (2) we obtain 6x1 4x2 = 14 which is in conict with the second equation. The equations are inconsistent and have no solution. Back to the theory

13

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

1 1 1 2 2 1 1 2 2 1 1 1

2 1 3 2 1 1 3 2 1 1 2 1

2 1 3 1 1 2 3 1 1 2 2 1

1 7 5 = 3 1 5 . 1 3 5

Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

14

1 7 5 + + The array of signs is + so that we obtain 3 1 5 . 1 3 5 + + Back to the theory

15

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

1 3 1 Transposing gives 7 1 3 . Finally, A1 = 5 5 5 Back to the theory

1 3 1 1 7 1 3 . 10 5 5 5

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

16

3 1 3 1 1 7 1 3 5 = X = 10 12 5 5 5 Back to the theory

3 30 1 10 = 1 Then x1 = 3, x2 = 1, x3 = 2. 10 2 20

17

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

The sum is 3x1 + 2x2 x3 = 7, which is identical to the third equation. Thus, essentially, there are only two equations x1 x2 + x3 = 4 and 3x1 + 2x2 x3 = 7. Now adding these two gives 4x1 + x2 = 11 or x2 = 11 4x1 and then x3 = 4 x1 + x2 = 4 x1 + 11 4x1 = 15 5x1 Hence if we give x1 a value, t say, then x2 = 11 4t and x3 = 15 5t. Thus there are an innite number of solutions (one for each value of t). Back to the theory

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

18

The combination is x1 11x2 + 9x3 = 14, which conicts with the third equation. There are thus no solutions. Back to the theory

19

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

1. (a) x = 1 , y=0 2

(b) A1 does not exist.


4 3

1 3 (c) x = 22 , y = 11

2. (a) x1 = 8 , x2 = 4, x3 = 3 Back to the theory

(b) x1 = 1 , x2 = 1 , x3 = 1 2 2

Engineering Mathematics: Open Learning Unit Level 1 8.2: Solving simultaneous Linear equations

20

You might also like