What a 3×3 system is asking, geometrically
Each equation ax + by + cz = d describes a plane in three-dimensional space. Solving the system means finding the points that lie on all three planes at once. That geometric reading tells you immediately why there are exactly three possible answers rather than one.
Three planes in general position meet at a single point, and that point is the unique solution. But planes can be arranged so that no point is common to all three — two of them parallel, or three forming a triangular prism whose faces pairwise intersect in three parallel lines that never coincide. And they can be arranged so that they share more than a point: two planes coinciding, or all three passing through a common line. Those are the inconsistent and dependent cases, and no amount of algebra will produce a single (x, y, z) from either.
The determinant of the coefficient matrix is what distinguishes the first case from the other two. It measures the volume of the parallelepiped spanned by the three coefficient rows, so it is zero exactly when those three direction vectors are coplanar — which is exactly when the three planes fail to pin down a point. A non-zero determinant guarantees a unique solution; a zero determinant guarantees there is not one, and says nothing about which of the two failures you have.
To tell those apart you need the ranks. The rank of a matrix is the number of genuinely independent rows left after elimination. If the coefficient matrix and the augmented matrix (coefficients plus constants) have the same rank, the equations are consistent and the shortfall from three is the number of free parameters in the answer. If attaching the constants raises the rank, elimination has produced a row saying that a non-zero number equals zero, and the system has no solution at all.
Cramer's rule and how the determinants are built
Cramer's rule solves for each unknown independently. Write the coefficient matrix A and the constant vector b. Form three more matrices by replacing one column of A at a time with b: Ax replaces the first column, Ay the second, Az the third. Then
x = det(Aₓ)/det(A) y = det(Aᶐ)/det(A) z = det(A₼)/det(A)
The 3×3 determinant expanded along the first row is
det = a(ei − fh) − b(di − fg) + c(dh − eg)
for the matrix with rows (a b c), (d e f), (g h i). The alternating signs are not decoration; they come from the definition of the determinant as a signed sum over permutations, and getting one of them wrong is the most common hand-calculation error in this subject. If you prefer, the matrix determinant calculator evaluates the same expression on its own.
Cramer's rule is exact, it is easy to check by hand, and it makes the role of the determinant unmistakable — which is why it is taught. It is not what numerical software uses. Solving an n×n system by Cramer's rule costs on the order of n determinant evaluations, which is catastrophically expensive as n grows, while Gaussian elimination solves the whole system in one pass. For three unknowns the difference is irrelevant and the transparency is worth having; for thirty it is not.
This calculator does use elimination for one job: computing the two ranks. Determinants alone cannot distinguish an inconsistent system from a dependent one, because both have det(A) = 0. Elimination with partial pivoting — always choosing the largest available pivot — reduces the augmented matrix to a staircase form in which the two ranks can simply be counted. Partial pivoting matters even at this size, because dividing by a small pivot amplifies rounding error in everything downstream.
Worked example: 2x + y − z = 8, −3x − y + 2z = −11, −2x + y + 2z = −3
Write the coefficient matrix and the constants:
A = [2 1 −1; −3 −1 2; −2 1 2] b = (8, −11, −3)
- det(A). 2[(−1)(2) − (2)(1)] − 1[(−3)(2) − (2)(−2)] + (−1)[(−3)(1) − (−1)(−2)]
= 2(−2 − 2) − 1(−6 + 4) − 1(−3 − 2) = −8 + 2 + 5 = −1. Non-zero, so there is exactly one solution. - det(Aₓ), replacing the first column with the constants: 8[(−1)(2) − (2)(1)] − 1[(−11)(2) − (2)(−3)] + (−1)[(−11)(1) − (−1)(−3)]
= 8(−4) − 1(−22 + 6) − 1(−11 − 3) = −32 + 16 + 14 = −2. - det(Aᶐ), replacing the second column: 2[(−11)(2) − (2)(−3)] − 8[(−3)(2) − (2)(−2)] + (−1)[(−3)(−3) − (−11)(−2)]
= 2(−16) − 8(−2) − 1(9 − 22) = −32 + 16 + 13 = −3. - det(A₼), replacing the third column: 2[(−1)(−3) − (−11)(1)] − 1[(−3)(−3) − (−11)(−2)] + 8[(−3)(1) − (−1)(−2)]
= 2(3 + 11) − 1(9 − 22) + 8(−3 − 2) = 28 + 13 − 40 = 1. - Divide. x = −2 ÷ −1 = 2; y = −3 ÷ −1 = 3; z = 1 ÷ −1 = −1.
Check by substitution, which is the step most people skip and the one that catches sign errors:
- 2(2) + 3 − (−1) = 4 + 3 + 1 = 8. ✓
- −3(2) − 3 + 2(−1) = −6 − 3 − 2 = −11. ✓
- −2(2) + 3 + 2(−1) = −4 + 3 − 2 = −3. ✓
All three residuals are exactly zero, so (2, 3, −1) is the point where the three planes meet.
Reading the determinant, the verdict and the residuals
The determinant's magnitude is only meaningful relative to the coefficients. Multiplying every equation by 10 multiplies det(A) by 1,000 without changing the solution at all, so “det = 0.001” means nothing on its own. What matters is the ratio of the determinant to the cube of the largest coefficient, which is roughly what this calculator tests before warning about conditioning. A system whose determinant is tiny relative to its coefficients has planes meeting at a shallow angle: the solution exists, but small changes in the inputs move it a long way, and the last few digits of the answer are noise.
An inconsistent verdict means the equations contradict each other, not that you mistyped. Adding the first two equations and comparing with the third often shows the contradiction directly. In applications this is usually informative rather than annoying: three sensor readings that cannot all be true point at a calibration problem, and three budget constraints with no feasible point tell you which one to relax.
A dependent verdict means you have fewer independent equations than unknowns. Rank 2 leaves one free parameter, so the solutions form a line; rank 1 leaves two, so they form a plane. The answer is a family, not a point, and reporting any single member of it as “the” solution is wrong. You need another independent equation before a unique answer exists.
The residual table is the honest check. Substituting the solution back into the original equations should reproduce the right-hand sides to within rounding error — typically a residual around 10−15 relative to the coefficient sizes, since that is the resolution of double-precision arithmetic. A residual materially larger than that means cancellation has eaten the precision of the determinants, which happens when coefficients differ by many orders of magnitude. Rescaling each equation so its largest coefficient is about 1 usually fixes it.
What the two ranks tell you about the solution set
| r(A) | r([A|b]) | Geometry of the three planes | Solution set |
|---|---|---|---|
| 3 | 3 | Meet at a single point | One solution |
| 2 | 3 | Prism, or two parallel planes cut by a third | None |
| 2 | 2 | All three share a common line | A line: one free parameter |
| 1 | 2 | Parallel distinct planes | None |
| 1 | 1 | All three are the same plane | A plane: two free parameters |
| 0 | 1 | All coefficients zero, some constant not | None |
| 0 | 0 | Every equation is 0 = 0 | All of space: three free parameters |
Consistency requires r(A) = r([A|b]); the number of free parameters is then 3 − r(A). Only the first row admits Cramer's rule, because it is the only one with det(A) ≠ 0.
Mistakes that produce a confidently wrong answer
- Not putting the system in standard form first. Every equation must read
ax + by + cz = dwith all variables on the left and the constant on the right. An equation like2x + 5 = 3y − zbecomes2x − 3y + z = −5. - Omitting a missing variable instead of entering zero. If an equation has no z term, its z coefficient is 0. Leaving the field at some other value silently solves a different system.
- Dropping the minus sign in the middle term of the determinant. The expansion alternates + − +. This single error accounts for most wrong hand-computed determinants.
- Replacing a row instead of a column when forming Aₓ. Cramer's rule replaces the column corresponding to the unknown you are solving for.
- Reading a near-zero determinant as zero. A determinant of 10−9 from coefficients of order 1 is probably an exactly singular system reported through rounding error, but a determinant of 10−9 from coefficients of order 10−3 is a perfectly ordinary well-conditioned system.
- Reporting one member of an infinite solution set as the answer. A dependent system has a line or plane of solutions; picking a point on it and calling it the solution discards the free parameter.
Other ways to solve the same system, and when to use them
Gaussian elimination is the general-purpose method: use row operations to reach an upper-triangular form, then back-substitute. It handles any size, it tells you the rank as a by-product, and with partial pivoting it is numerically stable. It is what you should use by hand for anything larger than 3×3 and what every numerical library uses internally.
The matrix inverse solves the system as x = A−1b. It is the right tool when you have many different right-hand sides against one fixed coefficient matrix, since the inverse is computed once and reused. For a single solve it is wasteful and less accurate than elimination. The matrix inverse calculator produces A−1, and matrix multiplication applies it to b.
Substitution and elimination by hand remain the fastest route when the numbers are friendly — particularly when one equation already has a variable isolated, as in the textbook system 2y + 5z = −4 with no x at all. For two unknowns the 2×2 simultaneous equations calculator covers the same ground with less bookkeeping, and a single unknown is the linear equation solver.
Two extensions are worth knowing about. When you have more equations than unknowns and no exact solution exists — the usual situation with measured data — the right question changes from “which point satisfies all of them” to “which point minimises the total squared residual”, and the answer is least squares rather than Cramer's rule. And when the system is homogeneous, meaning all three constants are zero, it always has the trivial solution (0, 0, 0); a non-trivial solution exists exactly when det(A) = 0, which is the condition that defines eigenvalues.
