UTILS.
100% in-browser
🔢

System of Linear Equations Solver

Solve 2x2 and 3x3 systems of linear equations with Cramer's rule, showing x, y, z, the determinant and the solution type.

About this tool

Solve a system of two or three linear equations in two or three unknowns. Pick 2x2 or 3x3, type the coefficients, and the solver returns the values of x, y (and z), the determinant of the coefficient matrix, and whether the system has a unique solution, no solution, or infinitely many. Everything runs locally in your browser and updates as you type.

The method is Cramer's rule. For a 2x2 system a1x+b1y=c1, a2x+b2y=c2 the main determinant is D = a1b2 - a2b1, then x = (c1b2 - c2b1)/D and y = (a1c2 - a2c1)/D. The 3x3 case replaces each column of the coefficient matrix with the constants and divides that determinant by D. When D = 0 the system is not uniquely solvable, and the tool inspects the replaced-column determinants to tell a dependent (infinitely many) system apart from an inconsistent (no solution) one.

Enter each coefficient exactly as it appears, using negative numbers where needed. Rearrange your equations into the ax + by = c form first so the columns line up with the input boxes.

Frequently asked questions

What does the determinant tell me?
The determinant D of the coefficient matrix must be non-zero for a single unique solution. If D = 0 the lines or planes are parallel or coincident, so there is either no solution or infinitely many.
How does it decide between no solution and infinitely many?
When D = 0 it also computes the numerator determinants (columns replaced by the constants). If those are all zero the system is dependent with infinitely many solutions; otherwise it is inconsistent and has no solution.
Do my equations need to be in a particular form?
Yes. Write each equation as ax + by = c (and ax + by + cz = d for 3x3) so the x, y and z coefficients and the constant go into the matching boxes.
Is my input sent anywhere?
No. The whole calculation happens in your browser with plain JavaScript, so nothing you type is uploaded or stored.

More tools