Cramers Rule Calculator - 3x3 Systems by Determinant
Use this Cramer's rule calculator to enter a 3x3 coefficient matrix and a constants vector, then read x, y, z from the four determinants D, Dx, Dy, Dz.
Cramers Rule Calculator
Results
What Is a Cramer's Rule Calculator?
A Cramer's rule calculator solves a square linear system A x = b by turning it into four scalar determinants: the main determinant D of A and the three Cramer determinants Dx, Dy, Dz from replacing each column of A with the constants vector b. Type the nine entries of A and the three entries of b, and the page returns the four determinants and the unique solution x = Dx / D, y = Dy / D, z = Dz / D.
- • Linear-algebra homework and 3x3 system drills: Confirm a problem that asks for the unique solution of a 3x3 system A x = b and show the four determinants that justify the answer.
- • Cross-checking matrix-inverse and elimination answers: Solve the same system with Cramer's rule to check a result from row reduction, the matrix inverse, or a numerical solver.
- • Detecting singular matrices and rank problems: Use the main determinant D to spot a singular coefficient matrix in a 3x3 system before a long elimination.
Cramer's rule is the determinant-based cousin of the matrix-inverse approach: where the inverse method writes x = A⁻¹ b, Cramer's rule replaces the inverse step with three small determinants that you can compute by hand or with the rule of Sarrus.
To solve the same 3x3 system with x = A⁻¹ b, the Matrix Inverse Calculator page runs the matrix inverse on the same nine entries and returns the solution from a single inverse step.
How the Cramer's Rule Calculator Works
The page takes the twelve inputs, builds the main determinant D and the three Cramer determinants Dx, Dy, Dz, and divides each Cramer determinant by D whenever D is non-zero. If D comes out as zero, the system has no unique solution and the page returns a singular-matrix message.
- a11, a12, a13: First row of the 3x3 coefficient matrix A.
- a21, a22, a23: Second row of A.
- a31, a32, a33: Third row of A.
- b1, b2, b3: Right-hand-side constants of the three equations.
- D = det(A): Main determinant of A, computed by the rule of Sarrus or a cofactor expansion.
- Dx, Dy, Dz: Determinants of A with column 1, 2, or 3 replaced by the column vector b.
The page uses the standard cofactor expansion along the first row for every determinant, so D, Dx, Dy, and Dz share the same arithmetic. Swap any two rows of the augmented matrix [A | b] and D and every Cramer determinant flip sign, so each ratio Di / D and the solution x, y, z stays the same; this matches the row-swap sign rule the existing determinant calculator shows on its worked example card.
Worked example: 2x + y + 3z = 6, x + 2y + z = 4, 3x + y + 2z = 6
A = [[2, 1, 3], [1, 2, 1], [3, 1, 2]] and b = [6, 4, 6].
D = 2*(2*2 - 1*1) - 1*(1*2 - 1*3) + 3*(1*1 - 2*3) = 6 + 1 - 15 = -8. Dx = Dy = Dz = -8 from the same cofactor expansion.
D = Dx = Dy = Dz = -8, x = y = z = 1.
Three equal Cramer determinants cancel with the main determinant for a clean integer solution, which is why this 2x + y + 3z system is a favorite textbook example.
According to Encyclopaedia Britannica, Cramer's rule solves A x = b by computing the main determinant D of A and three Cramer determinants Dx, Dy, Dz, then setting x = Dx / D, y = Dy / D, and z = Dz / D whenever D is non-zero.
When the same 3x3 matrix shows up elsewhere and you only need the scalar det(A), the Determinant Calculator page returns the determinant with the Sarrus pattern and the Laplace cofactor expansion.
Key Concepts Behind Cramer's Rule
Four ideas explain why Cramer's rule works and when it returns a clean answer or fails.
Main determinant D = det(A)
The main determinant is the scalar det(A) of the 3x3 coefficient matrix. The same determinant powers the rule of Sarrus, the Laplace cofactor expansion, and the singular-matrix test.
Cramer determinants Dx, Dy, Dz
A Cramer determinant is the determinant of A with the matching column replaced by b. Dx replaces column 1, Dy replaces column 2, and Dz replaces column 3.
Singular vs non-singular systems
When D is non-zero, A x = b has a unique solution xi = Di / D. When D = 0, the system is singular and the rule cannot return a single answer.
Cramer's rule for 2x2 systems
For A = [[a, b], [c, d]] and b = [e, f], the rule gives D = ad - bc, Dx = ed - bf, Dy = af - ec, and the solution is x = Dx / D, y = Dy / D.
The cofactor expansion the calculator uses for each 3x3 determinant is the same expansion the cofactor matrix page shows row by row, so a cofactor breakdown is one click away.
If a textbook asks for a cofactor-by-cofactor breakdown of the main determinant or a Cramer determinant, the Cofactor Matrix Calculator page shows the cofactor expansion row by row on the same matrix.
How to Use This Cramer's Rule Calculator
Five short steps cover every common 3x3 case, from a clean textbook example to a singular matrix.
- 1 Enter the first row of A: Type a11, a12, and a13. The default is 2, 1, 3, the first row of the worked example.
- 2 Enter the second and third rows of A: Fill in a21, a22, a23 and then a31, a32, a33. Read the matrix row by row, then check the layout before moving to the constants.
- 3 Enter the constants b1, b2, b3: Type the right-hand side of the three equations. The default 6, 4, 6 are the worked-example constants, so the page starts as a solved Cramer's rule problem with x = y = z = 1.
- 4 Read x, y, z and the four determinants: The primary outputs are x, y, and z. The page also returns D = det(A) and the three Cramer determinants Dx, Dy, Dz so you can verify the xi = Di / D step.
- 5 Reset or paste in a new system: Click Reset to return to the worked example. If D = 0, the page shows a singular-matrix message instead of x, y, z.
Try the system 3x + 2y = 7, x + 4y = 9, z = 0: set a33 = 1 and a31, a32, b3 = 0. The page reports D = 10, Dx = 10, Dy = 20, Dz = 0, and the 2x2 reduction x = 1, y = 2, z = 0.
Once you have x, y, z from the Cramer's rule page, the Matrix Multiplication Calculator tool can sanity-check the answer by multiplying A back into the vector and confirming that the product equals b.
Benefits of Using This Cramer's Rule Calculator
These benefits matter most when you want a quick, transparent check of a 3x3 system without paper.
- • Skip the four-determinant arithmetic: A 3x3 Cramer's rule problem asks for four scalar determinants and three divisions. The calculator handles all four with the same cofactor expansion, so you can focus on setting up the system.
- • See the full xi = Di / D breakdown: The page shows D, Dx, Dy, Dz, and the final x, y, z in one place, which makes it a good way to check your own Cramer's rule work.
- • Catch singular matrices before they bite you: When two rows of A are linearly dependent, D = 0 and the page returns a singular-matrix message instead of a misleading finite x, y, z.
- • Cross-check a matrix-inverse or row-reduction answer: If you solved the same system with the matrix inverse or Gaussian elimination, the Cramer's rule numbers should match, and the matrix-rank calculator can confirm the rank that D = 0 implies.
Use the page as a check, not as a replacement for understanding the method.
If the page shows a singular-matrix message because D = 0, the Matrix Rank Calculator page confirms the rank that D = 0 implies and tells you whether the system has no solution or infinitely many.
Factors That Affect a Cramer's Rule Result
Cramer's rule is the same formula in every case, but a few factors change what the result means.
Sign of the determinant
Swapping two rows of the augmented matrix [A | b] (swapping two equations together with their constants) flips the sign of D and every Cramer determinant, so each ratio Di / D and the whole solution x, y, z stays the same. Swapping only the rows of A while leaving b fixed is a different system, and the solution can change.
Zero or near-zero main determinant
When D is exactly zero, the system is singular and the matrix inverse does not exist, so the rule cannot return a single answer. When D is non-zero but very small, rounding in the four determinants can shift the fourth decimal of x, y, z.
Negative entries in A or b
Negative entries in A or b are no problem. The cofactor expansion carries the sign of every entry, so the four determinants and three solutions come out as signed real numbers.
Decimal entries and large magnitudes
Decimal entries and large magnitudes on the same row are fine. The page keeps full double precision for every determinant and rounds only for display.
- • This page is the 3x3 Cramer's rule case only. For a 2x2 system, use the standard ad - bc shortcut or pair this page with the existing determinant calculator.
- • Cramer's rule requires D to be non-zero. When D = 0, the rule returns no unique x, y, z, and the matrix inverse does not exist either; use row reduction (Gaussian elimination) or rank analysis on the augmented matrix [A | b] to characterize the solutions.
According to Wolfram MathWorld, Cramer's rule expresses the solution of a square linear system A x = b as a ratio of determinants, with xi = det(A_i) / det(A), and requires det(A) to be non-zero for a unique solution.
To express one row of A as a linear combination of the other two to explain why D = 0, the Linear Combination Calculator page solves the matching system on the same 3x3 input.
Frequently Asked Questions
Q: What is Cramer's rule?
A: Cramer's rule is a determinant-based way to solve a square linear system A x = b. It computes the main determinant D of the coefficient matrix A, computes the Cramer determinants Dx, Dy, Dz that come from replacing each column of A with the constants vector b, and returns x = Dx / D, y = Dy / D, z = Dz / D whenever D is non-zero.
Q: How do you solve a 3x3 system of equations using Cramer's rule?
A: Write the system as A x = b with a 3x3 coefficient matrix A and a 3x1 constants vector b. Compute the main determinant D of A, then compute Dx, Dy, and Dz by replacing column 1, column 2, and column 3 of A with b. The unique solution is x = Dx / D, y = Dy / D, z = Dz / D, and the rule only works when D is not zero.
Q: What is the formula for Cramer's rule?
A: The formula is x = Dx / D, y = Dy / D, z = Dz / D, where D is the main determinant of A, and Dx, Dy, Dz are the determinants of A with the matching column replaced by the constants vector b. The rule returns a unique answer only when D is non-zero.
Q: What happens when the determinant is zero in Cramer's rule?
A: When D is exactly zero, A is singular and has no inverse, so Cramer's rule cannot return a single answer; the system A x = b has either no solutions or infinitely many. In that case use row reduction or rank analysis on the augmented matrix [A | b] to decide which case holds.
Q: Can Cramer's rule solve a 2x2 system of equations?
A: Yes. For A = [[a, b], [c, d]] and b = [e, f], the rule gives D = ad - bc, Dx = ed - bf, Dy = af - ec, and the solution is x = Dx / D, y = Dy / D. To reuse this 3x3 calculator for a 2x2 case, set a13 = a23 = 0, a31 = a32 = 0, a33 = 1, and b3 = 0 to embed the 2x2 system on the top-left.
Q: Is Cramer's rule the same as using the matrix inverse?
A: Both methods solve the same square linear system A x = b and give the same answer when D is non-zero. The matrix-inverse approach uses x = A⁻¹ b, while Cramer's rule uses xi = Di / D and only needs the four determinants, not the full inverse matrix.