# Solving a system of linear equations without using inverses

$$\left( \begin{array}{ccc} 13 & 9.1 & 8.19 & 8.281 & 8.9271\\ 9.1 & 8.19 & 8.281 & 8.9271 & 10.02001\\ 8.19 & 8.281 & 8.9271 & 10.02001 & 11.562759\\ 8.281 & 8.9271 & 10.02001 & 11.562759 & 13.6147921\\ 8.9271 & 10.02001 & 11.562759 & 13.6147921 & 16.27802631\end{array} \right) \left( \begin{array}{ccc} a_0 \\ a_1\\ a_2\\ a_3 \\ a_4\end{array} \right) = \left( \begin{array}{ccc} -14.764 \\ -8.8872\\ -7.37422\\ -7.139688 \\ -7.5086662\end{array} \right)$$

Is there a way to determine $a_0,a_1,a_2,a_3$ and $a_4$ without finding the inverse of any matrix? Solutions do not have to be step by step, and can include entering the two matrices above into some software.

• Why not just use Gaussian elimination? – Rodrigo de Azevedo Aug 1 '16 at 11:49
• How would I do that for the above equation? Could you explain a way to do it on excel or similar software? (I apologize if I am misunderstanding an obvious method) – StopReadingThisUsername Aug 1 '16 at 11:55
• It would be difficult in Excel as you have to figure out the RREF, for example: pblpathways.com/projects/common/rref_ex.pdf. The solution (many more digits possible) using RREF is $\left( \begin{array}{c} -1.63436 \\ -0.55361 \\ 4.37767 \\ -4.29578 \\ 1.25917 \\ \end{array} \right)$. You can try using gnu.org/software/octave/doc/v4.0.1/Basic-Matrix-Functions.html (rref) or SAGE or SymPy. – Moo Aug 1 '16 at 12:12
• @Arjun: You could also try a calculator that shows the RREF steps - like matrix.reshish.com/gaussSolution.php – Moo Aug 1 '16 at 12:17

We form the augmented matrix

$$\left[ \begin{array}{ccccc|c} 13 & 9.1 & 8.19 & 8.281 & 8.9271 & -14.764\\ 9.1 & 8.19 & 8.281 & 8.9271 & 10.02001 & -8.8872\\ 8.19 & 8.281 & 8.9271 & 10.02001 & 11.562759 & -7.37422\\ 8.281 & 8.9271 & 10.02001 & 11.562759 & 13.6147921 & -7.139688\\ 8.9271 & 10.02001 & 11.562759 & 13.6147921 & 16.27802631 & -7.5086662 \end{array}\right]$$

In SymPy, we use Gauss-Jordan elimination to compute the RREF of the augmented matrix

>>> M = Matrix([[13, 9.1, 8.19, 8.281, 8.9271, -14.764], [9.1, 8.19, 8.281, 8.9271, 10.02001, -8.8872], [8.19, 8.281, 8.9271, 10.02001, 11.562759, -7.37422], [8.281, 8.9271, 10.02001, 11.562759, 13.6147921, -7.139688], [8.9271, 10.02001, 11.562759, 13.6147921, 16.27802631, -7.5086662]])
>>> M
[  13      9.1       8.19       8.281       8.9271      -14.764  ]
[                                                                ]
[ 9.1      8.19      8.281      8.9271     10.02001     -8.8872  ]
[                                                                ]
[ 8.19    8.281     8.9271     10.02001    11.562759    -7.37422 ]
[                                                                ]
[8.281    8.9271   10.02001   11.562759   13.6147921   -7.139688 ]
[                                                                ]
[8.9271  10.02001  11.562759  13.6147921  16.27802631  -7.5086662]
>>> M.rref()
([1   0    0    0    0   -1.63435664335635 ], [0, 1, 2, 3, 4])
[                                         ]
[0  1.0   0    0    0   -0.553610482657395]
[                                         ]
[0   0   1.0   0    0    4.37766951186814 ]
[                                         ]
[0   0    0   1.0   0   -4.29578020019945 ]
[                                         ]
[0   0    0    0   1.0   1.25916975181933 ]

• The first two commands work great. Upon entering the third command, the following statement pops up: "boundmethodMutableDenseMatrix.rrefofMatrix[]," with the matrix M pasted within the square brackets. What can I do to get the result you got? – StopReadingThisUsername Aug 1 '16 at 12:32