[Math] Cramer’s Rule Question

determinantlinear algebramatrices

Use Cramer's rule to solve this system for z:

$$2x+y+z=1$$
$$3x+z=4$$
$$x-y-z=2$$

so my work is:

$$\frac{\left|\begin{matrix}
2 & 1 & 1\\
3 & 0 & 4\\
1 & -1 & 2
\end{matrix}\right|}{\left|\begin{matrix}
2 & 1 & 1\\
3 & 0 & 1\\
1 & -1 & 1
\end{matrix}\right|}$$

which gives $\frac{3}{-3}$ or $-1$. The solution is $1$, can someone tell me what I am doing wrong?

Best Answer

The determinant in the denominator is incorrect. It should be $$\left|\begin{matrix} 2 & 1 & 1\\ 3 & 0 & 1\\ 1 & -1 & {\color{red} {-1}} \end{matrix}\right|$$ which evaluates to (according to Sarrus' Rule): $$(2\cdot0\cdot-1) + (1\cdot1\cdot1) + (1 \cdot 3 \cdot -1) - (1\cdot0\cdot1) - (1\cdot3\cdot-1) - (1\cdot2\cdot-1)\\ = 0 +1 - 3 - 0 +3 + 2 \\ = 3$$

Related Question