STEP 14

SYSTEMS OF LINEAR EQUATIONS 4*

Matrix inversion*

The general system of linear equations in n variables (STEP11, Section 1) can be written in matrix form Ax = b, when a vector x is sought which satisfies this equation. We will now use the inverse matrix A-1 to find this vector.

1. The inverse matrix

In Step 11, we have observed that, if the determinant of A is non-zero, it has an inverse matrix A-1, and the solution of the linear system can be written as x = A-1b, i.e., the solution of the system of linear equations can be obtained by first finding the inverse of the coefficient matrix A, and then forming the product A-1b.

However, as a rule, this approach is not adopted in practice. The problem of finding the inverse matrix is itself a numerical task, which generally requires for its solution many more operations (and therefore involves more round-off and other errors) than any of the methods described in the preceding Steps. However, if the inverse matrix is required for some additional reason, it is sensible to compute the inverse first. For example, the inverse may contain theoretical or statistical information or be of use in some other formula or calculation.

2. Method for inverting a matrix

There are many numerical methods for finding the inverse of a matrix. We shall describe one which uses Gauss elimination and back-substitution procedures. It is simple to apply and is computationally efficient. We shall illustrate the method by application to a 2 x 2 matrix and a 3 x 3 matrix; it should then be clear to the reader, how the method may be extended for use with n x n matrices.

As the 2 x 2 example, consider

and seek the inverse matrix

such that

.

This is equivalent to solving the two systems

Thus:

  1. Form the augmented matrix

  2. Apply elementary row operations to the augmented matrix such that A is transformed into an upper triangular matrix ( Step 11, Section 5):

  3. Solve the two systems:

    using back-substitution. Note how the systems have been constructed, using and columns of . From the first system, 3v1 = -2, 3v1u&127 = -2/3, and 2u1 + v = 1, whence 2u1 = 1 + 2/3, u1 = 5/6. From the second system, 3v2 = 1, v2 = 1/3 and 2u2 + v2 = 0, whence 2u2 = -1/3, u2 = -1/6. Thus the required inverse matrix is:

  4. Check: AA-1 should be equal to I. Multiplication yields:

    so that A-1 is correct.

In this simple example, one can work with fractions, so that no round-off errors occurred and the resulting inverse matrix is exact. In general, during hand calculations, the final result should be checked by computing AA-1, which should be approximately equal to the identity matrix I. As the 3´3 example, consider

In order to demonstrate the effects of errors, compute A-1 to 3S. The results of the calculations in tabular form are:

As an example of back-substitution, taken with the second column of yields the second column of A-1. Thus:

yields w2 = -20.0, v2 = 38.3 and u2 = -34.0, determined in this order. Check by multiplication that AA-1 is

,

which is approximately equal to I. The noticeable inaccuracy is due to carrying out the calculation of the elements of A-1 to 3S only.

3. Solution of linear systems using the inverse matrix

As previously noted, the unique solution of a linear system Ax = b is x = A-1b, provided the coefficient matrix A has an inverse A-1. We shall illustrate this by using the inverse A-1 obtained in Section 2 to compute the solution of the linear system:

The coefficient matrix is

.

We can use A-1, calculated in the preceding section, as follows:

.

Thus, we arrive at the solution x = -13, y = 16 and z = -2.5 to 2S. We check the solution by adding the three equations:

Inserting this solution in the left-hand side yields to 2S:

Checkpoint

  1. In the method for finding the inverse of A, what is the final form of A after the elementary row operations have been carried out?
  2. Is the solution of the system Mx = d, x = dM-1 or x = M-1d (or neither)?
  3. Give a condition for a matrix not to have an inverse.

EXERCISES

1. Find the inverses of the following matrices, using elimination and back-substitution:

1.   2.     3.  

 

2. Solve the systems of equations (each for two right-hand side vectors):

a.

b.

c.

Answers

last next