What this calculator does
This tool solves a system of n linear equations in n unknowns, written compactly as \(\mathbf{A}\cdot\mathbf{x} = \mathbf{b}\), where A is an n×n coefficient matrix, x is the unknown vector, and b is the constant vector. It returns the unique solution vector x together with the determinant of A. The method is pure linear algebra and works identically anywhere — there is no country or unit dependence; every entry is just a real number.
How to use it
Set n (the number of equations and unknowns). Type the coefficient matrix A one row per line, with numbers separated by spaces or commas, then enter the constant vector b as a length-n list. Pick a display precision and solve. Negative, decimal and fractional-looking decimals are all accepted. If A has the same number of rows and columns as n and b matches that length, you get the solution; otherwise the tool reports a dimension mismatch.
The method explained
The solver performs Gaussian elimination with partial pivoting, which is mathematically equivalent to the LU decomposition PA = LU. For each column it selects the largest-magnitude available pivot to keep the arithmetic numerically stable, eliminates the entries below the pivot, and then back-substitutes from the last unknown upward. If a pivot is effectively zero, the determinant is zero, the matrix is singular, and the system has no unique solution — the tool flags this instead of dividing by zero.
$$\begin{gathered} \mathbf{A}\,\mathbf{x} = \mathbf{b}, \qquad \mathbf{A} = \mathbf{L}\mathbf{U} \\[1.5em] \text{solve}\quad \left\{ \begin{aligned} \mathbf{L}\mathbf{y} &= \mathbf{b} \quad(\text{forward}) \\ \mathbf{U}\mathbf{x} &= \mathbf{y} \quad(\text{back substitution}) \end{aligned} \right. \end{gathered}$$ $$\det(\mathbf{A}) = (-1)^{s}\prod_{k=1}^{n} u_{kk}$$
Worked example
Consider \(2x + y - z = 8\), \(-3x - y + 2z = -11\), \(-2x + y + 2z = -3\). So \(\mathbf{A} = [[2,1,-1],[-3,-1,2],[-2,1,2]]\) and \(\mathbf{b} = [8,-11,-3]\). Elimination yields \(x = 2\), \(y = 3\), \(z = -1\). Checking the first equation:
$$2(2) + 3 - (-1) = 4 + 3 + 1 = 8$$Correct.
FAQ
What if the determinant is zero? The matrix is singular, meaning the equations are dependent or inconsistent; there is no single solution, so the calculator reports a singular matrix.
Why partial pivoting? Choosing the largest pivot avoids amplifying rounding error, giving accurate results even for awkward matrices.
Can the solution be non-integer? Yes. Solutions are computed in floating point and may be decimals; the display precision setting controls how many significant figures are shown.