Linear Equation Solver
Solve linear equations with one or two variables. Enter coefficients and get exact solutions with step-by-step working.
🔢 What is a Linear Equation?
A linear equation is an algebraic equation in which the variables appear only to the first power (no x², x³, or square roots of x). The word "linear" comes from "line" — when graphed, a linear equation with one variable is a point on the number line, and a linear equation with two variables is a straight line on the coordinate plane.
The one-variable form is ax + b = c. To solve, isolate x by performing the same operations on both sides: subtract b from both sides to get ax = c − b, then divide by a to get x = (c − b) / a. This is valid whenever a ≠ 0. If a = 0 and b ≠ c, there is no solution (0 = c − b is false). If a = 0 and b = c, there are infinitely many solutions (0 = 0, true for all x).
A two-variable system (2×2) consists of two equations, each with two unknowns x and y. Geometrically, each equation represents a straight line. The solution is the intersection point of the two lines. Three outcomes are possible: one solution (lines intersect at exactly one point), no solution (lines are parallel — they never meet), or infinite solutions (lines are identical — every point on the line satisfies both equations).
Linear equations are the foundation of algebra and appear everywhere in science, engineering, and daily life: calculating rates (if I drive at 60 km/h for x hours, I cover 60x km), mixing problems, budget planning (your savings after x months = initial + monthly × x), and physics (distance = speed × time). Mastering linear equations is the gateway to more advanced mathematics including matrices, calculus, and linear programming.
📐 Linear Equation Formulas
📖 How to Use This Calculator
One Variable Example — 3x + 7 = 22
Two Variables Example — 2x + y = 5 and x − y = 1
💡 Example Calculations
Example 1 — One Variable
5x − 3 = 17
Example 2 — Two Variables (Word Problem)
A total of ₹500 is split between two people. One gets ₹50 more than the other. How much does each get?
❓ Frequently Asked Questions
🔗 Related Calculators
What is a linear equation?
A linear equation is an algebraic equation where the highest power of the variable is 1. It graphs as a straight line when plotted. The standard form is ax + b = c for one variable, or ax + by = c and dx + ey = f for two variables (a system of linear equations). The word 'linear' comes from 'line' - these equations, when graphed, produce straight lines, and solving a 2-variable system means finding where two lines intersect.
How do you solve a one-variable linear equation?
The goal is to isolate x. Use inverse operations: if a number is added, subtract it from both sides; if multiplied, divide both sides. Example: 3x + 7 = 22 → subtract 7: 3x = 15 → divide by 3: x = 5. Check: 3(5) + 7 = 15 + 7 = 22 ✓. For ax + b = c: x = (c − b) / a, provided a ≠ 0.
How do you solve a 2-variable system of linear equations?
Two main methods: (1) Substitution - solve one equation for one variable, substitute into the second. (2) Elimination - multiply equations by constants to make one variable's coefficients equal, then add/subtract to eliminate it. Example: x + y = 5 and 2x − y = 1. Add both: 3x = 6, x = 2. Substitute: 2 + y = 5, y = 3. Solution: (2, 3). This calculator uses elimination (Cramer's rule) for 2-variable systems.
What does 'no solution' mean for a system of equations?
A system has no solution when the two equations are parallel lines - they have the same slope but different y-intercepts, so they never intersect. This happens when the ratios of coefficients are equal but the ratio of constants is different: a₁/a₂ = b₁/b₂ ≠ c₁/c₂. For example: x + y = 3 and x + y = 5 - both lines have the same slope, but no point satisfies both simultaneously.
What does 'infinite solutions' mean?
A system has infinitely many solutions when both equations represent the same line. One equation is a multiple of the other: a₁/a₂ = b₁/b₂ = c₁/c₂. For example: 2x + 4y = 8 and x + 2y = 4 are the same line. Any point on the line is a valid solution - infinitely many (x, y) pairs satisfy both equations simultaneously.
What is Cramer's Rule?
Cramer's Rule solves a 2-variable system ax + by = e, cx + dy = f using determinants. The determinant D = ad − bc. x = (ed − bf) / D and y = (af − ec) / D. If D = 0, the system has either no solution or infinite solutions (check the individual determinants). Cramer's Rule generalizes to n-variable systems but is computationally inefficient for large n - Gaussian elimination is preferred then.
What does it mean when a linear equation has no solution or infinite solutions?
For a single-variable equation ax + b = c: if a = 0 and b ≠ c, there is no solution (e.g., 0x + 5 = 3 - impossible). If a = 0 and b = c, there are infinite solutions (e.g., 0x + 5 = 5 - true for any x). For a 2-variable system, no solution means the lines are parallel (same slope, different intercepts); infinite solutions mean the lines are coincident (one equation is a scalar multiple of the other).
How do I check if my solution to a linear equation is correct?
Substitute your answer back into the original equation and verify both sides are equal. For x = 4 in 5x − 3 = 17: 5(4) − 3 = 20 − 3 = 17 ✓. For a 2-variable system, check both equations: if x = 2, y = 3 from x + y = 5 and 2x − y = 1: (2+3=5 ✓) and (4−3=1 ✓). Always verify, as arithmetic errors are easy to make.
What is the graphical interpretation of a linear equation?
A single-variable linear equation ax + b = c represents a point on the number line (the solution x). A two-variable linear equation ax + by = c represents a straight line in the xy-plane. A 2×2 system of equations represents two lines in the plane: if they intersect, the intersection point is the unique solution; if they are parallel, there is no solution; if they coincide, there are infinitely many solutions.
What are real-world applications of linear equations?
Linear equations model proportional relationships: distance-speed-time (d = v × t), simple interest (I = P × r × t), unit price and total cost, break-even analysis, mixture problems (combining solutions of different concentrations), wage calculations (hourly rate × hours = pay), and currency conversion (multiply by exchange rate). Two-variable systems model problems with two unknowns - splitting bills, age problems, digit problems, and upstream-downstream problems.