# Solve the system of linear equations x_1 + 3x_2 + 2x_3 = 2 3x_1 - 5x_2 - 3x_3 = 2 x_1 + x_2 +...

## Question:

Solve the system of linear equations

{eq}\left\{\begin{matrix} x_1 + 3x_2 + 2x_3 = 2\\ 3x_1 - 5x_2 - 3x_3 = 2\\ x_1 + x_2 + 7x_3 = 14 \end{matrix}\right. {/eq}

by

(a) Inverse Matrix method.

(b) Cramer's rule.

## System of Equations:

Let us assume that we have a {eq}3\times 3 {/eq} system of equations. To find the solution of the system of equations by Cramer's Rule we find the determinant {eq}D, {/eq} by using the the coefficients {eq}x,y {/eq} and {eq}z {/eq} values from the problem. Find the determinant {eq}D_{x}, {/eq} by replacing the {eq}x {/eq}-values in the first column leaving the {eq}y {/eq} and {eq}z {/eq} columns unchanged. Similarly we find the values of {eq}D_{y} {/eq} and {eq}D_{z}. {/eq} Then the solution of the system of equations by Cramer's Rule is as follows

{eq}\displaystyle x=\frac{D_{x}}{D}\\ \displaystyle y=\frac{D_{y}}{D}\\ \displaystyle z=\frac{D_{z}}{D} {/eq}

Consider the system of equations

{eq}\displaystyle x_1 + 3x_2 + 2x_3 = 2\\ \displaystyle 3x_1 - 5x_2 - 3x_3 = 2\\ \displaystyle x_1 + x_2 + 7x_3 = 14 {/eq}

Rewrite the system of equations in matrix form {eq}\displaystyle AX=b {/eq}

{eq}\displaystyle \begin{bmatrix} 1&3 &2\\ 3&-5&-3\\ 1&1 &7 \end{bmatrix} \begin{bmatrix} x_1 \\x_2\\x_3 \end{bmatrix}=\begin{bmatrix}2\\2 \\ 14 \end{bmatrix} {/eq}

To find the inverse matrix of the coefficient matrix we apply the elementary row operations to the augmented matrix {eq}\displaystyle \left [ A:I \right ],{/eq} where I is the 3\times 3 identity matrix.

Augment with a {eq}\displaystyle 3\times 3{/eq} identity matrix

{eq}\displaystyle \left [ A:I \right ]=\begin{bmatrix}1&3&2&\mid \:&1&0&0\\ 3&-5&-3&\mid \:&0&1&0\\ 1&1&7&\mid \:&0&0&1\end{bmatrix} {/eq}

Convert the matrix to the identity matrix by reducing the matrix to row echelon form

{eq}\displaystyle \:R_1\:\leftrightarrow \:R_2\\ \displaystyle =\begin{bmatrix}3&-5&-3&\mid \:&0&1&0\\ 1&3&2&\mid \:&1&0&0\\ 1&1&7&\mid \:&0&0&1\end{bmatrix}\\ \displaystyle R_2\:\leftarrow \:R_2-\frac{1}{3}\cdot \:R_1\\ \displaystyle R_3\:\leftarrow \:R_3-\frac{1}{3}\cdot \:R_1\\ \displaystyle =\begin{bmatrix}3&-5&-3&\mid \:&0&1&0\\ 0&\frac{14}{3}&3&\mid \:&1&-\frac{1}{3}&0\\ 0&\frac{8}{3}&8&\mid \:&0&-\frac{1}{3}&1\end{bmatrix}\\ \displaystyle R_3\:\leftarrow \:R_3-\frac{4}{7}\cdot \:R_2\\ \displaystyle =\begin{bmatrix}3&-5&-3&\mid \:&0&1&0\\ 0&\frac{14}{3}&3&\mid \:&1&-\frac{1}{3}&0\\ 0&0&\frac{44}{7}&\mid \:&-\frac{4}{7}&-\frac{1}{7}&1\end{bmatrix}\\ \displaystyle R_3\:\leftarrow \frac{7}{44}\cdot \:R_3\\ \displaystyle =\begin{bmatrix}3&-5&-3&\mid \:&0&1&0\\ 0&\frac{14}{3}&3&\mid \:&1&-\frac{1}{3}&0\\ 0&0&1&\mid \:&-\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix}\\ \displaystyle R_2\:\leftarrow \:R_2-3\cdot \:R_3\\ \displaystyle R_1\:\leftarrow \:R_1+3\cdot \:R_3\\ \displaystyle =\begin{bmatrix}3&-5&0&\mid \:&-\frac{3}{11}&\frac{41}{44}&\frac{21}{44}\\ 0&\frac{14}{3}&0&\mid \:&\frac{14}{11}&-\frac{35}{132}&-\frac{21}{44}\\ 0&0&1&\mid \:&-\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix}\\ \displaystyle R_2\:\leftarrow \frac{3}{14}\cdot \:R_2\\ \displaystyle R_1\:\leftarrow \:R_1+5\cdot \:R_2\\ \displaystyle =\begin{bmatrix}3&0&0&\mid \:&\frac{12}{11}&\frac{57}{88}&-\frac{3}{88}\\ 0&1&0&\mid \:&\frac{3}{11}&-\frac{5}{88}&-\frac{9}{88}\\ 0&0&1&\mid \:&-\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix}\\ \displaystyle \:R_1\:\leftarrow \frac{1}{3}\cdot \:R_1\\ \displaystyle =\begin{bmatrix}1&0&0&\mid \:&\frac{4}{11}&\frac{19}{88}&-\frac{1}{88}\\ 0&1&0&\mid \:&\frac{3}{11}&-\frac{5}{88}&-\frac{9}{88}\\ 0&0&1&\mid \:&-\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix} {/eq}

Inverse of the matrix is on the right of the augmented matrix

{eq}\displaystyle =\begin{bmatrix}\frac{4}{11}&\frac{19}{88}&-\frac{1}{88}\\ \frac{3}{11}&-\frac{5}{88}&-\frac{9}{88}\\ -\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix} {/eq}

Therefore the solution x of the system is given by

{eq}\displaystyle X=A^{-1}b\\ \displaystyle \begin{bmatrix} x_1 \\x_2\\x_3 \end{bmatrix}=\begin{bmatrix}\frac{4}{11}&\frac{19}{88}&-\frac{1}{88}\\ \frac{3}{11}&-\frac{5}{88}&-\frac{9}{88}\\ -\frac{1}{11}&-\frac{1}{44}&\frac{7}{44}\end{bmatrix}\begin{bmatrix}2\\2 \\ 14 \end{bmatrix}\\ \displaystyle =\begin{bmatrix}\frac{4}{11}\cdot \:2+\frac{19}{88}\cdot \:2+\left(-\frac{1}{88}\right)\cdot \:14\\ \frac{3}{11}\cdot \:2+\left(-\frac{5}{88}\right)\cdot \:2+\left(-\frac{9}{88}\right)\cdot \:14\\ \left(-\frac{1}{11}\right)\cdot \:2+\left(-\frac{1}{44}\right)\cdot \:2+\frac{7}{44}\cdot \:14\end{bmatrix}\\ \displaystyle =\begin{bmatrix}1\\ -1\\ 2\end{bmatrix} {/eq}

Thus, the solution of the system is

{eq}\displaystyle x_1=1,\; x_2=-1,\; x_3=2 {/eq}

(b)

Consider the system of equations

{eq}\displaystyle \begin{bmatrix} 1&3 &2\\ 3&-5&-3\\ 1&1 &7 \end{bmatrix} \begin{bmatrix} x_1 \\x_2\\x_3 \end{bmatrix}=\begin{bmatrix}2\\2 \\ 14 \end{bmatrix} {/eq}

First, find the determinant of the coefficient matrix:

{eq}\displaystyle D=\begin{vmatrix} 1&3 &2\\ 3&-5&-3\\ 1&1 &7 \end{vmatrix}\\ \displaystyle =1(-35+3)-3(21+3)+2(3+5)\\ \displaystyle =1\cdot \left(-32\right)-3\cdot \:24+2\cdot \:8\\ \displaystyle =-32-72+16\\ \displaystyle =-88 {/eq}

{eq}D_{x}:{/eq} coefficient determinant with answer-column values in x-colum

{eq}\displaystyle D_{x}=\begin{vmatrix} 2&3 &2\\ 2&-5&-3\\ 14&1 &7 \end{vmatrix}\\ \displaystyle =2\left(-32\right)-3\cdot \:56+2\cdot \:72\\ \displaystyle =-88 {/eq}

{eq}D_{y}:{/eq} coefficient determinant with answer-column values in y-colum

{eq}\displaystyle D_{y}=\begin{vmatrix} 1&2 &2\\ 3&2&-3\\ 1&14 &7 \end{vmatrix}\\ \displaystyle =1\cdot \:56-2\cdot \:24+2\cdot \:40\\ \displaystyle =88 {/eq}

{eq}D_{z}: {/eq} coefficient determinant with answer-column values in z-colum

{eq}\displaystyle D_{z}=\begin{vmatrix} 1&3 &2\\ 3&-5&2\\ 1&1 &14 \end{vmatrix}\\ \displaystyle =1\cdot \left(-72\right)-3\cdot \:40+2\cdot \:8\\ \displaystyle =-176 {/eq}

Cramer's Rule says that

{eq}\displaystyle x=\frac{D_{x}}{D}=\frac{-88}{-88}=1\\ \displaystyle y=\frac{D_{y}}{D}=\frac{88}{-88}=-1\\ \displaystyle z=\frac{D_{z}}{D}=\frac{-176}{-88}=2 {/eq}