# How do I use Cramer's rule to solve a system of equations?

Aug 16, 2015

You divide each variable determinant by the determinant of the coefficients.

EXAMPLE:

Use Cramer's Rule to solve the following system of equations:

$2 x + y + z = 3$
x–y–z=0
$x + 2 y + z = 0$

Solution:

The left hand side gives us the coefficient matrix.

$\left(\begin{matrix}2 & 1 & 1 \\ 1 & - 1 & - 1 \\ 1 & 2 & 1\end{matrix}\right)$

The right hand side gives us the answer matrix.

$\left(\begin{matrix}3 \\ 0 \\ 0\end{matrix}\right)$

The determinant $D$ of the coefficient matrix is

$D = | \left(2 , 1 , 1\right) , \left(1 , - 1 , - 1\right) , \left(1 , 2 , 1\right) | = - 2 + 2 - 1 + 1 - 1 + 4 = 3$

Let ${D}_{x}$ be the determinant formed by replacing the $x$-column values with the answer-column values:

${D}_{x} = | \left(3 , 1 , 1\right) , \left(0 , - 1 , - 1\right) , \left(0 , 2 , 1\right) | = - 3 + 6 = 3$

Similarly,

${D}_{y} = | \left(2 , 3 , 1\right) , \left(1 , 0 , - 1\right) , \left(1 , 0 , 1\right) | = - 3 - 3 = - 6$

and

${D}_{z} = | \left(2 , 1 , 3\right) , \left(1 , - 1 , 0\right) , \left(1 , 2 , 0\right) | = 6 + 3 = 9$

Cramer's Rule says that

$x = {D}_{x} / D = \frac{3}{3} = 1$,

$y = {D}_{y} / D = - \frac{6}{3} = - 2$,

$z = {D}_{z} / D = \frac{9}{3} = 3$.

The solution is $x = 1 , y = - 2 , z = 3$