Connect via MCP →

Enter Calculation

Enter the coefficient matrix A row by row and the constants vector b. (3×3 fields are ignored for a 2×2 system.)

Formula

Advertisement

Results

Solution
x = 1, y = 3
Determinant Value
det(A) 5
det(Aₓ) (x) 5
det(Aₕ) (y) 15

What is Cramer's Rule?

Cramer's Rule is a classic algebraic method for solving a system of linear equations using determinants. For a system written as \(A\cdot x = b\), where \(A\) is the square coefficient matrix and \(b\) is the constants vector, each unknown is found by dividing the determinant of a modified matrix by the determinant of \(A\). The method works whenever \(\det(A)\) is not zero, which guarantees a single unique solution.

How to use this calculator

Pick whether your system is 2×2 (two equations, unknowns \(x\) and \(y\)) or 3×3 (three equations, unknowns \(x\), \(y\) and \(z\)). Type the coefficients of matrix \(A\) into the grid, row by row, and the right-hand-side constants into the \(b\) column. Press calculate to see each unknown along with \(\det(A)\) and the replacement determinants \(\det(A_x)\), \(\det(A_y)\) and \(\det(A_z)\). If \(\det(A)\) equals zero, the calculator tells you the system has no unique solution.

The formula explained

To find \(x\), replace column 1 of \(A\) with the vector \(b\) to form \(A_x\), then compute \(x = \det(A_x) / \det(A)\). For \(y\), replace column 2 to get \(A_y\); for \(z\), replace column 3. The denominator \(\det(A)\) is the same for every unknown, so it is computed once.

$$x = \dfrac{D_x}{D},\quad y = \dfrac{D_y}{D} \qquad \text{where}\quad \left\{ \begin{aligned} D &= \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix} \\[0.4em] D_x &= \begin{vmatrix} b_{1} & a_{12} \\ b_{2} & a_{22} \end{vmatrix} \\[0.4em] D_y &= \begin{vmatrix} a_{11} & b_{1} \\ a_{21} & b_{2} \end{vmatrix} \end{aligned} \right.$$
Diagram showing how column i of matrix A is replaced by vector b to form matrix A_i
Cramer's Rule: replace column i of A with vector b to build A_i, then divide determinants.

Worked example

Solve \(2x + y = 5\) and \(x + 3y = 10\). Here $$\det(A) = 2\cdot 3 - 1\cdot 1 = 5.$$ Replacing column 1 with \(b\) gives $$\det(A_x) = 5\cdot 3 - 1\cdot 10 = 5,$$ so \(x = 5/5 = 1\). Replacing column 2 gives $$\det(A_y) = 2\cdot 10 - 5\cdot 1 = 15,$$ so \(y = 15/5 = 3\). The solution is \(x = 1\), \(y = 3\).

Visual of solving a 2x2 system using ratio of two determinants
For a 2×2 system, each unknown equals the ratio of two 2×2 determinants.

FAQ

What if \(\det(A) = 0\)? The system has either no solution or infinitely many; Cramer's Rule cannot give a unique answer, so use Gaussian elimination instead.

Does it work for larger systems? Mathematically yes, but Cramer's Rule becomes computationally expensive beyond 3×3. This tool covers the two most common classroom cases.

Can coefficients be negative or decimal? Yes. Enter any real numbers, including negatives and decimals, in any field.

Last updated: