{=

System of Equations Calculator

Solve two or three linear equations together, by elimination or Cramer's rule, with every step in your numbers and exact fractions. It also tells you when there is no solution or infinitely many.

Math & AlgebraRuns in your browser

Result…

Use x and y (and z for three). Like 2x + 3y = 7, x = 4 - y, 0.5x + 2(y - 1) = 3, x/2 + z = 1.

Method

 

…

How it's calculated

Elimination: add multiples of one equation to another until each holds one unknown
Cramer's rule: x = Dx ÷ D, y = Dy ÷ D (z = Dz ÷ D), where D is the determinant of the coefficients and Dx replaces the x column with the right-hand sides

Solves linear systems of two equations in x and y or three in x, y and z. Every number is kept as an exact fraction, so 1/3 stays 1/3 and the steps never round. Elimination (Gauss–Jordan) works in every case and shows the row operations; Cramer's rule uses determinants and only works when the determinant D is not zero. When D is zero there is no single answer: either the equations contradict each other (no solution: parallel lines or planes) or some repeat others (infinitely many, given as a general solution). Decimals are shown to 10 significant figures; equations with powers or unknowns multiplied together are not linear and are refused.

Your numbers, step by step

    About the System of Equations calculator

    This calculator solves two linear equations in x and y, or three in x, y and z, at the same time. Type the equations the way you would write them, one per line, and choose elimination or Cramer's rule. It shows every row operation or determinant with your own numbers, then checks the answer in each equation. All the arithmetic is done in exact fractions, so an answer like 8/7 stays 8/7 instead of becoming a rounded decimal. It also handles the cases that trip people up: when the equations contradict each other there is no solution, and when one equation repeats another there are infinitely many, given as a general solution. Use it to check algebra homework, to solve mixture and pricing problems, or to see how elimination works step by step. For a single equation in x, use the equation solver.

    How to use it

    1. Type one equation per line in “Equations, one per line”, using x and y, or x, y and z for three equations.
    2. Write terms as you would on paper: 2x + 3y = 7, x = 4 − y, or 0.5x + 2(y − 1) = 3. Fractions such as x/2 work too.
    3. Choose “Elimination” to see the row operations, or “Cramer's rule” to see the determinants.
    4. Read the solution, then the checks at the end of the steps, which put the answer back into each equation.

    Worked example

    A farm has 30 animals, chickens (x) and goats (y), with 100 legs in all: x + y = 30 and 2x + 4y = 100. Elimination takes R2 − 2 × R1, leaving 2y = 40, so y = 20, and then x = 30 − 20 = 10. With Cramer's rule, x + 2y = 4 and 3x − y = 2 give D = 1 × (−1) − 2 × 3 = −7, Dx = −8 and Dy = −10, so x = 8/7 and y = 10/7.

    Updated

    Questions people ask

    How do you solve a system of equations by elimination?

    Add or subtract a multiple of one equation from another so that one unknown cancels. Repeat until each equation holds a single unknown, then read off the values. The steps list each operation, such as R2 → R2 − 2 × R1, and the equation it leaves.

    What is Cramer's rule?

    Each unknown equals a ratio of determinants: x = Dx ÷ D, where D is the determinant of the coefficients and Dx is the same determinant with the x column replaced by the right-hand sides. It only works when D is not zero.

    How can a system have no solution or infinitely many?

    Two lines that are parallel never meet, so there is no solution; elimination ends with an impossible row such as 0 = 1. If one equation is a multiple of another, they describe the same line and every point on it works, so there are infinitely many solutions.

    What does a general solution like x = 3 − 2y mean?

    You may pick any value for the free unknown (here y), and the formula gives the matching x. Every such pair satisfies all the equations.

    Why is my equation refused?

    This solves linear systems only. Powers such as x², unknowns multiplied together such as xy, or dividing by an unknown make an equation non-linear. Also check that there is one equals sign per line and as many equations as unknowns.

    Are the answers exact?

    Yes. Every number, including decimals like 0.1, is kept as an exact fraction through the whole calculation. The decimal values are shown alongside, to 10 significant figures.

    More in Math & Algebra