↑↓ to move ↵ to open Esc to close Browse all tools

System of Equations Solver

Type your equations, like 2x + 3y = 7, or fill in a coefficient grid. Get the exact solution with every elimination step, Cramer’s rule for 2 and 3 unknowns, and a clear answer for no or infinitely many solutions.

Your system

Use letters like x, y, z and w. Coefficients can be fractions or decimals, like 1/2x, 0.5y or z/3.
Show results as
One solution

Try an example

Gaussian elimination, step by step

    Runs on your device. Nothing you enter is sent to a server.

    System of Equations Solver by Freebiefy, free online tools

    Embed this tool on your site

    Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

    One, none or infinitely many solutions

    A system of linear equations, also called simultaneous equations, always has exactly one of three outcomes, no matter how many equations and unknowns it has: no solution, exactly one solution, or infinitely many solutions. With two unknowns you can picture it: each equation is a line, and two lines either cross once, run parallel, or lie on top of each other. Elimination tells you which case you have.

    After eliminationOutcome
    A row 0 = c with c not 0No solution: the equations contradict each other
    A pivot for every unknownExactly one solution
    An unknown without a pivot, no contradictionInfinitely many: that unknown is free

    How Gaussian elimination works

    Write the system as an augmented matrix: one row per equation, one column per unknown, and the constants after a bar. Three row operations change the numbers but never the solutions: swap two rows, multiply a row by a number that is not 0, and add a multiple of one row to another. Use them to clear everything below each pivot, column by column, until the matrix has a staircase shape. Then work back up: scale each pivot to 1 and clear the entries above it, and the solution stands in the last column.

    Worked example

    Solve 2x + y − z = 8, −3x − y + 2z = −11 and −2x + y + 2z = −3. The augmented matrix is [2 1 −1 | 8; −3 −1 2 | −11; −2 1 2 | −3].

    1. Pivot 2 in column 1. Add 3/2 of row 1 to row 2 and add row 1 to row 3: the rows become [0 1/2 1/2 | 1] and [0 2 1 | 5].
    2. Pivot 1/2 in column 2. Subtract 4 times row 2 from row 3: [0 0 −1 | 1]. The staircase is complete, with three pivots, so there is exactly one solution.
    3. Back substitution: row 3 gives z = −1. Row 2 then gives y/2 − 1/2 = 1, so y = 3. Row 1 gives 2x + 3 + 1 = 8, so x = 2.

    The solution is x = 2, y = 3, z = −1. Put it back in to check: 2·2 + 3 − (−1) = 8.

    Cramer’s rule

    For a square system with a nonzero determinant there is a formula for each unknown. Let D be the determinant of the coefficient matrix and Dx the determinant with the x column replaced by the constants; then x = Dx ÷ D, and the same for y and z.

    Cramer’s rule
    xⱼ = det(Bⱼ) ÷ det(A)
    Bⱼ is A with column j replaced by the right-hand side b. It only applies when det(A) ≠ 0.

    In the example above D = −1, Dx = −2, Dy = −3 and Dz = 1, so x = −2 ÷ (−1) = 2, y = 3 and z = −1, the same answer. When D = 0 the rule does not apply: the system then has no solution or infinitely many, and only elimination tells you which. The matrix calculator shows how each determinant is computed.

    Writing infinitely many solutions

    Take x + 2y − z = 3 and 2x + 4y + z = 9. Subtracting twice the first equation from the second gives 3z = 3, so z = 1. Column 2 gets no pivot, which makes y a free unknown. Set y = t; then x = 3 − 2t + z = 4 − 2t. Every solution has the form (x, y, z) = (4, 0, 1) + t(−2, 1, 0) for some number t. With two free unknowns the solver uses t and s, and so on.

    Tips for typing equations

    • Write products without a sign or with *: 3x and 3*x are the same. A fraction in front can be written 1/2x or (1/2)x, or put the divisor after the letter: x/2.
    • Constants can stand on either side: 2x + 3 = y works and becomes 2x − y = −3.
    • Indexed unknowns like x1, x2, x3 work too, and they are put in number order.
    • Only linear equations: no products of unknowns like xy and no powers like x². For a single quadratic equation use the quadratic equation solver.

    How to use the system of equations solver

    1. 1Type one equation per line, or choose Coefficient grid and fill in the numbers in front of each unknown and the constants after the = sign.
    2. 2Read the solution at the top: one solution, no solution, or a parametric form for infinitely many solutions.
    3. 3Follow the elimination steps, compare with Cramer’s rule for 2 or 3 unknowns, and see the check by substitution.
    4. 4Switch between Fractions and Decimals, then press Copy result to copy the solution with the steps or Copy link to share the system.

    Sources

    Frequently asked questions

    How do I type the equations?

    One equation per line, like 2x + 3y = 7. You can also separate them with semicolons, or with commas when every equation has its own = sign. Coefficients can be whole numbers, decimals or fractions: 1/2x, 0.5x and x/2 all mean half of x. Terms may stand on both sides of the = sign, and the solver collects them for you.

    How do I know if a system has no solution or infinitely many?

    Eliminate until the matrix is in echelon form. A row that reads 0 = 5 (all coefficients 0 but a nonzero constant) means the equations contradict each other, so there is no solution. Otherwise, if every unknown has a pivot, there is exactly one solution. If some unknown has no pivot, it is free and the system has infinitely many solutions.

    What does the parametric form mean?

    With infinitely many solutions, the free unknowns can take any value. The solver names them t, s, r and u and writes every other unknown in terms of them, for example x = 4 − 2t, y = t, z = 1. Each value of t gives one solution: t = 0 gives (4, 0, 1) and t = 1 gives (2, 1, 1).

    When can I use Cramer’s rule?

    Cramer’s rule works when there are as many equations as unknowns and the determinant D of the coefficient matrix is not 0. Then each unknown is a ratio of two determinants: x = Dx ÷ D, where Dx is D with the x column replaced by the constants. The solver shows it for 2 and 3 unknowns. For larger systems elimination needs far less work.

    Can there be more equations than unknowns?

    Yes. The solver takes up to 6 equations with up to 4 unknowns. Extra equations either repeat information, and turn into rows of zeros during elimination, or contradict the others, and then the system has no solution.

    Why does the solver show fractions?

    It works with exact fractions from start to finish, so a solution like x = 7/5 is exact and not a rounded 1.4000001. Switch the display to decimals if you prefer; values that do not end are then rounded to four places.