The idea: two numbers, two jobs

A linear function in slope-intercept form is

y = mx + b

Its graph is a straight line. The two numbers each have one job: m is the slope, how much y changes for each step of 1 in x, and b is the y-intercept, where the line crosses the y-axis. On the canvas m is blue and b is green.

The line y = 2x + 1. Green: it crosses the y-axis at (0, 1), so b = 1. Blue: from (0, 1) a run of 1 to the right and a rise of 2 up lands on the line at (1, 3), so m = 2 / 1 = 2
On y = 2x + 1: b = 1 is where the line crosses the y-axis, and m = rise / run = 2 / 1 = 2.

m: rise over run

Pick any point on the line, go some distance to the right (the run), then up or down until you are back on the line (the rise). The slope is

m = rise / run

On y = 2x − 3, a run of 1 needs a rise of 2, a run of 2 a rise of 4, a run of 4 a rise of 8. The ratio is always 2. That is what makes the graph straight: the steepness is the same everywhere. (Demo 1: rise over run)

mthe line
3rises steeply: up 3 for every 1 right
1rises at 45°, like y = x
½rises gently: up 1 for every 2 right
0flat: a horizontal line y = b
−½falls gently: down 1 for every 2 right
−2falls steeply

The sign of m says the direction (read left to right) and |m| says how steep it is. A negative rise is a drop: on y = −½x + 3 a run of 2 has a rise of −1. (Demo 5: a falling line)

b: the y-intercept

Put x = 0 into mx + b and only b is left, so the line always crosses the y-axis at (0, b). In a real problem b is the starting value: a taxi fare of 3 + 2 per km is y = 2x + 3, and the meter shows 3 before you move.

Changing m vs changing b

Changing b adds the same amount to every y, so the whole line slides straight up or down. The slope does not change, and lines with the same slope are parallel. (Demo 2: b slides the line)

Changing m leaves (0, b) where it is, because the m·x term is 0 at x = 0. Every line with the same b passes through that point, so a new m turns the line about it. (Demo 3: m turns the line)

Left: the lines y = ½x − 2, y = ½x + 1 and y = ½x + 4, all parallel, crossing the y-axis at −2, 1 and 4. Right: the lines y = 2x + 1, y = ½x + 1, y = 1 and y = −x + 1, all through the point (0, 1)
Changing b gives parallel lines; changing m turns the line about (0, b).
changestays the samewhat moves
bthe slope, the directionevery point, up or down by the same amount
mthe point (0, b)the steepness and the x-intercept

The line through two points

Two points P1 = (x₁, y₁) and P2 = (x₂, y₂) fix exactly one line. The run and rise from P1 to P2 give the slope, then P1 gives b:

m = (y₂ − y₁) / (x₂ − x₁)
b = y₁ − m·x₁

For P1 = (−2, −1) and P2 = (2, 5): run = 2 − (−2) = 4, rise = 5 − (−1) = 6, m = 6/4 = 1.5, and b = −1 − 1.5·(−2) = 2, so the line is y = 1.5x + 2. Swapping the two points flips the sign of both the rise and the run, so m comes out the same. (Demo 4: the line through two points)

The same facts also give the point-slope form y − y₁ = m(x − x₁), which is handy when you know a point but not b. Expanding it gives back y = mx + b.

Horizontal and vertical lines

A horizontal line has rise 0 for every run, so m = 0 and the function is y = b. A vertical line has run 0 for every rise, and rise / 0 has no value: its slope is undefined. Its equation is x = c. It is not a function of x, because one x has many y, so it cannot be written as y = mx + b. (Demo 6: a vertical line has no slope)

The x-intercept

The line meets the x-axis where y = 0: mx + b = 0, so x = −b/m. For y = 2x + 1 that is x = −0.5. A flat line y = b with b ≠ 0 never meets the x-axis, and y = 0 is the x-axis itself.

A parabola y = ax² + bx + c becomes the line y = bx + c when a = 0, and at its y-intercept it has slope b: see What a, b and c Do to a Parabola. Shifting and stretching any graph is on Function Transformations. Fitting the best line through noisy data is Linear Regression, and the slope of a curve at a point is the slope of the line it looks like when you zoom in: see Local Linearity.

An arithmetic sequence is a linear function read at x = 1, 2, 3, …: see Arithmetic vs Geometric Sequences.

The line y = mx + b splits the plane in two, and linear inequalities shade the half where y ≤ mx + b or y > mx + b.

Taking the absolute value of a line folds its part below the x-axis up into a V: see Absolute Value and Piecewise Functions.

What the page leaves out

Standard form Ax + By = C, perpendicular slopes (m₁·m₂ = −1), the angle of a line (tan θ = m), solving two linear equations at once, and lines in three dimensions.

On the mind map

Open the Algebra & Functions mind mapAlgebra &FunctionsPolynomials and graphs: shift, stretch, factor, solvePolynomials and graphsRational functions: a ratio of polynomialsRational functionsExponentials and logs: equal steps multiplyExponentials and logsWaves and envelopes: a sine inside a bandWaves and envelopesOscillators: period set by the systemOscillatorsCollisions: momentum is always keptCollisionsMotion under forces: split forces into componentsMotion under forcesEquations and inequalities: solve for the unknownsEquations and inequalitiesFunction transformationsFunction transformationsinside changes x (reversed), outside yQuadratic equationsQuadratic equationscomplete the square; b² − 4ac counts rootsQuadratic coefficientsQuadratic coefficientsc: y-intercept, a: width, b: slope at x = 0Cubic coefficientsCubic coefficientsa sets the ends, inflection at x = −b/3aPolynomial divisionPolynomial divisionremainder of p(x) ÷ (x − c) is p(c)Composition and inversesComposition and inversesf⁻¹ is f mirrored in y = xLinear functions and slopem = rise/run, b = where it crosses yAbsolute value, piecewiseAbsolute value, piecewise|x| folds the negative half upOpen the Algebra & Functions mind mapAlgebra & Functionsshift, stretch, factor, solvePolynomials and graphsFunction transformationsFunction transformationsinside changes x (reversed), outside yQuadratic equationsQuadratic equationscomplete the square; b² − 4ac counts rootsQuadratic coefficientsQuadratic coefficientsc: y-intercept, a: width, b: slope at x = 0Cubic coefficientsCubic coefficientsa sets the ends, inflection at x = −b/3aPolynomial divisionPolynomial divisionremainder of p(x) ÷ (x − c) is p(c)Composition and inversesComposition and inversesf⁻¹ is f mirrored in y = xLinear functions and slopem = rise/run, b = where it crosses yAbsolute value, piecewiseAbsolute value, piecewise|x| folds the negative half up
This page on the Algebra & Functions mind map · 30 pages in 8 branches · open it to see the whole map and test yourself in recall mode.