Solve for the unknown variables x_{1} , x_{2} , x_{3} , x_{4} , x_{5} and x_{6} given that
4 x_{1} + x_{2} + 2 x_{3} − 17 x_{4} − 5 x_{5} + 8 x_{6} = 21
8 x_{1} + 9 x_{2} + 23 x_{3} + 15 x_{4} + 11 x_{5} + 39 x_{6} = 593
24 x_{1} + 41 x_{2} + 9 x_{3} + 3 x_{4} + x_{6} = 317
6 x_{1} + 5 x_{2} − x_{4} + 3 x_{5} − 7 x_{6} = 35
9 x_{1} + 11 x_{2} + 39 x_{3} + 23 x_{4} + 15 x_{5} = 678
28 x_{1} + 49 x_{2} + 4 x_{3} + 5 x_{4} + 9 x_{5} + 7 x_{6} = 391
Enter the matrix of coefficients A and the vector of constant values b into Excel, as shown in Table 15.5. In this table the cells (A3:F8) are used for the A matrix and the b column vector is in cells (H3:H8) and so the rest of the instructions below use these cell references.
Create the inverse matrix A^{-1} by highlighting a 6 × 6 block of cells (A10:F15) and type in the formula =MINVERSE(A3:F8) making sure both the Cntrl and Shift keys are held down when this is entered.
To derive the vector of unknowns x by finding the product matrix A^{-1} b, highlight a 6 × 1 column of cells (H10:H15) and then type =MMULT(A10:F15, H3:H8) in the formula bar and hold down the Cntrl and Shift keys when you hit the return key.
The vector of unknown variables should be calculated in the six cells of this column. You can now just read off the solution values x_{1} = 5, x_{2} = 2, x_{3} = 12, x_{4} = 1, x_{5} = 8 and x_{6} = 4.
Note that most numbers in this table have been rounded to 5 dp. However, as this would have rounded some very small numbers down to zero they have been left in the exponent format displayed in Excel. For example the number −1E − 17 is −1 divided by 10^{17} .
Table 15.5
A | B | C | D | E | F | G | H | |
1 | Example 15.17 | |||||||
2 | A MATRIX | b | ||||||
3 | 4 | 1 | 2 | -17 | -5 | 8 | 21 | |
4 | 8 | 9 | 23 | 15 | 11 | 39 | 593 | |
5 | 24 | 41 | 9 | 3 | 0 | 1 | 317 | |
6 | 6 | 5 | 0 | -1 | 3 | -7 | 35 | |
7 | 9 | 11 | 39 | 23 | 15 | 0 | 678 | |
8 | 28 | 49 | 4 | 5 | 9 | 7 | 391 | |
9 | Inverse A^-1 | A^-1*b= | x | |||||
10 | -0.0453 | 0.08783 | 0.11969 | 0.32077 | -0.0634 | -0.1339 | solution | 5 |
11 | 0.02431 | -0.0509 | -0.0504 | -0.1805 | 0.03194 | 0.08268 | values | 2 |
12 | 0.03398 | -0.0162 | -1E-17 | -0.0512 | 0.03343 | -1 E-17 | 12 | |
13 | -0.0723 | 0.03416 | 0.06457 | 0.05788 | -0.0253 | -0.0591 | 1 | |
14 | 0.03184 | -0.0257 | -0.1339 | -0.0156 | 0.0331 | 0.11024 | 8 | |
15 | 0.00247 | 0.02302 | -5E-18 | -0.0118 | -0.0137 | 4.51E-18 | 4 |