Cramer’s Rule: Definition, Properties, Formula and Examples

Cramer’s Rule: Definition, Properties, Formula and Examples

Komal MiglaniUpdated on 02 Jul 2025, 08:07 PM IST

In linear algebra, Cramer's rule is an explicit formula for the solution of a system of linear equations with as many equations as unknowns, valid whenever the system has a unique solution. It expresses the solution in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column with the column vector of the right sides of the equations. In real life, we use Cramer's Rule to solve the system of linear equations which helps us to solve age-related problems and time-related problems.

This Story also Contains

  1. System of Linear Equation
  2. Methods to solve Systems of Linear Equations
  3. Solved Examples Based on Cramer’s Rule

In this article, we will cover the concept of Cramer's Rule. This category falls under the broader category of Matrices, which is a crucial Chapter in class 12 Mathematics. It is not only essential for board exams but also for competitive exams like the Joint Entrance Examination(JEE Main) and other entrance exams such as SRMJEE, BITSAT, WBJEE, BCECE, and more. Questions based on this topic have been asked frequently in JEE Mains

System of Linear Equation

A system of linear equations are group of $n$ linear equations containing $n$ number of variables.

1. System of 2 Linear Equations:

It is a pair of linear equations in two variables. It is usually of the form

$a_1x +b_1y + c_1 = 0$

$a_2x +b_2y + c_2 = 0$

Finding a solution for this system means finding the values of $x$ and $y$ that satisfy both equations.

2. System of 3 Linear Equations:

It is a group of 3 linear equations in three variables. It is usually of the form

$a_1x +b_1y + +c_1z + d_1 = 0$

$a_2x +b_2y + +c_2z + d_2 = 0$

$a_3x +b_3y + +c_3z + d_3 = 0$

Finding a solution for this system means finding the values of $x, y$, and $z$ that satisfy all three equations.

The system of equations is broadly classified into two types:

Methods to solve Systems of Linear Equations

We use the following method to solve a System of linear equations in three variables

  • Cramers Rule
  • Inverse method
  • Gaussian elimination method
  • Gaussian Jordan method
  • LU Decomposition method

Cramer’s law

For the system of equations in two variables:

Let $a_1 x+b_1 y=c_1$ and $a_2 x+b_2 y=c_2$, where

$
\frac{\mathrm{a}_1}{\mathrm{a}_2} \neq \frac{\mathrm{b}_1}{\mathrm{~b}_2}
$


On solving this equation by cross multiplication, we get

$
\begin{aligned}
& \frac{x}{b_2 c_1-b_1 c_2}=\frac{y}{a_1 c_2-a_2 c_1}=\frac{1}{a_1 b_2-a_2 b_1} \\
& \text { or } \frac{\mathrm{x}}{\left|\begin{array}{ll}
c_1 & b_1 \\
c_2 & b_2
\end{array}\right|}=\frac{\mathrm{y}}{\left|\begin{array}{ll}
a_1 & c_1 \\
a_2 & c_2
\end{array}\right|}=\frac{1}{\left|\begin{array}{ll}
a_1 & b_1 \\
a_2 & b_2
\end{array}\right|} \\
& \text { or } \mathrm{x}=\frac{\left|\begin{array}{ll}
c_1 & b_1 \\
c_2 & b_2
\end{array}\right|}{\left|\begin{array}{ll}
a_1 & b_1 \\
a_2 & b_2
\end{array}\right|}, \mathrm{y}=\frac{\left|\begin{array}{ll}
a_1 & c_1 \\
a_2 & c_2
\end{array}\right|}{\left|\begin{array}{ll}
a_1 & b_1 \\
a_2 & b_2
\end{array}\right|}
\end{aligned}
$

We can observe that the first column in the numerator of x is of constants and 2nd column in the numerator of $y$ is of constants, and the denominator is of the coefficient of variables.

We can follow this analogy for the system of equations of 3 variables where the third column in the numerator of the value of $z$ will be constant and the denominator will be formed by the value of coefficients of the variables.

For the system of equations in three variables:

Let us consider the system of equations

$
\begin{aligned}
& \mathrm{a}_1 \mathrm{x}+\mathrm{b}_1 \mathrm{y}+\mathrm{c}_{1 \mathrm{z}}=\mathrm{d}_1 \\
& \mathrm{a}_2 \mathrm{x}+\mathrm{b}_2 \mathrm{y}+\mathrm{c}_2 \mathrm{z}=\mathrm{d}_2 \\
& \mathrm{a}_3 \mathrm{x}+\mathrm{b}_3 \mathrm{y}+\mathrm{c}_3 \mathrm{z}=\mathrm{d}_3
\end{aligned}
$

then $\Delta$, which will be the determinant of the coefficient of variables, will be $\Delta=\left|\begin{array}{lll}a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3\end{array}\right|$
$\Delta_1$ numerator of $x$ is :
$\Delta_1=\left|\begin{array}{lll}d_1 & b_1 & c_1 \\ d_2 & b_2 & c_2 \\ d_3 & b_3 & c_3\end{array}\right|$
Similarly $\Delta_2=\left|\begin{array}{lll}a_1 & d_1 & c_1 \\ a_2 & d_2 & c_2 \\ a_3 & d_3 & c_3\end{array}\right|$ and $\Delta_3=\left|\begin{array}{lll}a_1 & b_1 & d_1 \\ a_2 & b_2 & d_2 \\ a_3 & b_3 & d_3\end{array}\right|$

i) If $\Delta \neq0$, then the system of equations has a unique finite solution and so equations are consistent, and solutions are

$\\\mathrm{x=\frac{\Delta_1}{\Delta}, y=\frac{\Delta_2}{\Delta}, z=\frac{\Delta_3}{\Delta}}$

ii) If $\Delta =0$ , and any of

$\Delta_1\neq 0 \; or \;\Delta_2\neq 0 \; or \;\Delta_3\neq 0$

Then the system of equations is inconsistent and hence no solution exists.

iii) If all $\Delta =\Delta_1=\Delta_2=\Delta_3= 0$ then

The system of equations is consistent and it has an infinite number of solutions (except when all three equations represent parallel planes, in which case there is no solution)

Recommended Video :

Solved Examples Based on Cramer’s Rule

Example 1: If the system of linear equations

$\begin{gathered} 2 x+y-z=3 \\ x-y-z=\alpha \\ 3 x+3 y+\beta z=3 \end{gathered}$ has infinitely many solution, then $\alpha+\beta-\alpha \beta$ is equal to_________. [JEE MAINS 2021]

Solution:

For infinitely many solutions :

$\Delta = 0= \Delta _{1}= \Delta _{2}= \Delta _{3}$

$\Delta = 0\Rightarrow \begin{vmatrix} 2 & 1 & -1\\ 1& -1 & -1\\ 3& 3 & \beta \end{vmatrix}= 0$
$\Rightarrow 2\left ( -\beta +3 \right )-1\left ( \beta +3 \right )-1\left ( 3+3 \right )= 0$

$\Rightarrow -3\beta -3= 0\Rightarrow \beta = -1$

$\Delta_{1} = 0\Rightarrow \begin{vmatrix} 3 & 1 & -1\\ \alpha & -1 & -1\\ 3& 3 & -1 \end{vmatrix}= 0$

$\Rightarrow 3\left ( 1+3 \right )-1\left ( -\alpha +3 \right )-1\left ( 3\alpha +3 \right )= 0$

$\Rightarrow 12+\alpha -3-3\alpha -3= 0$

$\Rightarrow 2\alpha= 6\Rightarrow \alpha = 3$

$\alpha = 3,\beta = -1$

$\alpha +\beta -\alpha \beta -3-1+3= 5$

Example 2: Two pairs of dice are thrown. The number on them is taken as $\lambda \, and\, \mu ,$ and a system of linear equations

$x+y+z= 5$

$x+2y+3z= \mu$

$x+3y+\lambda z= 1$

is constructed, If $p$ is the probability that the system has a unique solution and q is the probability that the system has no solution, then : [JEE MAINS 2021]

Solution:

For unique solution $\Delta \neq 0$

$\Rightarrow \begin{vmatrix} 1& 1 &1 \\ 1 &2 &3 \\ 1& 3& \lambda \end{vmatrix}\neq0$

$\Rightarrow \lambda\neq 5$
$\therefore p= \frac{5}{6}$

For no solution

$\Delta = 0 \Rightarrow \lambda= 5 \: \: and$

$\Delta_{1} \neq 0 \Rightarrow \begin{vmatrix} 1 & 1 &5 \\ 1& 2 &\mu \\ 1& 3 & 1 \end{vmatrix} \neq 0\Rightarrow \mu\neq3$
$\therefore q= \frac{1}{6}\cdot \frac{5}{6}= \frac{5}{36}$

Example 3: If the following system of linear equations

$\begin{aligned} &2 x+y+z=5 \\ &x-y+z=3 \\ &x+y+a z=b \end{aligned}$
has no solution, then : [JEE MAINS 2021]

Solution

No solution $\Rightarrow \Delta = 0$ and at least one of

$\Delta_{1},\Delta_{2},\Delta_{3}\neq 0$
$\Delta= \begin{vmatrix} 2 & 1 &1 \\ 1& -1 &1 \\ 1 &1 & a \end{vmatrix}= 0$

$\Rightarrow -2a+1+1-2-a= 0\Rightarrow a= \frac{1}{3}$
$\Delta _{3}= \begin{vmatrix} 2 & 1 &5 \\ 1& -1 &3 \\ 1& 1 &b \end{vmatrix}\neq 0$
$\Rightarrow -2b+3+5+5-6-b\neq 0$
$\Rightarrow b\neq \frac{7}{3}$

Example 5: If for some $\alpha \: and\: \beta$ in R, the intersection of the following three planes

$x+4y-2z=1$

$x+7y-5z=\beta$

$x+5y+\alpha z=5$

is a line in $R^{3}$ , then $\alpha +\beta$ is equal to : [JEE MAINS 2020]

Solution

$\begin{array}{l}{\Delta=0 \Rightarrow\left|\begin{array}{ccc}{1} & {4} & {-2} \\ {1} & {7} & {-5} \\ {1} & {5} & {\alpha}\end{array}\right|=0} \\ {(7 \alpha+25)-(4 \alpha+10)+(-20+14)=0} \\ {3 \alpha+9=0 \Rightarrow \alpha=-3}\end{array}$

$\begin{array}{l}{\text { Also }\quad D_{3}=0 \Rightarrow\left|\begin{array}{lll}{1} & {4} & {1} \\ {1} & {7} & {\beta} \\ {1} & {5} & {5}\end{array}\right|=0} \\ {1(35-5 \beta)-(15)+1(4 \beta-7)=0} \\ {\beta=13}\end{array}$

$\alpha+ \beta=10$


Frequently Asked Questions (FAQs)

Q: How does Cramer's Rule relate to the concept of linear operators on vector spaces?
A:
Cramer's Rule can be viewed in terms of linear operators. The coefficient matrix represents a linear operator, and Cramer's Rule provides a way to find the preimage of a vector under this operator. This perspective connects Cramer's Rule to more abstract concepts in functional analysis and operator theory.
Q: What's the connection between Cramer's Rule and Laplace expansion for determinants?
A:
Cramer's Rule and Laplace expansion are closely related. Laplace expansion provides a way to calculate the determinants used in Cramer's Rule by expanding along a row or column. This connection highlights how different techniques in linear algebra are interrelated.
Q: How can Cramer's Rule be used in computer graphics and 3D transformations?
A:
In computer graphics, Cramer's Rule can be used to solve systems of equations arising from 3D transformations, such as finding intersection points of rays with objects or inverting transformation matrices. While not always the most efficient method, it provides a direct formula that can be useful in certain scenarios.
Q: What's the relationship between Cramer's Rule and the rank-nullity theorem?
A:
Cramer's Rule indirectly relates to the rank-nullity theorem. For Cramer's Rule to be applicable, the coefficient matrix must have full rank. The rank-nullity theorem then implies that the nullity is zero, meaning there's a unique solution, which Cramer's Rule provides.
Q: What's the relationship between Cramer's Rule and matrix decomposition methods?
A:
While Cramer's Rule uses determinants directly, matrix decomposition methods like LU decomposition provide alternative ways to solve linear systems. These methods are generally more efficient than Cramer's Rule for larger systems, but Cramer's Rule offers a more direct theoretical connection to determinants.
Q: Can Cramer's Rule be used to solve differential equations?
A:
While Cramer's Rule is primarily for algebraic equations, it can be applied to systems of linear differential equations with constant coefficients. By using the characteristic equation and treating the differential operator as a variable, Cramer's Rule can help find general solutions.
Q: How does Cramer's Rule handle systems with complex eigenvalues?
A:
Cramer's Rule works the same way with complex numbers as it does with real numbers. For systems with complex eigenvalues, the determinants and solutions may be complex, but the rule's application remains unchanged. This makes it useful in areas like electrical engineering and quantum mechanics.
Q: How can Cramer's Rule be used to find the intersection of geometric objects?
A:
Cramer's Rule can be used to find intersections by setting up equations representing the geometric objects (like lines or planes) and solving the resulting system. The solutions given by Cramer's Rule directly provide the coordinates of the intersection points.
Q: What's the connection between Cramer's Rule and the concept of duality in linear algebra?
A:
Cramer's Rule relates to duality through its use of determinants. The rule can be seen as operating in both the primal and dual spaces, with the determinants representing volumes in these spaces. This connection highlights the deep relationship between linear systems and their dual formulations.
Q: How does Cramer's Rule relate to the concept of linear functionals?
A:
Cramer's Rule can be interpreted in terms of linear functionals. The determinants in the rule can be seen as evaluations of linear functionals on the column vectors of the coefficient matrix. This perspective connects Cramer's Rule to more advanced concepts in functional analysis.