Construct a linear function from two input-output pairs
I can construct a linear function from two input-output pairs.
- Standards:
- 8.F.B.4
- Useful foundations
- Enabling knowledge: Interpret slope as unit rate of change
- Enabling knowledge: Write equations of linear relationships
Seshvi AI · Your lesson tutor
A different explanation, a smaller step, or help making sense of your work.
Sign in to ask Seshvi AITwo clues unlock the whole line
A mystery machine gives 7 when you put in 2, and 16 when you put in 5. You are told its rule is linear. Can you rebuild the machine?
Two different inputs give us enough information for one nonvertical straight line. We will find the change first, then rewind to the start.
Try it first
Try it
Unlock a two-clue machine
Use two pairs to rebuild a linear rule. Check both clues before moving on.
This machine follows a linear rule. Use both clues to unlock it.
Clue 1: input 2 → output 7
Clue 2: input 5 → output 16
The idea, in plain words
For two points with different x-values, calculate . Next, substitute either point into to find . Finally, test both points.
Two points alone do not prove that a real-world relationship is linear. This method works when linearity is given or is an explicit modelling assumption. If the inputs are equal, you cannot use this method to find a unique rule .
Let's work it out
1. Unlock the machine
From to , the slope is . Use : , so . The rule is .
2. Start away from the origin
A line passes through and . Its slope is . Since , . Check: .
3. A rule that falls
For and , the slope is . Then , so . The rule is .
4. A fraction in the rule
For and , the slope is . Since , . Thus .
5. Check the special cases
Points and give slope 0 and rule . Points and instead lie on a vertical line, . That is not a rule with one y-output for each x-input.
Your next challenge
Try it
Can these clues unlock one line?
Decide whether two clues determine one nonvertical linear function.
Clue 1: input 2 → output 7
Clue 2: input 5 → output 16
Pause and try
-
A line goes through (0,4) and (3,10). What are m and b?
-
Why is 16÷5 not the slope of the opening machine?
-
Can (2,3) and (2,8) define y=mx+b?
Compare your thinking
-
m=2 and b=4, so y=2x+4.
-
Slope compares changes between points. A nonzero starting value makes output÷input different from the slope.
-
No. The input 2 would have two outputs, and the slope calculation has zero run.
Another view
Input zero gives −3. A negative intercept is valid in a mathematical rule; a real story still needs suitable units and a sensible domain.
Take it somewhere new
A linear delivery charge is £11 for 2 km and £23 for 6 km. Find the charge rule.
After your try
The rate is (23−11)/(6−2)=3 pounds per km. The fixed fee is 11−3×2=5 pounds. C=3d+5.
Keep this idea
Change, divide, rewind, check. Two distinct inputs determine one line when a linear rule is intended.
Why y = mx + b gives a straight line
In y = mx + b, the output is b when x = 0, and every increase of 1 in x adds m to the output. The change is the same everywhere, so the graph is a straight line.
See it in outputs. For y = 4x + 1, inputs 0, 1, 2, 3 give 1, 5, 9, 13. Each step adds 4. Every step of 1 to the right goes up 4, so the points line up. The slope is 4 and the line meets the vertical axis at (0, 1).
Order does not matter. y = 1 + 4x and y = 4x + 1 are the same rule. To find m, look for the number multiplying x; b is the number added on its own. In y = 6 − x, m = −1 and b = 6, so the line falls 1 for every step right.
Spot a rule that is not linear. For y = 2^x (2 multiplied by itself x times, with 2^0 = 1), inputs 0, 1, 2, 3 give 1, 2, 4, 8. The changes are 1, 2, 4: they grow, so the graph curves upward. If the output changes over equal input steps are not all equal, the rule cannot be written as y = mx + b.
The test. Equal input steps with equal output changes: linear, with a straight graph. Output changes that vary: nonlinear, with a curved graph.
Lines where one coordinate stays fixed
Some lines are perfectly flat or perfectly upright. For these lines, one coordinate never changes.
Horizontal lines. The points (−2, 7), (1, 7) and (5, 7) all have y-coordinate 7. Their x-coordinates are different, and any x is allowed: (100, 7) is on the same line. Because the height never changes, the line is horizontal, and its equation is y = 7. The equation says nothing about x, so x is free to take any value.
Vertical lines. The points (−5, 0), (−5, 2) and (−5, 8) all have x-coordinate −5. Now y changes and x stays fixed, so the points stack up one above another. The line is vertical, and its equation is x = −5.
The general rule. Every point of the form (x, b) satisfies y = b, whatever x is, because its y-coordinate is b. Every point of the form (a, y) satisfies x = a. So y = b is a horizontal line through (0, b), and x = a is a vertical line through (a, 0).
A common slip. The line x = −5 crosses the x-axis at (−5, 0), but that does not make it horizontal. Ask which coordinate is fixed: if x is fixed, the line is vertical; if y is fixed, it is horizontal.
To write the equation, find the coordinate that is the same in every point, and set it equal to that number.
Practice this lesson
Sign in and choose a learner profile to practise. Answers are checked and saved to the learner's profile.
Sign in to practiseHow was this lesson?
Sign in to leave feedback.