Linear Equation Solver
1 Variable · 2×2 Systems · 3×3 Systems · Fractions
Solve linear equations step by step — single variable, simultaneous 2-variable and 3-variable systems. Includes substitution, elimination, Cramer's rule, Gaussian elimination, and graph.
Quick Examples
Equation: ax + b = c
Solves: ax + b = c → x = (c − b) / a
Equations: a&sub1;x + b&sub1;y = c&sub1; and a&sub2;x + b&sub2;y = c&sub2;
3×3 System: ax + by + cz = d
Equation: (p/q)x + r = (s/t)x + u — Enter numerators/denominators
Left side: (n1/d1)x + c1
Right side: (n2/d2)x + c2
Solves: (n1/d1)x + c1 = (n2/d2)x + c2 → multiply by LCD to clear fractions
Step-by-Step Solution
Verification
Graph — Both Lines & Intersection
Gaussian Elimination — Step-by-Step
What Is a Linear Equation?
A linear equation is an algebraic equation where each term is either a constant or the product of a constant and a single variable raised to the first power. The graph of a linear equation in two variables is always a straight line, which is why these equations are called "linear." Linear equations are fundamental to algebra, calculus, physics, economics, and virtually every quantitative field.
The general form of a single-variable linear equation is ax + b = c, where a, b, and c are constants and x is the unknown. For two variables: a₁x + b₁y = c₁. For three variables: ax + by + cz = d. When multiple linear equations are solved simultaneously, the collection is called a system of linear equations.
Types of Linear Equation Systems
1. Consistent System (Unique Solution)
A system has exactly one solution when the determinant of the coefficient matrix is non-zero. Two lines in a 2×2 system intersect at exactly one point. This is the most common case and yields a specific numerical answer for each variable.
2. Inconsistent System (No Solution)
A system has no solution when the equations represent parallel lines (in 2D) or parallel planes (in 3D) that never intersect. The coefficient determinant equals zero but at least one equation is contradictory. Example: x + y = 3 and x + y = 5 have no solution.
3. Dependent System (Infinitely Many Solutions)
A system has infinitely many solutions when one or more equations are multiples of another, representing the same geometric object. The coefficient determinant is zero and all equations are consistent, leaving one or more free variables.
Solution Methods for 2×2 Systems
Substitution Method
In the substitution method, isolate one variable from one equation and substitute the expression into the other equation. This reduces the system to a single equation in one variable, which is solved directly. Then back-substitute to find the other variable. Substitution works best when one equation has a coefficient of 1 on one variable.
Elimination Method
The elimination method multiplies equations by constants so that when the equations are added (or subtracted), one variable is eliminated. This is also called the addition method. Elimination is efficient when coefficients are small integers and can be easily scaled to cancel a variable.
Cramer's Rule
Cramer's Rule uses determinants to solve systems of linear equations directly. For the 2×2 system a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the solutions are:
| Variable | Formula | Determinant |
|---|---|---|
| D (coefficient det.) | a₁b₂ − b₁a₂ | |a₁ b₁ / a₂ b₂| |
| x | D𝑥 / D | |c₁ b₁ / c₂ b₂| |
| y | D𝑦 / D | |a₁ c₁ / a₂ c₂| |
When D = 0, the system is either inconsistent (no solution) or dependent (infinitely many solutions). Cramer's Rule extends naturally to 3×3 and larger systems using 3×3 determinants.
Gaussian Elimination for 3×3 Systems
Gaussian elimination (also called row reduction) converts the augmented matrix of a system into row echelon form using three elementary row operations: (1) swapping two rows, (2) multiplying a row by a non-zero scalar, and (3) adding a multiple of one row to another. Once in echelon form, back-substitution yields the solution from bottom to top.
For a 3×3 system, Gaussian elimination first creates zeros below the leading entry in column 1 (the pivot), then creates zeros below the pivot in column 2, yielding an upper triangular matrix. Back-substitution then solves for z from the third row, then y from the second, then x from the first.
Solving Equations with Fractions
Linear equations containing fractional coefficients such as x/3 + 2 = x/5 − 1 are solved by first finding the Least Common Denominator (LCD) of all denominators. Multiplying every term on both sides by the LCD eliminates all fractions and produces an equivalent integer-coefficient equation. For the example above, LCD = 15 gives 5x + 30 = 3x − 15, yielding x = −22.5.
Real-World Applications
- Break-even Analysis: Set revenue = cost (both linear functions of quantity) and solve for the break-even quantity.
- Mixture Problems: Two substances combined in unknown quantities but known total — set up two equations (quantity and concentration) and solve the 2×2 system.
- Circuit Analysis (Kirchhoff's Laws): Each loop or node produces a linear equation in unknown currents; solve the resulting system for all branch currents.
- Supply and Demand Equilibrium: Supply and demand are linear functions of price; set equal and solve for equilibrium price and quantity.
- Distance, Rate, Time Problems: Two travelers moving at different speeds produce simultaneous linear equations in time and distance.
- Age Word Problems: Present and future ages of two people expressed as two linear equations with two unknowns.