Linear Equations Calculator
- Equation 1: 2 × 3 + 1 × (−1) = 5. Matches 5.
- Equation 2: 1 × 3 + (−1) × (−1) = 4. Matches 4.
- Write the system. Equation 1: 2x + y = 5. Equation 2: x − y = 4.
- Find the determinant: D = a₁b₂ − a₂b₁ = 2 × (−1) − 1 × 1 = −3.
- Find Dx = c₁b₂ − c₂b₁ = 5 × (−1) − 4 × 1 = −9, so x = Dx ÷ D = (−9) ÷ (−3) = 3.
- Find Dy = a₁c₂ − a₂c₁ = 2 × 4 − 1 × 5 = 3, so y = Dy ÷ D = 3 ÷ (−3) = −1.
Linear Equations Calculator: Solve Systems of Equations Online
This free linear equations calculator solves a system of two or three equations and shows you exactly how the answer comes about. Type in the coefficients of x, y (and z) and the constant on the right of each equation, and the page returns the solution, the determinant, a check of every equation and the full working. With two equations it also draws both lines, so you can see where they meet.
Quick answer: to solve 2x + y = 5 and x − y = 4, add the two equations to remove y. That gives 3x = 9, so x = 3, and putting this back into the second equation gives y = −1. The calculator reaches the same result and also reports that the determinant is −3, which tells you the answer is unique.
What Is a System of Linear Equations?
A linear equation is an equation where each unknown appears only to the first power, such as 2x + y = 5. On a graph it is a straight line. A system of linear equations is a set of two or more of these equations that must all be true at the same moment. Solving the system means finding the values of the unknowns that make every equation correct. Two lines can cross at one point, run side by side without ever meeting, or lie on top of each other, and these three cases are exactly the three kinds of answer you can get: one solution, no solution, or infinitely many.
How the Calculator Finds the Answer
Two methods work together behind the screen. For the main result the calculator uses Gaussian elimination, which adds multiples of one equation to another until each unknown stands alone. For the working shown on the page it uses Cramer's rule, which writes every unknown as a ratio of two determinants. All of the arithmetic is done with exact fractions, so a result such as 17/11 is never turned into a rounded decimal halfway through.
When D is not zero there is exactly one solution. When D is zero the two lines have the same slope, so they are either parallel (no solution) or the same line (infinitely many). The table below shows one example of each case.
| System | Determinant D | Result |
|---|---|---|
| 2x + y = 5 x − y = 4 | −3 | One solution: x = 3, y = −1 |
| 3x − 2y = 7 5x + 4y = 3 | 22 | One solution: x = 17/11, y = −13/11 |
| x + 2y = 4 2x + 4y = 8 | 0 | Infinitely many solutions (same line) |
| x + y = 2 x + y = 5 | 0 | No solution (parallel lines) |
| 2x + y − z = 8 −3x − y + 2z = −11 −2x + y + 2z = −3 | −1 | One solution: x = 2, y = 3, z = −1 |
Solving Three Equations with Three Unknowns
Many problems in algebra, physics and economics have three unknowns rather than two. Choose the 3 equations mode and enter the coefficients of x, y and z for each row. The calculator finds the determinant of the 3 by 3 coefficient matrix, then replaces each column with the constants to get Dx, Dy and Dz. For the default example the determinant is −1 and the solution is x = 2, y = 3 and z = −1. If the planes do not meet at a single point, you are told whether there is no common point or a whole line or plane of solutions.
Exact Fractions, Decimals and the Graph
Textbook answers are usually fractions, so the calculator shows them that way first and adds a decimal rounded to four places. For 3x − 2y = 7 and 5x + 4y = 3 the exact answer is x = 17/11 and y = −13/11. The graph for two equations adjusts itself to fit the intersection point, and the range slider lets you zoom in or out. If you only need to simplify or compare fractions, the fraction calculator is quicker, and for expressions that go beyond straight lines you can use the math solver.
Limits and Good Practice
This tool handles systems with as many equations as unknowns, up to three. Enter plain numbers, including decimals and negatives, and write each equation in the form ax + by = c first, moving any terms across the equals sign if needed. A coefficient of zero is fine, and it simply means that unknown does not appear in that equation. Always read the check section: it substitutes the solution back into each equation so you can confirm the result yourself.
Who Uses a Linear Equations Calculator?
Students use it to check homework and to see the working behind an answer. Teachers use it to prepare examples quickly. Engineers and scientists use systems of equations for circuits, forces and mixtures, and business owners use them for pricing and break-even problems, such as finding the quantity where cost equals revenue. For general arithmetic alongside your algebra, the scientific calculator and the percentage calculator are handy companions.
How to Use This Linear Equations Calculator
Choose 2 or 3 equations
Pick the number of unknowns. Two equations use x and y, three use x, y and z.
Enter the coefficients
Fill in the number in front of each unknown. Use 0 when an unknown is missing, and a minus sign for negatives.
Add the constants
Type the value on the right side of each equation. The equation is shown above the boxes as you type.
Read the solution
The answer, determinant, graph, check and step-by-step working update as soon as you change a number.