# How do you solve 5x-y-7z= -13, -3x +8z=22, 9y+z=77 using matrices?

Feb 21, 2016

One way would be to use Cramer's Rule, to get
$\textcolor{w h i t e}{\text{XXX}} \left(x , y , z\right) = \left(6 , 8 , 5\right)$

#### Explanation:

The given equations could be written in matrix form as:
$\left(\begin{matrix}x & y & z & \text{|" & c \\ 5 & -1 & -7 & "|" & -13 \\ -3 & 0 & 8 & "|" & 22 \\ 0 & 9 & 1 & "|} & 77\end{matrix}\right)$
$\textcolor{w h i t e}{\text{XXX}}$actually the top row shouldn't be there, but I though it might make the translation more clear.

Cramer's Rule says that if you take the derivatives:
$\textcolor{w h i t e}{\text{XXX}} D =$ the matrix composed of the variable coefficients (the left side of the above)
$\textcolor{w h i t e}{\text{XXX}} {D}_{x} =$ the matrix composed of the variable coefficients with the $x$ column replaced with the $c$ column.
$\textcolor{w h i t e}{\text{XXX}} {D}_{y} =$ the matrix composed of the variable coefficients with the $y$ column replaced with the $c$ column.
$\textcolor{w h i t e}{\text{XXX}} {D}_{z} =$ the matrix composed of the variable coefficients with the $z$ column replaced with the $c$ column.

then
$\textcolor{w h i t e}{\text{XXX")x=|D_x|/|D|color(white)("XXX")y=|D_y|/|D|color(white)("XXX}} z = | {D}_{z} \frac{|}{|} D |$

Here's what the solution looks like done on a spreadsheet: 