Run the machine backward: leave k and b as unknowns, then let points pin them down.
So far we have always travelled in one direction — from a formula to its graph. Real life loves to hand you the trip the other way around: here is a graph, or a little table of data, now tell me the rule. The trick is disarmingly simple. Write the answer's shape down first, with the coefficients left blank — y = kx + b — and then let every fact you are told become an equation that fills the blanks in. This is the method of undetermined coefficients, the universal "work backward" tool of all of algebra. One known point pins down a proportion; two points pin down a line; and clues like "parallel to …" or "passes through …" turn straight into equations you can solve.
Suppose someone tells you a graph is a straight line and asks for its rule, but you do not yet know its slope or where it crosses the y-axis. Do not be stuck — write those unknowns down anyway. Assume the answer has the linear shape
y = kx + b,
where k and b are numbers you are about to discover. Now translate. Every fact you are given — "the line goes through (1, 3)", "its slope is −2", "it is parallel to y = 3x" — becomes an equation in k and b. Solve those equations, and the blanks fill themselves in. That whole habit, assume the form, then solve for the blanks, is the method of undetermined coefficients. The hard part was never the algebra; it is just remembering to start by writing the shape.
To find an unknown linear function, assume it is y = kx + b, turn each given fact into an equation in k and b, and solve. Assume the form, then determine the coefficients.
Start with the easiest case. A direct proportion y = kx has only one unknown — there is no b, because the line is forced through the origin. So a single known point is enough to lock it down. If the line passes through (x₀, y₀) with x₀ ≠ 0, substitute it into y = kx:
y₀ = k·x₀ ⟹ k = y₀x₀.
A direct proportion y = kx passes through (2, 6). Then k = 62 = 3, so the rule is y = 3x. Check: at x = 2, y = 3·2 = 6 ✓.
This shortcut works only because the line is forced through O. A general line y = kx + b is not pinned by one point — many lines pass through any single point. You need a second piece of information, which is the next section.
A general linear function y = kx + b has two unknowns, so it needs two facts. Two points do exactly that — each one gives an equation, and the pair of equations pins down k and b. The cleanest route is not to solve the pair blindly but to take them in order: slope first, then the intercept.
Given two points (x₁, y₁) and (x₂, y₂), the slope is the rise over the run between them:
k = y₂ − y₁x₂ − x₁.
Now that k is a number, put either point back into y = kx + b and solve for b:
b = y₁ − k·x₁.
Find the line through (1, 3) and (3, 7).
Slope first: k = 7 − 33 − 1 = 42 = 2.
Back-solve b with (1, 3): b = 3 − 2·1 = 1. So y = 2x + 1.
Always check the other point: at x = 3, y = 2·3 + 1 = 7 ✓.
Slope first, then back-solve b. k = (y₂ − y₁) ∕ (x₂ − x₁), then b = y₁ − k·x₁. And always substitute the second point to check — if it does not fit, you slipped somewhere.
When the line is handed to you as a graph on grid paper, the work is the same — you just have to read two clean points off it first. A "clean" point is one where the line passes exactly through a lattice corner (an intersection of two gridlines), so you can read whole-number coordinates with confidence. The best pair, when they are whole numbers, is the two intercepts: where the line crosses the y-axis and where it crosses the x-axis.
A line on the grid clearly passes through (0, −1) and (2, 3).
Slope: k = 3 − (−1)2 − 0 = 42 = 2.
The point (0, −1) is the y-intercept, so b = −1 with no work at all. The rule is y = 2x − 1. Check at (2, 3): 2·2 − 1 = 3 ✓.
Pick points where the line truly strikes a lattice corner. If you guess a point that the line only passes near, the slope you read will be slightly off and the whole formula will be wrong. When in doubt, choose the two intercepts.
You can explore this directly: in the Try it box above, set the two points to (0, −1) and (2, 3) and watch the same y = 2x − 1 appear — recovering a formula from a graph is just the two-point method with the points read off the picture.
Facts do not have to arrive as points. A property of the line is just as good — you only have to turn it into an equation. Two especially common clues:
"Parallel to y = 3x − 5." Parallel lines have the same slope, so this fact alone gives k = 3. You still need one point to fix b.
"Slope −2, through (1, 5)." The slope clue gives k = −2 outright; then b = 5 − (−2)·1 = 7, so y = −2x + 7.
Find the line parallel to y = 3x − 5 that passes through (1, 4).
Parallel ⟹ same slope ⟹ k = 3. Now use the point: 4 = 3·1 + b ⟹ b = 4 − 3 = 1. So y = 3x + 1 — same steepness as the given line, slid to a different height.
| Clue you are given | Equation it becomes |
|---|---|
| passes through (x₀, y₀) | y₀ = k·x₀ + b |
| slope is m | k = m |
| parallel to y = mx + c | k = m (same slope) |
| y-intercept is c | b = c |
| x-intercept is a | 0 = k·a + b |
Every clue is an equation; collect enough of them to have one per unknown, and the linear function is determined. Looking ahead, the next lesson turns this recovered line into a lens for solving equations and inequalities, and the real-world lesson uses exactly this fitting trick to build models from measured data.
The method of undetermined coefficients runs every linear-function problem in reverse:
A direct proportion y = kx passes through (4, 12). Find k and write the formula.
There is only one unknown, so one point is enough: k = 124 = 3. The formula is y = 3x (check: 3·4 = 12 ✓).
A line passes through (0, 2) and (3, 8). Find k and b.
Slope first: k = 8 − 23 − 0 = 63 = 2. The point (0, 2) is the y-intercept, so b = 2 straight away. Thus y = 2x + 2 (check at (3, 8): 2·3 + 2 = 8 ✓).
A line has slope −3 and passes through (2, 1). Find b and the formula.
Here k = −3 is given. Back-solve b with the point: b = y₁ − k·x₁ = 1 − (−3)·2 = 1 + 6 = 7. So y = −3x + 7 (check: −3·2 + 7 = 1 ✓).
A line is parallel to y = 5x + 9 and passes through (1, 2). Find its formula.
Parallel ⟹ same slope ⟹ k = 5. Then 2 = 5·1 + b ⟹ b = 2 − 5 = −3. So y = 5x − 3.
A line on grid paper goes through (0, −2) and (4, 0). Read off its formula.
These are the two intercepts. k = 0 − (−2)4 − 0 = 24 = ½, and the y-intercept (0, −2) gives b = −2. So y = ½x − 2.
Can a function y = kx + b pass through both (1, 4) and (1, 9)? Explain.
No. The two points have the same x but different y, so they sit on a vertical line — and a vertical line is not the graph of a function (one input x = 1 cannot give two outputs). The slope formula even breaks: x₂ − x₁ = 0, so dividing is undefined.
Six questions to lock it in. Tap the answer you think is right.
This lesson reverses the arrow students are used to. Up to now they have gone from a rule to a graph; here they go from data — points, a graph, or a stated property — back to the rule y = kx + b. The single most useful habit to instill is "assume the form first." A learner who writes y = kx + b before doing anything else has already turned a fuzzy "find the line" into a concrete "find two numbers," and every given fact then becomes an equation in k and b.
The misconception to watch is the upside-down slope: students frequently compute run over rise, (x₂ − x₁) ∕ (y₂ − y₁), instead of rise over run. Anchor it to the picture — slope is how much you climb per step across — and have them check the second point every time; a wrong slope is caught instantly. Two further traps: forgetting to back-solve b after finding k (stopping at the slope), and trying to fit two points with the same x, which is a vertical line and not a function at all.
This material aligns with Common Core 8.F.B.4 (construct a linear function from two points, a graph, or a description; find the rate of change and initial value), 8.EE.B.6 (find slope from two points), and the high-school standards F-LE.A.2 and F-BF.A.1a (build a linear function from points or a graph).