- Math Lessons
- >
- Algebra
- >
- Solving System of Linear Equations
- >
- Cramers Rule

« Row Reduction Method |

Solving System of Linear Equations: (lesson 4 of 5)

Another method of solving systems of linear equations is one using determinants; this is called Cramer's Rule. This system is more restricted, though: using it requires that 2 prerequisites be met:

The system must have the same number of equations as variables, that is, the coefficient matrix of the system must be square.

The determinant of the coefficient matrix must be non-zero. The reason for this will become apparent as we describe the method.

**The steps in applying Cramer's rule are:**

Step 1. Write the coefficient matrix of the system (call this matrix A); if it is square, you may continue, otherwise Cramer's rule is not applicable here.

Step 2. Compute the determinant of the coefficient matrix, $|A|$; if $|A|$ is not zero you may continue, otherwise Cramer's rule is not applicable here.

Step 3. Suppose the first variable of the system is x. Then write the matrix $A_x$ as follows: substitute the column of numbers to the right of the equal signs instead of the first (from the left) column of A. Now compute the determinant of $A_x$, that is $|A_x|$.

Step 4. The value of x in the solution is now $|A_x|/|A|$.

Step 5. Steps 3, and 4 with the remaining variables. In each case substitute the column of numbers instead of the column of A that corresponds to the variable you are using. If the variables are x, y, and z, then the values will now be:

$$ \begin{aligned} x &= \frac{|A_x|}{|A|}\\ y &= \frac{|A_y|}{|A|}\\ z &= \frac{|A_z|}{|A|} \end{aligned} $$And the solution is

$ (x , y, z) = \left( \frac{|A_x|}{|A|}, \frac{|A_y|}{|A|}, \frac{|A_y|}{|A|} \right)$

Example:

We will demonstrate Cramer's rule with the following system:

$$ \begin{aligned} x + 2y + 3z &= 1 \\ -x + 2z &= 2 \\ -2y + z &= -2 \end{aligned} $$Step 1:

The coefficient matrix of this system is

$$ A = \left( {\begin{array}{*{20}{c}} 1\\ - 1\\ 0 \end{array}\begin{array}{*{20}{c}} 2\\ 0\\ - 2 \end{array}\begin{array}{*{20}{c}} 3\\ 2\\ 1 \end{array}} \right) $$Note that the matrix is square (it has 3 rows and 3 columns), and so we may proceed with the next step of Cramer's rule.

Step 2:

Now find the determinant of the coefficient matrix A; use the matrix manipulator in the tools box if you would like help in this computation. You should get $|A| = 12$. This is not zero, so Cramer's rule may be applied here.

Step 3:

$$ A_x = \left( {\begin{array}{*{20}{c}} 1\\ 2\\ -2 \end{array}\begin{array}{*{20}{c}} 2\\ 0\\ - 2 \end{array}\begin{array}{*{20}{c}} 3\\ 2\\ 1 \end{array}} \right) $$and its determinant is $|A_x| = -20$. Therefore $x = |A_x| / |A| = \frac{-20}{12} = \frac{- 5}{4}$.

Step 4:

Using the same method, the values for the remaining 2 variables, x and y, are computed below:

$$
A_y = \left( {\begin{array}{*{20}{c}}
1\\
-1\\
0
\end{array}\begin{array}{*{20}{c}}
1\\
2\\
- 2
\end{array}\begin{array}{*{20}{c}}
3\\
2\\
1
\end{array}} \right)
$$

and its determinant is $|A_y| = 13$ . Therefore $y = |A_y| / |A| = \frac{13}{12}$.

$$ A_z = \left( {\begin{array}{*{20}{c}} 1\\ -1\\ 0 \end{array}\begin{array}{*{20}{c}} 2\\ 0\\ - 2 \end{array}\begin{array}{*{20}{c}} 1\\ 2\\ -2 \end{array}} \right) $$and its determinant is $|A_z| = 2$ . Therefore $z = |A_z| / |A| = \frac{2}{12} = \frac{1}{6}$.