Systems of Linear Equations
The calculator solves systems of 2 and 3 linear equations by Cramer's rule, Gaussian elimination and the inverse matrix method with exact fractions.
The system of linear equations solver solves systems of two or three equations by Cramer's rule, Gaussian elimination or the inverse matrix method. All calculations use exact fractions, every step is shown and the answer is checked by substitution. The calculator also detects systems with no solutions or infinitely many.
Cramer's rule
Find the main determinant Δ from the coefficients of the unknowns. If Δ ≠ 0, replace the column of coefficients of x, y, z in turn with the column of constants to get the determinants Δx, Δy, Δz:
x = Δx/Δ, y = Δy/Δ, z = Δz/Δ
Example. 3x + 2y = 7, x − y = −1
Δ = 3 · (−1) − 2 · 1 = −5; Δx = 7 · (−1) − 2 · (−1) = −5; Δy = 3 · (−1) − 7 · 1 = −10
x = −5 / (−5) = 1, y = −10 / (−5) = 2
Gaussian elimination
Write the augmented matrix of the system and bring it to row echelon form: subtract multiples of upper rows from the rows below until there are zeros under the main diagonal. Then use back substitution to find the unknowns from the bottom up. Gaussian elimination always works — when the solution is unique, when there is none and when there are infinitely many.
Inverse matrix method
Write the system as A · X = B, where A is the coefficient matrix, X is the column of unknowns and B is the column of constants. If det A ≠ 0, the solution is X = A−1 · B. The inverse is found using cofactors: A−1 = 1/det A · (C)T, where C is the cofactor matrix.
How many solutions a system has
- Δ ≠ 0 — exactly one solution.
- Δ = 0 — either no solutions (the system is inconsistent) or infinitely many. Gaussian elimination tells which: a row "0 = number" means no solutions; a row "0 = 0" means infinitely many.