Linear Functions

The simplest functions to graph are the ones whose picture is a straight line. We call them linear functions, and they all fit one tidy template:

y = mx + b

This is called slope-intercept form. Just two numbers, m and b, completely describe the line — change either one and the line tilts or slides.

b — where the line crosses the y-axis

The number b is the y-intercept: the height where the line crosses the y-axis. That makes sense — at the crossing point x = 0, so

y = m(0) + b = b.

So the line always passes through the point (0, b). Increasing b lifts the whole line up; decreasing it drops the line down, without changing its tilt.

m — how steeply the line tilts

The number m is the slope: it sets how steeply the line rises or falls. A bigger m tilts the line up more sharply; a negative m tips it downhill; m = 0 leaves it perfectly flat. (We'll measure slope precisely in the next lesson.)

Drive the two sliders below and watch how m and b shape the line. The dot marks the y-intercept (0, b).

Reading a line's equation

Given a line in slope-intercept form you can read its two facts straight off. For y = 3x - 2 the slope is m = 3 and the y-intercept is b = -2, so the line climbs steeply and crosses the axis at (0, -2). Step through a worked line below.

Khan Academy introduces slope-intercept form here: