2.2. Solving systems of linear equations using the inverse matrix#
If we have a system of linear equations of the form \(A\vec{x}=\vec{b}\) where \(A\) is a non-singular (invertible) square matrix then use of matrix algebra shows that
Theorem 2.1 (Solution of a linear system of equations using the inverse matrix)
The solution to a system of linear equations \(A\vec{x} = \vec{b}\) can be calculated using \(\vec{x} = A^{-1}\vec{b}\).
Consider the system of linear equations from the previous section
The coefficient matrix and constant vector are
and the inverse of this coefficient matrix can be easily calculated using the adjoint-determinant formula to give
Using \(\vec{x} = A^{-1}\vec{b}\) the solution is
so \(x_1 = 1\) and \(x_2 = 2\) (which we saw when we used algebra to solve this system). We can check whether this is the correct solution by substituting \(\vec{x}\) into \(A\vec{x} = \vec{b}\)
Example 2.1
Solve the following systems of linear equations using the inverse of the coefficient matrix:
(i) \(\begin{array}{rl} x_1 - 2x_2 \!\!\!\! &= 11, \\ 2x_1 + 4x_2 \!\!\!\! &= -18. \end{array}\)
Solution (click to show)
Here \(A = \begin{pmatrix} 1 & -2 \\ 2 & 4 \end{pmatrix}\) and \(\vec{b} = \begin{pmatrix} 11 \\ -18 \end{pmatrix}\). Calculating \(A^{-1}\)
So the solution is
Checking the solution
(ii) \(\begin{array}{rl} x_1 - 2x_2 + 3x_3 \!\!\!\! &= -7, \\ 2x_2 - 4x_3 \!\!\!\! &= 8, \\ 3x_1 + x_2 - 4x_3 \!\!\!\! &= 7. \end{array}\)
Solution (click to show)
Here \(A = \begin{pmatrix} 1 & -2 & 3 \\ 0 & 2 & -4 \\ 3 & 1 & -4 \end{pmatrix}\) and \(\vec{b} = \begin{pmatrix}-7 \\ 8 \\ 7 \end{pmatrix}\). Calculating \(A^{-1}\)
So the solution is
Checking the solution