Linear Functions & y = mx + b

Two numbers describe a whole line: where it starts, and how fast it changes.

You get into a taxi and the meter already reads $3.00. You have not moved an inch.

a taxi meter: a fee to start, then a rate per mile $3.00 before you move an inch $3.00 mile 0 $5.00 mile 1 +$2 $7.00 mile 2 +$2 $9.00 mile 3 +$2 the $3 never comes back — it is where the meter starts

Then it ticks up $2 every mile. After one mile, $5. After two, $7. After three, $9.

Two different numbers are doing two different jobs. The $3 happened once, at the start, and never comes back.

The $2 happens again and again, once per mile. It is a rate; the $3 is not.

Those are exactly the two numbers in y = mx + b. The b is what you owe before anything happens; the m is what each additional one costs. Every linear situation splits this way.

y = mx + b: slope and y-intercept two numbers fix a line: where it starts and how steep it is run 4 rise 2 b = 2 start here y = mx + b m = slope 2/4 = 1/2 here b = y-intercept the value when x = 0 y = (1/2)x + 2 : start at 2, then go up 1 for every 2 across

Reading the equation

In y = 4x - 7, the slope is 4 and the y-intercept is -7. The number multiplying x is always the slope.

Watch the sign: y = 4x - 7 has b = -7, not 7.

If the equation is not in this form, rearrange it first. 2y = 6x + 10 becomes y = 3x + 5.

Solve for y first

You cannot read m and b off 3x + y = 12. Rearranged, it is y = -3x + 12, so m = -3 — negative, which you would have missed.

Graphing from the equation

Plot b on the y-axis. That is your starting point, and it needs no calculation.

From there, use the slope as instructions: m = 23 means up 2, right 3. Mark the new point.

Do it twice more, then draw the line through all of them. Three points catch an arithmetic slip that two would hide.

Always start at b

Dot on the y-axis first. Then count. Starting anywhere else is what makes graphs come out shifted.

Writing the equation from a graph

Read b straight off the y-axis. Then build a slope triangle between two lattice points and read m.

Write y = mx + b with your two numbers in place. Then test it on a third point from the graph.

If the third point fails, you misread one of the two numbers. Nearly always it is the sign of m.

Linear functions in words

"A gym charges $40 to join and $25 a month" is y = 25x + 40. The joining fee is b; the monthly charge is m.

Ask two questions: what happens at the very start, with nothing used? And what happens for each additional one?

The first answer is b, the second is m. In that order, the equation writes itself.

Proportional is the special case b = 0

No joining fee means the line goes through the origin: y = 25x. A proportional relationship is just a linear one whose b happens to be zero.

Worked examples

Reading m and b

Identify the slope and y-intercept of 2x + 4y = 12.

  1. Subtract 2x: 4y = -2x + 12 Get the y term alone.
  2. Divide every term by 4: y = -12x + 3 Divide each term, not just the first.
  3. So m = -12 and b = 3. Now it is in y = mx + b form.

m = -12, b = 3

Equation from two points

Write the equation of the line through (0, 5) and (4, 13).

  1. (0, 5) has x = 0, so b = 5. The y-intercept is handed to you.
  2. Slope: m = 13 - 54 - 0 = 84 = 2 Rise over run.
  3. y = 2x + 5 Check (4, 13): 2(4) + 5 = 13 ✓

y = 2x + 5

A word problem

A pool holds 300 gallons and drains at 12 gallons per minute. Write an equation, then find when it is empty.

  1. At the start, 300 gallons, so b = 300. The initial value.
  2. Draining means losing, so m = -12. The amount goes down each minute.
  3. y = -12x + 300 Slope-intercept form.
  4. Empty means y = 0: 0 = -12x + 300, so x = 25 minutes. Check: 12 × 25 = 300 gallons gone ✓

y = -12x + 300; empty after 25 minutes

Words to know

Slope-intercept form
y = mx + b, with m the slope and b the y-intercept.
y-intercept
The y value when x = 0 — where the line crosses the y-axis.
x-intercept
The x value when y = 0 — where it crosses the x-axis.
Initial value
The same thing as b in a real-world context: the starting amount.

Mistakes to watch for

Reading m and b before solving for y. From 3x + y = 12 the slope looks like 3, but rearranged it is y = -3x + 12 — the slope is negative. Always get y alone first, then read.

Dividing only the first term. From 4y = -2x + 12, dividing by 4 gives y = -12 x + 3; the 12 must be divided too. Halving one term and not the other quietly changes the line.

Losing the minus sign on the intercept. In y = 4x - 7 the value of b is -7, not 7. The sign in front belongs to the number after it, and dropping it moves the whole line fourteen units.

Using a positive slope for something that is decreasing. A draining tank, a cooling drink and a depreciating car all have negative m. If the story says "loses" or "falls," the slope carries a minus sign.

Taximeters were invented in 1891 by Wilhelm Bruhn — and Berlin cab drivers hated them so much that they threw one into the river Spree.

Until then fares were argued at the end of the journey. The meter made the rule public and fixed, which is precisely what an equation does.

The word taxi is short for taximeter, from Latin taxa, "charge," and Greek metron, "measure."

Browse all courses