Math Playground
Back to Algebra

Algebra › Functions & graphs

Functions & graphs

A function is a rule that turns one number into another. Plotting it gives you the picture of that rule.

Drag the two points

-10-10-8-8-6-6-4-4-2-2224466881010Δx = 6Δy = 4A (-2, -1)B (4, 3)

Slope (rise over run)

m = Δy / Δx = 4 / 6

m = 0.667

Line equation

y = 0.67x + 0.33

Drag the A and B points to any grid spot. The line snaps through both.

The dashed triangle shows rise (Δy) over run (Δx).

The line equation

The simplest function is a straight line: y = mx + b.

  • m is the slope — how steep the line is. A slope of 2 means: every 1 step right, go 2 steps up.
  • b is the y-intercept — where the line crosses the vertical axis.

Slope, in pictures

  • Positive slope — line tilts up as you go right.
  • Negative slope — line tilts down.
  • Zero slope — flat horizontal line.
  • Bigger slope (in size) — steeper line.

Finding slope from two points

Pick any two points on the line, say (x₁, y₁) and (x₂, y₂). Then m = (y₂ − y₁) / (x₂ − x₁). Rise over run.

Plotting a line

  1. Plot the y-intercept first — that's the dot on the y-axis.
  2. From there, use the slope to find a second point.
  3. Draw the line through them.
Quick check

For y = 2x + 1, what is y when x = 4?

Quick check

What is the slope of the line through (1, 2) and (4, 11)?