Category

Cramer's Rule Calculator — Solve 2×2 and 3×3 Systems with Determinants

Solve 2- and 3-variable linear systems using Cramer's rule and determinants. See the coefficient determinant D, each replaced-column determinant, the division for every variable, and a substitution check. Supports metric, US imperial, and 12 world currencies including USD and Russian Ruble.

0 calculations

Calculation Parameters

Enter the coefficients and the right-hand side of each equation (decimals or fractions like 3/4 are allowed):

x + y + z =
x + y + z =

Enter Parameters

Fill in the form on the left and click "Calculate"

Welcome to the Cramer's rule calculator, a quick and easy 2- and 3-variable system of equations solver. Together, we'll learn how to construct a coefficient matrix and then use determinants to solve systems of equations. You might have already seen one or two different ways to tackle similar problems — but here we'll convince you that Cramer's rule for 3×3 matrices is almost as easy as Cramer's rule for 2×2 matrices (which is super easy)!

So, would you like to learn how to solve systems of equations with a matrix or two — without any substitution, elimination, or drawing graphs, just simple arithmetic? Let's go.

What is a system of equations?

You know how not everything in life is known, or easy to describe? Like how fast the universe expands, how much you can save on Black Friday, or how many apples Mr. Smith bought if he paid $3.50 and one costs $0.50? Whenever we don't know some number explicitly but can describe it in relation to other numbers, we obtain an equation.

For example, "the cost of one apple × $0.50 = $3.50" describes a value we'd like to find. We usually call such an unknown a variable and denote it by a single letter, say x. The equation then looks like x × 0.50 = 3.50, and we can easily calculate that Mr. Smith bought seven apples.

But life is not always that easy. If Mr. Smith also wants to buy oranges, a new unknown enters the picture and we introduce a second variable, say y. With more information the problem becomes solvable again. For instance, if on one occasion he bought 7 apples and 3 oranges and paid $5.60, and on another he bought 1 apple and 5 oranges and paid $4.00, that is enough to compute the price of each. We can write two equations (one per shopping trip) with two variables — and we call this a system of equations.

In general, a system of equations is a collection of equations with a few variables, and we want to find numbers that satisfy all of them at once.

Using matrices to solve systems of equations

Consider a travelling-themed problem written with three variables — let x denote a bike, y a car, and z a plane:

x + y + z = 26
y − 2z = 6
2x − z = 12

We have three equations and three variables, so our goal is to use Cramer's rule for 3×3 matrices. First we construct the coefficient matrix — an array with one row per equation and one column per variable (the first column for x, the second for y, the third for z). Where a variable is missing from an equation, its coefficient is simply zero:

A = [ 1 1 1 ; 0 1 −2 ; 2 0 −1 ]

Attaching the right-hand side b = (26, 6, 12) as an extra column gives the augmented matrix [A | b]. Cramer's rule works directly from these numbers using determinants — no row reduction required.

Cramer's rule for 2×2 and 3×3 systems

Cramer's rule expresses each variable as a ratio of two determinants. Let D = det(A) be the determinant of the coefficient matrix. For each variable, form a new matrix by replacing that variable's column with the right-hand-side vector b, and take its determinant.

2×2 system — for a₁₁x + a₁₂y = b₁, a₂₁x + a₂₂y = b₂:

D = a₁₁·a₂₂ − a₁₂·a₂₁
Dₓ = b₁·a₂₂ − a₁₂·b₂D_y = a₁₁·b₂ − b₁·a₂₁
x = Dₓ / Dy = D_y / D

3×3 system — the same idea with three replaced-column determinants:

x = Dₓ / Dy = D_y / Dz = D_z / D

The key requirement is that D ≠ 0. If the main determinant is non-zero, the system has exactly one solution. If D = 0, Cramer's rule cannot give a single answer: the system either has no solution (when some replaced-column determinant is non-zero) or infinitely many solutions (when every one of them is zero as well).

Example: using the Cramer's rule calculator

Let's solve the 2×2 system:

2x + 3y = 8
x − y = −1

  1. Choose 2 variables (2×2) as the system size.
  2. Enter the first equation's coefficients: 2, 3, and the right-hand side 8.
  3. Enter the second equation's coefficients: 1, −1, and the right-hand side −1.
  4. Read the answer: x = 1, y = 2. The calculator also shows the main determinant D, each determinant Dₓ and D_y with the replaced column highlighted, the division that produces each variable, and a substitution check.

Frequently Asked Questions

When can I use Cramer's rule?

Only for a square system — the same number of equations as variables — whose coefficient determinant D is not zero. This calculator handles 2×2 and 3×3 systems. If D = 0, use Gaussian elimination instead, as the system then has no unique solution.

What does it mean when D = 0?

The coefficient matrix is singular, so Cramer's rule breaks down. The system is either inconsistent (no solution) or dependent (infinitely many solutions). The calculator inspects the replaced-column determinants and tells you which case you're in.

Can I enter fractions or decimals?

Yes. You can type decimals like 0.5, negative numbers like −3, or simple fractions such as 3/4 in any coefficient field.

Does the unit or currency setting change the math?

No — the algebra is identical. The unit selector (metric such as meters or kilograms, US customary such as feet or pounds, or one of 12 world currencies including the US dollar and the Russian ruble) simply labels the solved values so the answer reads in the units your problem is stated in.

How is Cramer's rule different from Gaussian elimination?

Gaussian elimination row-reduces the augmented matrix step by step, while Cramer's rule computes the answer directly as ratios of determinants. Cramer's rule is elegant and easy to remember for small systems, but for large systems it is far slower than elimination.

Calculation History

Loading...