# Using Cramer's Rule

The three equations given are: \begin{cases} x+y-z=4 \\ x-2y+3z=-6 \\ 2x+3y+z=7 \end{cases}

I am having trouble putting it into the matrix format, which in turn is hindering my ability to solve for the determinant. I am also not sure how to solve for $x$, $y$, and $z$ with Cramer's Rule.

## migrated from economics.stackexchange.comJul 10 '18 at 21:27

This question came from our site for those who study, teach, research and apply economics and econometrics.

• What troubles are you having? – Jackozee Hakkiuz Jul 10 '18 at 21:32
• It's much faster to put the augmented matrix in reduced row echelon form. Do you really have to use Cramer's formulæ? – Bernard Jul 10 '18 at 21:37
• Write it like this. \begin{align*} x+y-z&=4 \\x-2y+3z&=-6 \\2x+3y+z&=7 \end{align*} Can you put this in matrix form now? – GEdgar Jul 10 '18 at 21:52
• @GEdgar How is that any different? – amd Jul 10 '18 at 22:09

## 2 Answers

We start by writing the equations like so:$$\begin{pmatrix} 1 & 1 & -1\\ 1 & -2 & 3\\ 2 & 3 & 1 \end{pmatrix} \begin{pmatrix} x \\ y\\ z \end{pmatrix} = \begin{pmatrix} 4\\ -6\\ 7 \end{pmatrix}.$$

Now, let's call the $3\times 3$ matrix $A$ and the vector on the right hand side of the equation $b$. Then, we first observe $$\det(A)=-13.$$ In order to use Cramer's rule, we replace the relevant column with $b$, calling this matrix $A_i$ for $i\in\{x,y,z\}$ and work out the determinant of this new matrix and divide it by $\det(A)$. So, carrying this procedure out gives $$\det(A_x)=\det\begin{pmatrix} 4 & 1 & -1\\ -6 & -2 & 3\\ 7 & 3 & 1 \end{pmatrix}=-13,$$ $$\det(A_y)=\det\begin{pmatrix} 1 & 4 & -1\\ 1 & -6 & 3\\ 2 & 7 & 1 \end{pmatrix}=-26,$$ $$\det(A_z)=\det\begin{pmatrix} 1 & 1 & 4\\ 1 & -2 & -6\\ 2 & 3 & 7 \end{pmatrix}=13.$$ This then allows us to conclude $$x=1,\quad y=2,\quad z=-1.$$

However, as Bernard alludes to in the comments, I think you may appreciate at this point that Cramer's rule is quite inefficient and I would suggest using reduced row echelon form to obtain the solution set to these sorts of problems instead.

Using the information you provide we get the following equation

$$\begin{bmatrix} 1 & 1 & -1\\ 1 & -2 & 3\\ 2 & 3 & 1 \end{bmatrix} \begin{bmatrix} x \\ y\\ z \end{bmatrix} = \begin{bmatrix} 4\\ -6\\ 7 \end{bmatrix}$$

Which should be in an easy enough form to use Cramer's rule. Remember that the matrix you get from a system of equations is the matrix of coefficients in your equations

• oops typo you're right – wjmccann Jul 11 '18 at 1:16