Summarize this article:
217 LearnersLast updated on October 21, 2025

Cramer’s Rule is a mathematical method used to solve a system of equations when the number of variables matches the number of equations. Cramer's rule allows us to find any variable directly without calculating the others. In this article, we will explore Cramer’s rule in detail.
Properties of Cramer's rule are:
Cramer’s rule solves systems of linear equations using determinants.
Values of the variables can be determined by the determinants.
One determinant comes from the coefficients of variables (coefficient matrix).
Another determinant is created by replacing one column with the constants (right-hand side).
The value of a variable = determinant with replaced column ÷ coefficient determinant.
Let us see how Cramer’s rule works in the following system of equations:
\(2x + y + z = 3\)
\(x - y - z = 0\)
\(x + 2y + z = 0\)
Write the given equations with all coefficients:
\(2x + 1y + 1z = 3\\ 1x - 1y - 1z = 0\\ 1x + 2y + 1z = 0\)
Create the coefficient matrix and identify its determinant (D):
\(D= \begin{bmatrix} 2 & 1 & 1\\[0.3em] 1& -1 &-1 \\[0.3em] 1 & 2 &1 \end{bmatrix}\)
Here, the matrix only contains the coefficients of x, y and z.
The answer column:
\(\begin{bmatrix} 3\\[0.3em] 0 \\[0.3em] 0 \end{bmatrix}\)
Now, form Dx by replacing the 1st column with the answer column:
Dx = \( \begin{bmatrix} 3 & 1 & 1\\[0.3em] 0& -1 &-1 \\[0.3em] 0 & 2 &1 \end{bmatrix}\)
Here, the determinant with x-values is replaced.
Create Dy and Dz by replacing the 2nd and 3rd columns with the answer column.
Dy = \(\begin{bmatrix} 2 & 3 & 1\\[0.3em] 1& 0 &-1 \\[0.3em] 1& 0&1 \end{bmatrix}\)
Dz = \(\begin{bmatrix} 2 & 1 & 3\\[0.3em] 1& -1&0 \\[0.3em] 1& 2&0\end{bmatrix}\)
We can use cofactor expansion (3 × 3 rule). For a general 3 × 3 matrix, the formula is:
\(\begin{bmatrix} a& b& c\\[0.3em] d& e&f \\[0.3em] g& h&i\end{bmatrix} = aei +bfg + cdh - ceg -bdi - afh\)
D = \(\begin{bmatrix} 2 & 1 & 1\\[0.3em] 1& -1&-1 \\[0.3em] 1& 2&1\end{bmatrix}\)
D = Apply the cofactor expansion
\((2) (-1) (1) = -2\\ (1) (-1) (1) = -1\\ (1) (1) (2) = 2\\ (1) (-1) (1) = -1\\ (1) (-1) (1) = -1\\ (2) (1) (2) = 4 \)
\(D = (−2) + (−1) + 2 − (−1) − (−1) − 4 = −1 − 4 + 2 + 1 + 1 = -1\)
Hence, D = 3
Next \(D_x\)= \(\begin{bmatrix} 3 & 1 & 1\\[0.3em] 0& -1&-1 \\[0.3em] 0& 2&1\end{bmatrix}\)
\(D_x\) = Apply the cofactor expansion
\((3) (-1) (1) = -3\\ (1) (-1) (0) = 0\\ (1) (0) (2) = 0\\ (1) (-1) (0) = 0\\ (1) (-1) (0) = 0\\ (3) (2) (1) = 6\)
\(D_x = −3 + 0 + 0 − 0 − 0 − 6 = −3 + 6 = 3\)
Thus, \(D_x = 3\)
\(D_y\) = \(\begin{bmatrix} 2 & 3& 1\\[0.3em] 1& 0&-1 \\[0.3em] 1& 0&1\end{bmatrix}\)
\(D_y\) = Apply the cofactor expansion
\((2) (0) (1) = 0\\ (3) (-1) (1) = -3\\ (1) (1) (0) = 0\\ (1) (0) (1) = 0\\ (1) (-1) (2) = -2\\ (2) (0) (1) = 0 \)
\(D_y = 0 − 3 + 0 − 0 + 2 − 0 = −3 + 2 = −6\)
\(D_y = -6\)
\(D_z\) = \(\begin{bmatrix} 2 & 1& 3\\[0.3em] 1& -1&0 \\[0.3em] 1& 2&0\end{bmatrix}\)
\(D_z\) = Apply the cofactor expansion
\((2) (-1) (0) = 0\\ (1) (0) (1) = 0\\ (3) (1) (2) = 6\\ (3) (-1) (1) = -3\\ (2) (0) (2) = 0\\ (2) (1) (0) = 0\)
\(D_z = 0 + 0 + 6 − (−3) = 6 + 3 = 9\)
\(D_z = 9\)
Now, we can apply Cramer’s rule.
\( x = \frac{D_x}{D} = \frac{3}{3} = 1 \)
\( y = \frac{D_y}{D} = \frac{-6}{3} = -2 \)
\( z = \frac{D_z}{D} = \frac{9}{3} = 3 \)
So, the values for the variables:
\(x = 1\\ y = -2\\ z = 3\)
Using Cramer’s rule, if a system has five equations in five unknowns, we can solve for just one variable if that is all we need. The system of equations consists of n variables x1, x2, x3…..xn can be written in the matrix form as:
AX = B
Here,
For finding the value of x, we use the formula shown in the diagram.
By using the above formula, we can determine the individual values of x, y, and z.
There are specific conditions for Cramer’s rule. There are two important conditions for this rule, they are :
First condition: It happens when D is equal to zero, and there is an infinite number of solutions. At least one determinant of the numerator, such as DX, Dy, etc., is also 0.
Second condition: It happens when none of the numerators are zero, but D is equal to zero, and there is no solution.
When the determinant of the coefficient matrix (D) is not equal to zero, then Cramer’s rule is applicable. The system has a unique solution, and we can find a single value for each variable. If D is equal to zero, then there is an endless number of solutions or no solution for the system.
Using Cramer’s rule, let’s solve 2 systems of 2 equations with 2 variables. The equations are:
Writing the system in matrix form as:
AX = B
Where A = the coefficient matrix
\( \begin{bmatrix} a_1 & b_1 & c_1\\[0.3em] d_2& e_2 & f_2 \\[0.3em] g_3 & h_3 &i_3\end{bmatrix}\)
X = the variable matrix
\( \begin{bmatrix} x\\[0.3em] y \\[0.3em] z\end{bmatrix}\)
B = The constant matrix
\( \begin{bmatrix} d_1\\[0.3em] d_2 \\[0.3em] d_3\end{bmatrix}\)
Next, we can calculate the three determinants of the system.
The system has a unique solution when D is not equal to zero.
\( x = \frac{D_x}{D} \)
\( y = \frac{D_y}{D} \)
\( z = \frac{D_z}{D}\)
Determinant calculation example:
Suppose a system is
\(a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3 \)
Then the coefficient matrix A is
\( \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} \)
The determinant D is calculated as,
\( D = a_1 (b_2 c_3 - b_3 c_2) - b_1 (a_2 c_3 - a_3 c_2) + c_1 (a_2 b_3 - a_3 b_2) \)
Cramer's rule chart
When D ≠ 0, Cramer’s rule is applicable, then the system has a unique solution. The system has an infinite number of solutions when D = 0. There is no solution for the system when none of the numerators is 0. Here is a visual representation of Cramer’s rule, and it explains what type of solution it might have.
Here are some of the tips and tricks for students to master Cramer's rule and their parents to help their kids in learning:
Make learning fun by playing games. Turn solving 2x2 systems into a “treasure hunt” where each determinant gives a clue. Keep some rewards like stickers or points for correct solutions.
To solve systems of linear equations, students need proper knowledge of Cramer’s rule, which is a fundamental method in mathematics. Children often make mistakes when working with determinants and equations. Here are some errors and their helpful solutions to prevent these mistakes in calculations.
We can apply Cramer’s rule when we need to solve multiple variables and equations. This mathematical method has several real-world applications in various fields, ranging from economics to engineering.
Mixing Solutions in Science: We can use Cramer's rule in some scenarios, like preparing lab mixtures or juice blends. For example: Mixing two solutions with different concentrations to get a desired concentration uses Cramer’s Rule to find how much of each solution is needed.
Solve: 2x + 3y = 8 and 4x - y = 2
\(x = 1\)
\(y = 2\)
First, we can calculate the determinant (D):
D = \(\begin{bmatrix}2&3 \\[0.3em] 4 &-1 \end{bmatrix}\)
\( \begin{aligned} D &= a_1 b_2 - a_2 b_1 \\ D &= (2)(-1) - (4)(3) \\ D &= -2 - 12 = -14 \end{aligned} \)
\(D = -14\)
Next, calculate Dx:
\(D_x\) = \(\begin{bmatrix}8&3 \\[0.3em]2 &-1 \end{bmatrix}\)
\( \begin{aligned} D_x &= c_1 b_2 - c_2 b_1 \\ D_x &= (8)(-1) - (2)(3) \\ D_x &= -8 - 6 = -14 \end{aligned} \)
\(D_x = -14 \)
Now, find Dy:
\(D_y\) = \(\begin{bmatrix}2&8 \\[0.3em] 4 &2 \end{bmatrix}\)
\( \begin{aligned} D_y &= a_1 c_2 - a_2 c_1 \\ D_y &= (2)(2) - (4)(8) \\ D_y &= 4 - 32 = -28 \end{aligned} \)
\(D_y = -28\)
Next, find x and y:
\( x = \frac{D_x}{D}\\ x= \frac{-14}{-14} = 1 \)
\( y = \frac{D_y}{D}\\ y = \frac{-28}{-14} = 2 \)
Therefore, x = 1 and y = 2.
Solve x + y = 5 and 2x - y = 4
\(x = 3\)
\( y = 2\)
First, we can find the value of D:
We can find \(D\), \(D_x\), and \(D_y\) using the above formulas.
D = \(\begin{bmatrix}1&1 \\[0.3em] 2 &-1\end{bmatrix}\)
\( \begin{aligned} D &= a_1 b_2 - a_2 b_1 \\ D &= (1)(-1) - (2)(1) \\ D &= -1 - 2 = -3 \end{aligned} \)
\(D_x\) = \(\begin{bmatrix}5&1 \\[0.3em] 4 &-1\end{bmatrix}\)
\( \begin{aligned} D_x &= c_1 b_2 - c_2 b_1 \\ D_x &= (5)(-1) - (4)(1) \\ D_x &= -5 - 4 = -9 \end{aligned} \)
\(D_y\) = \(\begin{bmatrix}1&5 \\[0.3em] 2 &4\end{bmatrix}\)
\( \begin{aligned} D_y &= a_1 c_2 - a_2 c_1 \\ D_y &= (1)(4) - (2)(5) \\ D_y &= 4 - 10 = -6 \end{aligned} \)
Now, find the value of x and y:
\( x = \frac{D_x}{D}\\ y= \frac{-9}{-3} = 3 \)
\( y = \frac{D_y}{D}\\ y= \frac{-6}{-3} = 2 \)
Hence, \(x = 3\) and \(y = 2\)
Solve 3x - y = 7 and 2x + 5y = -1
\(x = 2\)
\(y = -1\)
First, we can find the value of D:
\(D\) = \(\begin{bmatrix}3&-1 \\[0.3em] 2 &5\end{bmatrix}\)
\( \begin{aligned} D &= a_1 b_2 - a_2 b_1 \\ D &= (3)(5) - (2)(-1) \\ D &= 15 + 2 = 17 \end{aligned} \)
\(D_x\) = \(\begin{bmatrix}7&-1 \\[0.3em] -1 &5\end{bmatrix}\)
\(\begin{aligned} D_x &= c_1 b_2 - c_2 b_1 \\ D_x &= (7)(5) - (-1)(-1) \\ D_x &= 35 - 1 = 34 \end{aligned} \)
\(D_y\) = \(\begin{bmatrix}3&7 \\[0.3em] 2&-1\end{bmatrix}\)
\( \begin{aligned} D_y &= a_1 c_2 - a_2 c_1 \\ D_y &= (3)(-1) - (2)(7) \\ D_y &= -3 - 14 = -17 \end{aligned} \)
Now, find the value of x and y:
\(x = \frac{D_x}{D}\\ x= \frac{34}{17} = 2 \)
\(y = \frac{D_y}{D}\\ y= \frac{-17}{17} = -1 \)
Therefore, \(x = 2\) and \(y = -1\)
Solve x + y + z = 6; 2x - y + 3z = 14; x + 4y - z = -2
\( x = \frac{-4}{3} \)
\( y = \frac{4}{3} \)
\( z = \frac{18}{3} = 6 \)
The 3 × 3 determinant formulas are:
\(a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3\)
Now, we can find D:
\(D= \begin{bmatrix} 1 & 1 & 1\\[0.3em] 2& -1 &3\\[0.3em] 1 & 4 &-1 \end{bmatrix}\)
\(\begin{aligned} D &= a_1 (b_2 c_3 - b_3 c_2) - b_1 (a_2 c_3 - a_3 c_2) + c_1 (a_2 b_3 - a_3 b_2) \\ D &= 1 \big((-1) \times (-1) - 3 \times 4\big) - 1 \big(2 \times (-1) - 3 \times 1\big) + 1 \big(2 \times 4 - (-1) \times 1\big) \\ D &= 1 (1 - 12) - 1 (-2 - 3) + 1 (8 + 1) \\ D &= -11 + 5 + 9 = 3 \end{aligned}\)
\(D_x\) = \( \begin{bmatrix} 6 & 1 & 1\\[0.3em] 14& -1 &3\\[0.3em] -2 & 4 &-1 \end{bmatrix}\)
To find the value of \(D_x\), use the same formula:
\(\begin{aligned} D_x &= 6 \big((-1) \times (-1) - 3 \times 4\big) - 1 \big(14 \times (-1) - 3 \times (-2)\big) + 1 \big(14 \times 4 - (-1) \times (-2)\big) \\ D_x &= 6 (1 - 12) - (-14 + 6) + (56 - 2) \\ D_x &= -66 + 8 + 54 = -4 \end{aligned} \)
Find the value of \(D_y\)
\(D_y\) = \( \begin{bmatrix} 1 & 6 & 1\\[0.3em] 2& 14 &3\\[0.3em] 1 &-2 &-1 \end{bmatrix}\)
\( \begin{aligned} D_y &= 1 \big(14 \times (-1) - 3 \times (-2)\big) - 6 \big(2 \times (-1) - 3 \times 1\big) + 1 \big(2 \times (-2) - 14 \times 1\big) \\ D_y &= 1 (-14 + 6) - 6 (-2 - 3) + (-4 - 14) \\ D_y &= -8 + 30 - 18 = 4 \end{aligned} \)
Find the value of \(D_z\)
\(D_z\) = \( \begin{bmatrix} 1 & 1 & 6\\[0.3em] 2& -1&14\\[0.3em] 1 &4&-2 \end{bmatrix}\)
\( \begin{aligned} D_z &= 1 \big((-1) \times (-2) - 14 \times 4\big) - 1 \big(2 \times (-2) - 14 \times 1\big) + 6 \big(2 \times 4 - (-1) \times 1\big) \\ D_z &= 1 (2 - 56) - (-4 - 14) + 6 (8 + 1) \\ D_z &= -54 + 18 + 54 = 18 \end{aligned} \)
Next, find x, y and z:
Let's find the values of x, y, z with the formula:
\( x = \frac{D_x}{D} \), \( y = \frac{D_y}{D} \), \( z = \frac{D_z}{D} \)
Therefore,
\( x = \frac{-4}{3} \)
\( y = \frac{4}{3} \)
\( z = \frac{18}{3} = 6 \)
Solve: x - 2y = 4 and 3x + y = 5
x = 2
y = -1
First, we can find the value of D:
\(D\) = \(\begin{bmatrix}1&-2\\[0.3em] 3 &1\end{bmatrix}\)
\(\begin{aligned} D &= a_1 b_2 - a_2 b_1 \\ D &= (1)(1) - (3)(-2) \\ D &= 1 + 6 = 7 \end{aligned} \)
\(D_x\) = \(\begin{bmatrix}4&-2\\[0.3em] 5&1\end{bmatrix}\)
\(\begin{aligned} D_x &= c_1 b_2 - c_2 b_1 \\ D_x &= (4)(1) - (5)(-2) \\ D_x &= 4 + 10 = 14 \end{aligned} \)
\(D_y\) = \(\begin{bmatrix}1&4\\[0.3em] 3&5\end{bmatrix}\)
\(\begin{aligned} D_y &= a_1 c_2 - a_2 c_1 \\ D_y &= (1)(5) - (3)(4) \\ D_y &= 5 - 12 = -7 \end{aligned} \)
Now, find the value of x and y:
\( x = \frac{D_x}{D}\\ x= \frac{14}{7} = 2 \)
\( y = \frac{D_y}{D}\\ y= \frac{-7}{7} = -1 \)
Therefore, \(x = 2\) and \(y = -1\)
Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.
: He loves to play the quiz with kids through algebra to make kids love it.






