A straight‑line graph visually displays a mathematical function. The x‑ and y‑coordinates of points on the line reveal how two quantities relate. By determining the line’s slope (gradient) and its y‑intercept, you can translate this visual relationship into a clean algebraic formula.
Find where the graph crosses the y‑axis. In this example, the intercept is at (0, 8).
Select any other point on the line. Here we’ll use (3, 2).
Subtract the first point’s y‑coordinate from the second’s: 8 – 2 = 6.
Subtract the first point’s x‑coordinate from the second’s: 0 – 3 = ‑3.
Divide the change in y by the change in x: 6 ÷ ‑3 = ‑2. This is the line’s slope (m).
Insert the slope and the y‑intercept into the slope‑intercept form, y = mx + c. Using our values, the equation becomes y = ‑2x + 8.