Cramer’s Rule Calculator

Solve linear systems using determinants. Enter coefficients and constants; get solution via Cramer’s rule with clear steps, previews, and checks.

Equation 1: coefficient of x. Enter any real number.
Equation 1: coefficient of y. Decimals allowed.
Equation 1: coefficient of z. Negative values OK.
Right-hand side of equation 1. Example: x+y+z=6.
Equation 2: coefficient of x. Use 0 if term missing.
Equation 2: coefficient of y. Can be negative.
Equation 2: coefficient of z. Enter any real number.
Right-hand side of equation 2. Example: 2x-y+3z=9.
Equation 3: coefficient of x. Zero allowed.
Equation 3: coefficient of y. Decimals allowed.
Equation 3: coefficient of z. Negative values OK.
Right-hand side of equation 3. Example: -x+4y+z=10.

Equation Preview

1x + 1y + 1z = 6
2x + (-1)y + 3z = 9
-1x + 4y + 1z = 10
Δ = det(A),   Δx = det(A with col x → b), etc.   x = Δx/Δ, y = Δy/Δ, z = Δz/Δ

Helping Notes

  • Enter the 3×3 coefficients and three constants (that’s all Cramer’s rule needs). System must be square. :contentReference[oaicite:1]{index=1}
  • We compute Δ, Δx, Δy, Δz and the solution if Δ ≠ 0. :contentReference[oaicite:2]{index=2}
  • Supports integers or decimals. If Δ = 0, no unique solution (Cramer’s rule not applicable). :contentReference[oaicite:3]{index=3}

Results

Solution (x, y, z)

Determinants

Invertibility Check

System Matrix & Vector

What is a Cramer's Rule Calculator?

A Cramer’s Rule Calculator solves a square linear system \(A\mathbf{x}=\mathbf{b}\) by expressing each unknown as a ratio of determinants. When the coefficient matrix \(A\in\mathbb{R}^{n\times n}\) has nonzero determinant, the system has a unique solution and Cramer’s formula provides it directly: replace the \(i\)-th column of \(A\) by \(\mathbf{b}\) to form \(A_i\), compute \(\det(A_i)\) and \(\det(A)\), and take \(x_i=\det(A_i)/\det(A)\). This method is exact and transparent—ideal for hand checks, teaching, and small systems (2×2 or 3×3). The calculator automates determinant evaluation, shows each column replacement, simplifies rational numbers, and verifies the solution by substituting back into \(A\mathbf{x}\). If \(\det(A)=0\), it diagnoses singularity and indicates whether the system is inconsistent or has infinitely many solutions (requiring rank analysis or parameterization).

About the Cramer's Rule Calculator

Determinants summarize linear dependence and scaling. The calculator computes \(\det(A)\) and, when feasible, symbolic cofactors to preserve exactness with integers or fractions. For 2×2 and 3×3 systems it uses closed-form determinant formulas; for larger but still modest sizes it uses cofactor expansion or efficient algorithms. It then assembles solution components \(x_i=\det(A_i)/\det(A)\), reports simplified fractions and decimals, and includes a check that \(A\mathbf{x}=\mathbf{b}\). Because Cramer’s rule is numerically and computationally expensive for large \(n\), the tool warns about performance and recommends Gaussian elimination for big systems. It also flags common input issues: non-square matrices, mismatched RHS size, and rows or columns that make \(\det(A)=0\) (e.g., proportional rows). For learning, it highlights the relationship to the adjugate formula \(\mathbf{x}=\operatorname{adj}(A)\mathbf{b}/\det(A)\).

How to Use this Cramer's Rule Calculator

  1. Enter the square coefficient matrix \(A=[a_{ij}]\) (rows) and the right-hand side vector \(\mathbf{b}\).
  2. Compute \(\det(A)\). If \(\det(A)\ne0\), the system has a unique solution.
  3. For each unknown \(x_i\), build \(A_i\) by replacing column \(i\) of \(A\) with \(\mathbf{b}\), then compute \(x_i=\dfrac{\det(A_i)}{\det(A)}\).
  4. View the step-by-step expansion, simplified fractions/decimals, and an automatic verification \(A\mathbf{x}=\mathbf{b}\).
  5. If \(\det(A)=0\), read the diagnostic note about inconsistency vs. infinitely many solutions and consider row-reduction.

Core Formulas (LaTeX)

Cramer’s rule (general): \[ A\mathbf{x}=\mathbf{b},\quad \det(A)\ne0,\quad x_i=\frac{\det(A_i)}{\det(A)},\ \ A_i:\ \text{replace column }i\text{ of }A\text{ by }\mathbf{b}. \]

2×2 system: For \(A=\begin{bmatrix}a&b\\ c&d\end{bmatrix}\), \(\mathbf{b}=\begin{bmatrix}e\\ f\end{bmatrix}\), \[ \Delta=\det(A)=ad-bc,\quad x=\frac{\det\!\begin{bmatrix}e&b\\ f&d\end{bmatrix}}{\Delta}=\frac{ed-bf}{\Delta},\quad y=\frac{\det\!\begin{bmatrix}a&e\\ c&f\end{bmatrix}}{\Delta}=\frac{af-ec}{\Delta}. \]

3×3 determinant (cofactor form): \[ \det(A)=a_{11}M_{11}-a_{12}M_{12}+a_{13}M_{13},\quad M_{ij}=\det(\text{minor of }a_{ij}). \]

Adjugate relation: \[ A^{-1}=\frac{\operatorname{adj}(A)}{\det(A)},\qquad \mathbf{x}=A^{-1}\mathbf{b}=\frac{\operatorname{adj}(A)\mathbf{b}}{\det(A)}. \]

Examples (Illustrative)

Example 1 — 2×2 system

\(2x+3y=7,\ -x+4y=5\). \(\Delta=2\cdot4-3(-1)=11\). \(x=\dfrac{\det\!\begin{bmatrix}7&3\\ 5&4\end{bmatrix}}{11}=\dfrac{28-15}{11}=\dfrac{13}{11}\), \quad \(y=\dfrac{\det\!\begin{bmatrix}2&7\\ -1&5\end{bmatrix}}{11}=\dfrac{10+7}{11}=\dfrac{17}{11}\).

Example 2 — 3×3 system

\(\begin{cases} x+y+z=6\\ 2x-y+3z=14\\ -x+4y+z=9 \end{cases}\), \(A=\begin{bmatrix}1&1&1\\2&-1&3\\-1&4&1\end{bmatrix}\), \(\det(A)=-11\). \(\det(A_x)=0,\ \det(A_y)=-11,\ \det(A_z)=-55\Rightarrow (x,y,z)=\big(0,\ 1,\ 5\big).\)

Example 3 — Singular 2×2 (no unique solution)

\(2x+4y=8,\ x+2y=4\Rightarrow A=\begin{bmatrix}2&4\\1&2\end{bmatrix}\) with \(\det(A)=0\). Columns are proportional \(\Rightarrow\) infinitely many solutions (or none if RHS inconsistent). Cramer’s rule not applicable.

FAQs

When can I use Cramer’s rule?

Only for square systems with \(\det(A)\ne0\). If \(\det(A)=0\), use row reduction to analyze solutions.

Is Cramer’s rule efficient for large systems?

No. It’s best for small systems (2×2, 3×3). Use elimination or LU for larger \(n\).

What if I get fractions?

That’s normal. The calculator returns exact rational results and decimal approximations.

How do I verify the solution?

Substitute \(\mathbf{x}\) back into \(A\mathbf{x}\) and confirm it equals \(\mathbf{b}\); the tool shows this check.

Can I solve complex-valued systems?

Yes—the same formulas hold using complex determinants and conjugation where appropriate.

What causes \(\det(A)=0\)?

Linearly dependent rows/columns (e.g., proportional rows) make \(A\) singular, eliminating uniqueness.

More Math & Algebra Calculators