Skip to main content

Linear Equations

A linear equation is the mathematical description of a steady rate of change — the price you pay grows by the same amount for each extra kilogram, the water level drops by the same amount each hour, the taxi fare climbs by the same amount each mile. Because so much of everyday life advances at a constant pace, linear equations are the single most useful tool in all of algebra. Master them and you gain a reliable way to answer "how much?", "when?", and "where do these two things meet?"

The beauty of a linear equation is that it hides a very human idea inside its symbols: balance. An equation is a claim that two things weigh the same, and everything you do to solve it is just keeping a scale level while you tidy up. Once that idea clicks, solving stops feeling like memorized tricks and starts feeling like common sense.

Learning Objectives

By the end of this page, you should be able to:

  • Solve a linear equation in one variable by keeping both sides balanced.
  • Explain what the slope mm and the intercept bb mean in y=mx+by = mx + b, and read them off a graph.
  • Graph a line quickly from its equation, and write the equation of a line from a graph or two points.
  • Solve and graph linear inequalities, remembering the sign-flip rule.
  • Solve a system of two linear equations by substitution and by elimination, and interpret the result geometrically.

Quick Answer

A linear equation is one in which every variable appears only to the first power — no squares, no roots, no products of variables — so its graph is a straight line. To solve one in a single variable, you use inverse operations to isolate that variable while doing the same thing to both sides so the equation stays balanced. A linear equation in two variables, written in slope-intercept form y=mx+by = mx + b, describes a line whose steepness is the slope mm (rise over run) and whose crossing point on the yy-axis is the intercept bb. Replacing "=" with "<<", ">>", "\le", or "\ge" gives a linear inequality, solved the same way — except that multiplying or dividing by a negative number reverses the inequality sign. When two lines are considered together as a system, their solution is the point where they cross, found by substitution or elimination.

Where It Came From

Linear problems are older than algebra itself — older, in fact, than the equals sign. The Rhind Mathematical Papyrus of ancient Egypt (copied around 1650 BCE from an even older source) is full of problems of the form "a quantity and its seventh added together make 19; what is the quantity?" The scribes solved these by a clever guess-and-adjust method called false position: assume a convenient value, see how far off you are, and scale your guess proportionally. The need was intensely practical — dividing loaves of bread and jugs of beer fairly among workers, and calculating how much grain a given area of field would yield.

The Babylonians, writing in cuneiform on clay tablets around 1800 BCE, handled linear (and even quadratic) problems arising from land measurement, inheritance division, and interest on loans. Their motivation was administration and trade: a civilization that lends grain at interest and taxes farmland must be able to solve for an unknown quantity reliably.

The most striking early achievement is Chinese. The Nine Chapters on the Mathematical Art (Jiuzhang Suanshu), compiled by around 100 CE, devotes an entire chapter — "Fangcheng," or "rectangular arrays" — to systems of linear equations. To find, say, the yield of three different grades of grain from mixed harvests, the authors arranged the coefficients in a grid and systematically eliminated unknowns — essentially the method we now call Gaussian elimination, roughly seventeen centuries before Gauss. The driving need was again economic: fair exchange rates between goods and equitable taxation.

What tied all this together conceptually was the idea of balance. When the Persian scholar al-Khwarizmi wrote his foundational algebra text around 820 CE, the very word al-jabr (from which "algebra" comes) meant "restoration" — the act of moving a subtracted term to the other side to keep the two sides equal, exactly like re-balancing a scale. The modern equals sign "=" arrived much later, invented by the Welsh mathematician Robert Recorde in 1557, who chose two parallel lines "bicause noe 2 thynges can be moare equalle." Every time you solve a linear equation today, you are using an idea four thousand years in the making.

Solving Linear Equations: The Balance Principle

Think of an equation as an old two-pan balance scale. The "=" sign is the pivot; whatever sits on the left pan weighs exactly the same as whatever sits on the right. The golden rule is simple: whatever you do to one side, you must do to the other, or the scale tips and the equation becomes false.

The four moves you are allowed are the inverse operations:

  • Add the same amount to both sides.
  • Subtract the same amount from both sides.
  • Multiply both sides by the same nonzero number.
  • Divide both sides by the same nonzero number.

Your goal is to peel away everything surrounding the variable until it stands alone.

Worked Example 1. Solve 3x+7=22 3x + 7 = 22.

The xx is wrapped in two operations: multiply by 3, then add 7. To undo them, work in reverse order — remove the +7+7 first, then the ×3\times 3.

3x+7=22 3x + 7 = 22

Subtract 7 from both sides:

3x=15 3x = 15

Divide both sides by 3:

x=5x = 5

Always check by substituting back: 3(5)+7=15+7=22 3(5) + 7 = 15 + 7 = 22. Correct.

Worked Example 2 (variable on both sides). Solve 5x4=2x+11 5x - 4 = 2x + 11.

Collect the variable terms on one side and the numbers on the other. Subtract 2x 2x from both sides:

3x4=11 3x - 4 = 11

Add 4 to both sides:

3x=15    x=5 3x = 15 \implies x = 5

Check: left side 5(5)4=21 5(5) - 4 = 21; right side 2(5)+11=21 2(5) + 11 = 21. Balanced.

Worked Example 3 (fractions). Solve x4+23=56\dfrac{x}{4} + \dfrac{2}{3} = \dfrac{5}{6}.

Fractions are easiest to clear all at once. Multiply every term by the least common denominator, which is 12:

12x4+1223=1256 12 \cdot \frac{x}{4} + 12 \cdot \frac{2}{3} = 12 \cdot \frac{5}{6}

3x+8=10 3x + 8 = 10

Subtract 8, then divide by 3:

3x=2    x=23 3x = 2 \implies x = \frac{2}{3}

Slope-Intercept Form: y=mx+by = mx + b

Move from one variable to two and a linear equation stops describing a single number and starts describing a whole line of (x,y)(x, y) points. The most revealing way to write it is slope-intercept form:

y=mx+by = mx + b

Two letters carry all the meaning:

  • bb is the yy-intercept — the value of yy when x=0x = 0, i.e. where the line crosses the vertical axis. It is the starting value.
  • mm is the slope — how much yy changes for every 1-unit increase in xx. It is the rate of change, computed as "rise over run":

m=change in ychange in x=y2y1x2x1m = \frac{\text{change in } y}{\text{change in } x} = \frac{y_2 - y_1}{x_2 - x_1}

A positive slope tilts upward left-to-right; a negative slope tilts downward; a slope of 0 is a flat horizontal line; and a vertical line has an undefined slope (its run is zero, and you cannot divide by zero).

Worked Example 4 (equation from two points). A phone plan costs $40 for 2 GB of data and $70 for 5 GB. Find the linear equation relating cost yy to data xx.

First the slope — the cost per extra GB:

m=704052=303=10m = \frac{70 - 40}{5 - 2} = \frac{30}{3} = 10

So each GB costs $10. Now find bb using one known point, say (2,40)(2, 40):

40=10(2)+b    40=20+b    b=20 40 = 10(2) + b \implies 40 = 20 + b \implies b = 20

The equation is y=10x+20y = 10x + 20. The $20 intercept is a fixed monthly base fee — the cost even at 0 GB — and the slope is the $10-per-GB rate.

Graphing Lines

Because two points determine a line, graphing is fast. The slickest method uses the form directly:

  1. Plot the intercept bb on the yy-axis. For y=10x+20y = 10x + 20, mark (0,20)(0, 20).
  2. Use the slope as rise-over-run to step to a second point. Slope 10=101 10 = \tfrac{10}{1} means: from (0,20)(0,20) go right 1, up 10 to reach (1,30)(1, 30).
  3. Draw the straight line through both points.

Alternatively, find the two axis intercepts. For 2x+3y=12 2x + 3y = 12: set y=0y = 0 to get x=6x = 6 (point (6,0)(6,0)); set x=0x = 0 to get y=4y = 4 (point (0,4)(0,4)). Plot both and connect. This "cover-up" method is often quickest for equations in standard form Ax+By=CAx + By = C.

Linear Inequalities

Replace the equals sign with an inequality and you describe not a single line but a region or a range of solutions. You solve a linear inequality with the same balance moves — with one crucial extra rule:

When you multiply or divide both sides by a negative number, you must reverse the inequality sign.

Why? Consider a true statement, 3<5 3 < 5. Multiply both sides by 1-1: the numbers become 3-3 and 5-5, and 3-3 is actually greater than 5-5. Negation flips the order of the number line, so the symbol must flip too.

Worked Example 5. Solve 2x+19-2x + 1 \le 9.

Subtract 1 from both sides:

2x8-2x \le 8

Divide both sides by 2-2 — and flip the sign:

x4x \ge -4

The solution is every number greater than or equal to 4-4. On a number line you draw a filled circle at 4-4 (because \le includes equality) and shade to the right. Had the inequality been strict (<<), you would use an open circle.

Systems of Two Linear Equations

Often two conditions must hold at once, giving two equations in two unknowns. Their solution is the single (x,y)(x, y) pair that satisfies both — geometrically, the point where the two lines cross.

Method 1: Substitution. Solve one equation for one variable, then substitute into the other.

Worked Example 6. Solve y=2x+1and3x+y=11.y = 2x + 1 \qquad \text{and} \qquad 3x + y = 11.

The first equation already gives yy, so substitute it into the second:

3x+(2x+1)=11    5x+1=11    5x=10    x=2 3x + (2x + 1) = 11 \implies 5x + 1 = 11 \implies 5x = 10 \implies x = 2

Back-substitute: y=2(2)+1=5y = 2(2) + 1 = 5. The solution is (2,5)(2, 5). Check in the second equation: 3(2)+5=11 3(2) + 5 = 11. Correct.

Method 2: Elimination. Add or subtract the equations to cancel one variable.

Worked Example 7. Solve 2x+3y=12and2xy=4. 2x + 3y = 12 \qquad \text{and} \qquad 2x - y = 4.

Both have a 2x 2x term. Subtract the second equation from the first so the xx terms cancel:

(2x+3y)(2xy)=124(2x + 3y) - (2x - y) = 12 - 4

4y=8    y=2 4y = 8 \implies y = 2

Substitute back into 2xy=4 2x - y = 4: 2x2=4    2x=6    x=3 2x - 2 = 4 \implies 2x = 6 \implies x = 3. The solution is (3,2)(3, 2).

Three possible outcomes. Two lines can (a) cross once — one solution; (b) be parallel and never meet — no solution (you'll reach a false statement like 0=7 0 = 7); or (c) be the very same line - infinitely many solutions (you'll reach a true statement like 0=0 0 = 0).

Real-World Applications

  • Personal finance: Any "fixed fee plus a per-unit rate" situation is linear — phone plans, taxi fares, salary-plus-commission, gym membership, or a loan being paid down at a steady amount per month. Slope-intercept form lets you predict the total for any usage.
  • Physics: An object moving at constant velocity obeys x=x0+vtx = x_0 + vt — a linear equation where the initial position is the intercept and the velocity is the slope.
  • Chemistry and biology: Calibration curves (concentration vs. instrument reading) and simple dose-response ranges are treated as linear over their working region, so a measured signal can be converted to a concentration.
  • Economics: Supply and demand curves are often modeled as lines; the market equilibrium price and quantity are exactly the solution of a system — the point where supply meets demand. See Economics.
  • Engineering and business: Break-even analysis sets a linear cost equation equal to a linear revenue equation and solves the system to find the production level at which you stop losing money.
  • Everyday planning: Converting temperatures (F=95C+32F = \tfrac{9}{5}C + 32), scaling a recipe, or figuring out how long a road trip takes at a steady speed are all linear.

Common Mistakes

Mistake 1: Forgetting to flip the inequality sign. Students solve 2x<6-2x < 6 and write x<3x < -3. This is wrong because dividing by the negative 2-2 reverses the order of the number line. The correct answer is x>3x > -3. Rule: flip the sign only when you multiply or divide by a negative, never when you add or subtract.

Mistake 2: Doing something to only one side. Writing 3x+7=223x=22 3x + 7 = 22 \Rightarrow 3x = 22 (subtracting 7 from the left but not the right) breaks the balance. Every operation must hit both sides. Picture the scale tipping and you'll never forget.

Mistake 3: Confusing slope with intercept. Given y=3+2xy = 3 + 2x, students sometimes call 3 the slope because it's written first. But slope is always the number multiplying xx — here the slope is 2 and the intercept is 3. Rearranging to the standard order y=2x+3y = 2x + 3 makes it obvious. A useful habit is to always identify which number is attached to xx.

Mistake 4 (bonus): Mishandling the minus when distributing. In 5x(2x3) 5x - (2x - 3), the minus sign applies to every term in the parentheses, giving 5x2x+3=3x+3 5x - 2x + 3 = 3x + 3, not 5x2x3 5x - 2x - 3. Distribute the negative to all terms inside.

Comparison and Connections

ConceptHighest power of variableGraph shapeNumber of solutions (one variable)
Linear equation1Straight lineExactly one (usually)
Quadratic equation2ParabolaUp to two
Linear inequality1Half-line / shaded regionA range of values
System of two linear equations1Two linesOne, none, or infinitely many

The three standard ways of writing the same line are worth knowing side by side: slope-intercept y=mx+by = mx + b (best for graphing and reading rate), point-slope yy1=m(xx1)y - y_1 = m(x - x_1) (best when you know a point and the slope), and standard form Ax+By=CAx + By = C (best for the intercept "cover-up" method and for systems). They are algebraically interchangeable — pick whichever exposes what you need.

Two lines are parallel exactly when they share the same slope mm but have different intercepts, and perpendicular exactly when their slopes are negative reciprocals (m1m2=1m_1 \cdot m_2 = -1).

Practice Questions

Recall

Identify the slope and yy-intercept of y=4x+9y = -4x + 9.

Answer: Slope m=4m = -4; yy-intercept b=9b = 9 (the point (0,9)(0, 9)).

Understanding

Solve the inequality x321\dfrac{x}{3} - 2 \ge 1 and describe the solution.

Answer: Add 2: x33\tfrac{x}{3} \ge 3. Multiply by 3 (positive, no flip): x9x \ge 9. All numbers at least 9; filled circle at 9, shaded right.

Application

A taxi charges a $3 fixed fee plus $2 per mile. Write the cost equation, then find the cost of a 12-mile ride and how far $25 buys.

Answer: y=2x+3y = 2x + 3. For 12 miles: y=2(12)+3=27y = 2(12) + 3 = 27. For $25: 25=2x+322=2xx=11 25 = 2x + 3 \Rightarrow 22 = 2x \Rightarrow x = 11 miles.

Analysis

Solve the system 4x+y=10 4x + y = 10 and 2x3y=2 2x - 3y = -2, then state what the answer means geometrically.

Answer: From the first, y=104xy = 10 - 4x. Substitute: 2x3(104x)=22x30+12x=214x=28x=2 2x - 3(10 - 4x) = -2 \Rightarrow 2x - 30 + 12x = -2 \Rightarrow 14x = 28 \Rightarrow x = 2. Then y=108=2y = 10 - 8 = 2. Solution (2,2)(2, 2) — the single point where the two lines intersect. Check: 2(2)3(2)=46=2 2(2) - 3(2) = 4 - 6 = -2. Correct.

FAQ

Q: How do I know if an equation is linear just by looking at it? A: Every variable must be to the first power only — no x2x^2, no x\sqrt{x}, no 1x\tfrac{1}{x}, and no two variables multiplied together (like xyxy). If you can write it in the form Ax+By=CAx + By = C, it is linear and its graph is a straight line.

Q: Why do we bother checking the answer by substituting back? A: Because a single slip in arithmetic can go unnoticed. Substituting your answer into the original equation is a fast, independent confirmation that both sides really do balance. It catches most careless errors before they cost you marks.

Q: What does it mean when solving a system gives "0=5 0 = 5"? A: You've hit a contradiction — no values of xx and yy can make it true. Geometrically the two lines are parallel and never cross, so the system has no solution. If instead you get "0=0 0 = 0", the two equations are the same line and there are infinitely many solutions.

Q: When exactly do I flip the inequality sign? A: Only when you multiply or divide both sides by a negative number. Adding, subtracting, or multiplying/dividing by a positive number never flips it. When in doubt, test a number from your answer in the original inequality to confirm.

Q: Is slope-intercept form always the best form to use? A: No — it's ideal for graphing and for reading off a rate of change, but if you're given a point and a slope, point-slope form is faster, and for solving systems by elimination, standard form Ax+By=CAx + By = C is often cleaner. They all describe the same line, so convert freely.

Q: Can a linear equation have no solution or infinitely many, even in one variable? A: Yes. Solving 2x+3=2x+3 2x + 3 = 2x + 3 gives 0=0 0 = 0 (true for all xx - infinitely many solutions), while 2x+1=2x+5 2x + 1 = 2x + 5 gives 1=5 1 = 5 (never true — no solution). Most equations you meet have exactly one solution, but watch for these special cases.

Quick Revision

  • Balance rule: do the same operation to both sides; undo operations in reverse order to isolate the variable.
  • Slope-intercept form: y=mx+by = mx + b, where mm = slope (rise/run) and bb = yy-intercept.
  • Slope from two points: m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1}.
  • Graphing: plot bb, then step by the slope (rise over run) to a second point.
  • Inequalities: solve like equations, but flip the sign when multiplying or dividing by a negative.
  • Systems: solve by substitution or elimination; solution = intersection point. Outcomes: one solution, none (parallel), or infinitely many (same line).
  • Parallel lines share slope; perpendicular lines have slopes multiplying to 1-1.
  • Always check your answer by substituting back into the original.

Prerequisites

Next Topics