BrightChamps Logo
Login

Summarize this article:

Live Math Learners Count Icon148 Learners

Last updated on September 18, 2025

Cramer's Rule

Professor Greenline Explaining Math Concepts

Cramer’s Rule is a mathematical method used to solve a system of equations when the number of variables matches the number of equations. In the 1750s, mathematician Gabriel Cramer introduced this rule, which allows us to find any variable directly without calculating the others. Suppose in the equations there are 3 variables, such as x, y, and z. Normally, finding z requires knowing x and y, but Cramer’s rule allows us to calculate z directly without finding the others first. In this article, we will explore Cramer’s rule in detail.

Cramer's Rule for US Students
Professor Greenline from BrightChamps

What is Cramer’s Rule?

• 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 = (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 Dx=   \(\begin{bmatrix} 3 & 1 & 1\\[0.3em] 0& -1&-1 \\[0.3em] 0& 2&1\end{bmatrix}\)

 

Dx = (3) (-1) (1) = -3
        (1) (-1) (0) = 0  
        (1) (0) (2) = 0 
        (1) (-1) (0) = 0
        
(1) (-1) (0) = 0
        (3) (2) (1) = 6

Dx = −3 + 0 + 0 − 0 − 0 − 6 = −3 + 6 = 3
Thus, Dx = 3

 

Dy =  \(\begin{bmatrix} 2 & 3& 1\\[0.3em] 1& 0&-1 \\[0.3em] 1& 0&1\end{bmatrix}\)

 

  Dy = (2) (0) (1) = 0
          (3) (-1) (1) = -3
          (1) (1) (0) = 0 
 
         (1) (0) (1) = 0 
 
         (1) (-1) (2) = -2 
          (2) (0) (1) = 0 

Dy = 0 − 3 + 0 − 0 + 2 − 0 = −3 + 2 = −6 
Dy = -6 

 

Dz\(\begin{bmatrix} 2 & 1& 3\\[0.3em] 1& -1&0 \\[0.3em] 1& 2&0\end{bmatrix}\)

 

Dz = (2) (-1) (0) = 0
        (1) (0) (1) = 0
        (3) (1) (2) = 6 
        (3) (-1) (1) = -3
        (2) (0) (2) = 0
        (2) (1) (0) = 0

Dz = 0 + 0 + 6 − (−3) = 6 + 3 = 9
Dz = 9


Now, we can apply Cramer’s rule. 

    x = Dx / D = 3 / 3 = 1
    y = Dy / D = -6 / 3  = -2
    z = Dz / D = 9 / 3 = 3


So, the values for the variables:

x = 1 
y = -2
z = 3

 

 

 

Professor Greenline from BrightChamps

What is the Formula for Cramer’s Rule?

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,
A = the square matrix that represents the coefficient matrix.

X = the column matrix with variables. 
B = the column matrix which contains the constants (present on the right side of the equations). 

 

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. 

 

 

Professor Greenline from BrightChamps

What are the Conditions for Cramer’s Rule?

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.    

 

Professor Greenline from BrightChamps

Cramer’s Rule for 2 × 2

Using Cramer’s rule, let’s solve 2 systems of 2 equations with 2 variables. The equations are:

  •  a1 x + b1 y = c1
  •  a2 x + b2 y = c

 

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 determinant of the coefficient matrix A is D.
  • To find the value of Dx, replace the first column of A with B.     
  • To find the value of Dy, the second column of A will be replaced with B.   
  • To find the value of Dz, replace the third column of A with B. 

 

The system has a unique solution when D is not equal to zero. 

 x = Dx / D 

 y = Dy / D 

 z = Dz / D

Determinant calculation example:

Suppose a system is 

 a1x + b1y + c1z = d1

 a2x + b2y + c2z = d2

 a3x + b3y + c3z = d3

Then the coefficient matrix A is 

| a1 b1 c1 |

| a2 b2 c2 |

| a3 b3 c3 |

The determinant D is calculated as,

D = a1(b2c3 - b3c2) - b1(a2c3 - a3c2) + c1(a2b3 - a3b2)

 

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.  

 

 

Max Pointing Out Common Math Mistakes

Common Mistakes and How to Avoid Them on Cramer’s Rule

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. 

 

 

Mistake 1:

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Solving Equations, Whether D = 0 

 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Cramer’s rule is not applicable if D = 0, students mistakenly solve the equations. To avoid this mistake, students should check and verify that D is not equal to zero (D ≠ 0). 

For example, the given equation is:

x + y = 3

3x + 3y = 9 

Here, 

 D = \(\begin{bmatrix} 1&1 \\[0.3em] 3 &3 \end{bmatrix}\)

D = (1) (3) - (1) (3) = 0

Therefore, Cramer’s rule is not applicable in this system. 

 

Mistake 2:

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Replacing the Incorrect Column in the Matrix 

 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students should replace the correct column while finding DX and Dy in a system. If they replace the wrong column, then the final result will be incorrect. Keep in mind to put the constants for Dx in the first column and the constants for Dy in the second column.  

For instance, the given system is:

   2x + 3y = 5

   4x + y = 6 

D = \(\begin{bmatrix} 2&3 \\[0.3em] 4 &1 \end{bmatrix}\)

 

To find Dx, replace the first column with the constants in the answer column. 

\(\begin{bmatrix} 5 &3\\[0.3em] 6 &1 \end{bmatrix}\)

Dx = (5) (1) - (3) (6) = 5 - 18 = -13 

 

Mistake 3:

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Forgetting the Determinant Formula 

 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Always remember the formula for finding the determinants of a system and apply it correctly in the calculations. Sometimes, students forget the formula for calculating 2 × 2 or 3 × 3 determinants and end up with incorrect answers. 

For example, D =  \(\begin{bmatrix} 2 &4\\[0.3em]1&3 \end{bmatrix}\)

 

The formula is: ad - bc 

Hence, D = (2) (3) - (4) (1) = 6 - 4 = 2

 

Mistake 4:

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

 Ignoring the Simplification of Variable Expressions 

 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

After finding the determinants (D, Dx, and Dy) do not leave the answer unsimplified. Sometimes students fail to perform the simplification of x and y, which leads them to incorrect answers. So, after finding the determinants, simplify the variables. 

For example, Dx = -10, D = 2 

x = Dx / D 

   = -10 / 2 = -5 

x = -5 

 

Mistake 5:

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Stopping Calculations Before Finding x and y

 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Sometimes, students forget to find the values of variables x and y and stop the calculations after calculating the determinants. Always remember to find the variables to get the actual solution to the system of equations. 

For example, 

2x + 3y = 12

x - y = 1 

D = (2) (-1) - (3)(1) = -2 - 3 = -5

Dx = (12) (-1) - (3) (1) = -12 - 3 = -15

Dy = (2) (1) - (12) (1) = 2 - 12 = -10

Students do not end the calculation here. 

Continue and find x and y:

   x = -15 / -5 = 3

   y = -10 / -5 = 2

 

arrow-right
Professor Greenline from BrightChamps

Real-Life Applications of Cramer’s Rule

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. 

 

  • Economists use Cramer’s rule to find the equilibrium points where both supply and demand are equal. For example, to find out how demand and supply change in response to price can be figured using Cramer’s rule. 

     
  • Electrical engineers use Cramer's rule to solve multiple-loop and node equations and to find the unknown values in a complex circuit. For instance, they use this rule to solve for the current in three connected loops and three unknown currents. 

     
  • In graphic design, designers use Cramer’s rule to change the positions of objects. They use it when they move, rotate, or resize 3D shapes. For example, if they know where an object ended up after being moved or turned, they can use Cramer’s rule to figure out where it started. 


 

Max from BrightChamps Saying "Hey"
Hey!

Solved Examples of Cramer's Rule

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

Solve: 2x + 3y = 8 and 4x - y = 2

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

x = 1
y = 2 

 

Explanation

 First, we can calculate the determinant (D):

 D = 
\(\begin{bmatrix}2&3 \\[0.3em] 4 &-1 \end{bmatrix}\)


 

D = a1b2 - a2b1
    =  (2) (-1) - (4) (3) 
    = -2 - 12 = -14 

D = -14 

 

Next, calculate Dx:

  Dx\(\begin{bmatrix}8&3 \\[0.3em]2 &-1 \end{bmatrix}\)

 

Dx = c1b2 - c2b1
    = (8) (-1) - (2) (3)
    = -8 - 6 = -14
  Dx = -14 

 

Now, find Dy

Dy =  \(\begin{bmatrix}2&8 \\[0.3em] 4 &2 \end{bmatrix}\)

 

  Dy = a1c2 - a2c1 

  Dy = (2) (2) - (4) (8) 

      = 4 - 32 = -28 

  Dy = -28 

 

Next, find x and y: 

   x = Dx / D 

      = -14 / -14 = 1 

 

   y = Dy / D 

       = -28 / -14 = 2

Therefore, x = 1

y = 2 

 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 2

Solve x + y = 5 and 2x - y = 4

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

 x = 3

 y = 2 

 

Explanation

First, we can find the value of D:

We can find D, Dx, and Dy using the above formulas. 

D = \(\begin{bmatrix}1&1 \\[0.3em] 2 &-1\end{bmatrix}\)

D = a1b2 - a2b1

D = (1) (-1) - (2) (1) 

     = -1 - 2 = -3 

 

Dx

\(\begin{bmatrix}5&1 \\[0.3em] 4 &-1\end{bmatrix}\)

 

Dx = c1b2 - c2b1

Dx= (5) (-1) - (4) (1) 

    = -5 - 4 = -9

 

Dy =  \(\begin{bmatrix}1&5 \\[0.3em] 2 &4\end{bmatrix}\)

 

Dy = a1c2 - a2c1 

Dy = (1) (4) - (2) (5) 

     = 4 - 10 = -6


Now, find the value of x and y:

    x = Dx / D 

       = -9 / -3 = 3

   y = Dy / D 

      = -6 / -3 = 2

 

Hence, x = 3 and y = 2

 

 

 

 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 3

Solve 3x - y = 7 and 2x + 5y = -1

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

x = 2
y = -1 

 

Explanation

First we can find the value of D:
 

D = \(\begin{bmatrix}3&-1 \\[0.3em] 2 &5\end{bmatrix}\)

 

D = a1b2 - a2b1

    = (3) (5) - (2) (-1) 

    = 15 + 2 = 17

 

Dx =  \(\begin{bmatrix}7&-1 \\[0.3em] -1 &5\end{bmatrix}\)

 

Dx = c1b2 - c2b1

Dx = (7) (5) - (-1) (-1) 

     = 35 - 1 = 34

 

Dy =   \(\begin{bmatrix}3&7 \\[0.3em] 2&-1\end{bmatrix}\)

 

Dy = a1c2 - a2c1 

Dy = (3) (-1) - (2) (7) 

     = -3 - 14 = -17

 

Now, find the value of x and y: 

 x = Dx / D 

       = 34 / 17 = 2

 y = Dy / D 

       = -17 / 17 = -1 

 

Therefore, x = 2 and y = -1.  

 

 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 4

Solve x + y + z = 6; 2x - y + 3z = 14; x + 4y - z = -2

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

 x = -4 / 3
y = 4 / 3
z = 18 / 3 = 6 

 

Explanation

The 3 × 3 determinant formulas are: 

        a1x + b1y + c1z = d1

         a2x + b2y + c2z = d2

         a3x + b3y + c3z = d3

Now, we can find D:
 

 \(D= \begin{bmatrix} 1 & 1 & 1\\[0.3em] 2& -1 &3\\[0.3em] 1 & 4 &-1 \end{bmatrix}\)

 

D = a1 (b2 c3 - b3 c2) - b1 (a2 c3 - a3 c2) + c1 (a2 b3 - a3 b2)

     = 1 (−1 × −1 − 3 × 4) − 1 (2 × −1 − 3 × 1) + 1 (2 × 4 − (−1) × 1) 

     = 1 (1 − 12) − 1 (−2 − 3) + 1 (8 + 1) 

      =  −11 + 5 + 9 = 3 

 

Dx\( \begin{bmatrix} 6 & 1 & 1\\[0.3em] 14& -1 &3\\[0.3em] -2 & 4 &-1 \end{bmatrix}\)

 

To find the value of Dx, use the same formula:

Dx = 6 (−1 × −1 − 3 × 4) −1 (14 × −1 − 3 × −2) + 1 (14 × 4 − (−1) × −2) 

         = 6 (1 − 12) − (−14 + 6) + (56 − 2)

         = −66 + 8 + 54 = −4
 

Dy =   \( \begin{bmatrix} 1 & 6 & 1\\[0.3em] 2& 14 &3\\[0.3em] 1 &-2 &-1 \end{bmatrix}\)

 

Dy = 1 (14 × −1 − 3 × −2) − 6 (2 × −1 − 3 × 1) + 1 (2 × −2 − 14 × 1)

        = 1 (−14 + 6) − 6 (−2 − 3) + (−4 − 14)

         = −8 + 30 − 18 = 4

Dz\( \begin{bmatrix} 1 & 1 & 6\\[0.3em] 2& -1&14\\[0.3em] 1 &4&-2 \end{bmatrix}\)
 

Dz = 1 (−1 × −2 − 14 × 4) − 1 (2 × −2 − 14 × 1) + 6 (2 × 4 − (−1) × 1) 

       = 1 (2 − 56) − (−4 − 14) + 6 (8 + 1) 

       = −54 + 18 + 54 = 18 

 

Next, find x, y and z:

Therefore, x = -4 / 3

y = 4 / 3 

z = 18 / 3 = 6 

 

 

 


 

 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 5

Solve: x - 2y = 4 and 3x + y = 5

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

 x = 2
 y = -1

 

Explanation

First, we can find the value of D:

D =  \(\begin{bmatrix}1&-2\\[0.3em] 3 &1\end{bmatrix}\)

 

D = a1b2 - a2b1

     = (1) (1) - (3) (-2) 

     = 1 + 6 = 7

 

Dx =  \(\begin{bmatrix}4&-2\\[0.3em] 5&1\end{bmatrix}\)

 

Dx = c1b2 - c2b1

     = (4) (1) - (5) (-2) 

     = 4 + 10 = 14

 

Dy =  \(\begin{bmatrix}1&4\\[0.3em] 3&5\end{bmatrix}\)

 

Dy = a1c2 - a2c1 

     = (1) (5) - (3) (4) 

     = 5 - 12 = -7

 

Now, find the value of x and y:

    x = Dx / D 

       = 14 / 7 = 2

   y = Dy / D 

       = -7 / 7 = -1

 

Therefore, x = 2 and y = -1

 

 

 

 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Ray Thinking Deeply About Math Problems

FAQs on Cramer's Rule

1.Define Cramer’s rule.

Cramer’s rule is a mathematical method for solving a system of equations in which the number of variables and the number of equations are equal. This rule is only applicable when the coefficient matrix has a non-zero determinant (D ≠ 0). 

 

Math FAQ Answers Dropdown Arrow

2.When is Cramer’s rule applicable?

Cramer’s rule is applicable when the determinant of the coefficient matrix is not zero (D ≠ 0), and the system contains an equal number of equations as unknowns. 

 

Math FAQ Answers Dropdown Arrow

3.What happens if D = 0?

If the determinant, D = 0, then the system may have no solution or infinitely many solutions. In these cases, Cramer’s rule is not applicable. 

 

Math FAQ Answers Dropdown Arrow

4. What do you mean by determinants?

A determinant is a special number we get from a square set of numbers. In Cramer’s Rule, we use Dx, Dy, and Dz to find x, y, and z by replacing one column in the coefficient matrix with the constants column. This helps us to solve each letter one at a time.

 

Math FAQ Answers Dropdown Arrow

5.Is it possible to apply Cramer’s rule to 3 or more variables?

Yes, Cramer’s rule applies to 2 × 2, 3 × 3, or any other n × n system, as long as the conditions of the rule, such as a square matrix and D ≠ 0 -, are satisfied.  

 

Math FAQ Answers Dropdown Arrow

6.How does learning Algebra help students in United States make better decisions in daily life?

Algebra teaches kids in United States to analyze information and predict outcomes, helping them in decisions like saving money, planning schedules, or solving problems.

Math FAQ Answers Dropdown Arrow

7.How can cultural or local activities in United States support learning Algebra topics such as Cramer's Rule?

Traditional games, sports, or market activities popular in United States can be used to demonstrate Algebra concepts like Cramer's Rule, linking learning with familiar experiences.

Math FAQ Answers Dropdown Arrow

8.How do technology and digital tools in United States support learning Algebra and Cramer's Rule?

At BrightChamps in United States, we encourage students to use apps and interactive software to demonstrate Algebra’s Cramer's Rule, allowing students to experiment with problems and see instant feedback for better understanding.

Math FAQ Answers Dropdown Arrow

9.Does learning Algebra support future career opportunities for students in United States?

Yes, understanding Algebra helps students in United States develop critical thinking and problem-solving skills, which are essential in careers like engineering, finance, data science, and more.

Math FAQ Answers Dropdown Arrow
Math Teacher Background Image
Math Teacher Image

Jaskaran Singh Saluja

About the Author

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.

Max, the Girl Character from BrightChamps

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
UAE - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom