letx=

Coordinate geometry

Slope-intercept form

The equation of a straight line from its slope m and the point b where it crosses the y-axis.

y=mx+b

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

−12−10−8−6−4−224681012−6−4−224612(0, −1)
  • Slope m = 2: up 2 for every 1 across
  • y-intercept b = −1
  • x-intercept: x = −b/m = 0.5

What the symbols mean

y
the y-coordinate of a point on the line
x
the x-coordinate of that point
m
the slope (gradient)
b
the y-intercept: the value of y when x = 0 (some courses call it c)

When to use it

Use it to graph a line quickly (start at (0, b), then step across 1 and up m), to read the slope and intercept off an equation, to find y for a given x, and to model anything that changes at a constant rate from a starting value: a taxi fare with a fixed charge plus a price per kilometre, for instance. Vertical lines cannot be written this way; they are x=k.

Worked example

A line has slope m = 2 and y-intercept b = −1. What is y when x = 3?

  1. Start from the formula.

    y=m⁢x+b
  2. Substitute m = 2, x = 3, b = −1 and work it out.

    y=2·3+(−1)
    =6+(−1)
    =5

Answer y = 5

Common mistakes

  • Reading the slope off an equation that is not solved for y: in 2y=6x+4 the slope is 3, not 6.
  • Taking b as the x-intercept. b is where the line meets the y-axis; the x-intercept is −b/m.
  • Dropping the sign of b: in y=2x−1, b = −1.