You know that moment when a math problem looks harmless — and then it asks you to "write a linear function f with the given values" and your brain just stalls? Yeah. You're not alone. Most people freeze not because linear functions are hard, but because the wording feels like a test instead of a task.
Here's the thing — once you see what those "given values" actually are, it's way more like filling in a recipe than solving a mystery. You've got inputs, you've got outputs, and you're just writing the rule that connects them.
So let's walk through it like a person, not a textbook Worth keeping that in mind..
What Is a Linear Function Anyway
Forget the formal definition for a second. No curves. You put in an x, you get out an f(x), and the change between points is always steady. A linear function is just a straight-line relationship between two things. No drama That's the part that actually makes a difference..
When someone says "write a linear function f with the given values," they're handing you pieces of that line — usually points, a slope, a table, or a graph — and asking you to turn those pieces into an equation. The equation is almost always one of these forms:
- Slope-intercept: f(x) = mx + b
- Point-slope: f(x) - y₁ = m(x - x₁)
- Standard: Ax + By = C (less common for "f" notation, but you'll see it)
The letter f is just a name. Also, it means "function. " So f(x) is the output when x goes in. That's it That's the whole idea..
The Values You Might Be Given
The "given values" show up in a few common costumes:
- Two points: like (2, 5) and (4, 9)
- A slope and a point: m = 3, passes through (1, 2)
- A table of x and f(x) pairs
- A word description: "f decreases by 2 every time x increases by 1, and f(0) = 4"
- A graph you have to read
Turns out, they're all the same puzzle. You're finding m (the slope) and b (the y-intercept) so you can say f(x) = mx + b.
Why People Actually Care About This
Why does this matter? Because most people skip the "why" and just memorize steps — then forget them the second the test ends. But linear functions are everywhere Worth keeping that in mind. That alone is useful..
Your phone plan charges $30 plus $10 per gigabyte? That's f(x) = 10x + 30. Practically speaking, the distance a car travels at steady speed? Linear. That said, a weekly allowance that grows by the same amount each year? Linear.
When you can write a linear function f with the given values, you can predict stuff. You can spot a bad deal. You can explain to your kid why the pizza place's "free delivery over $20" is still a line, not a curve Worth knowing..
And here's what goes wrong when people don't get it: they guess. They mix up x and y. They think slope is just "the number in front" without checking. They write f(x) = 2x + 5 when the line clearly hits zero at a different spot. Real talk — that's where the mistakes come from, not from the math being cruel.
How To Write a Linear Function F With the Given Values
Alright, the meaty part. Let's break it down by what you're handed.
Given Two Points
Say you're told: write a linear function f with the given values (1, 3) and (4, 12) Small thing, real impact..
Step one: find the slope. Slope is rise over run.
m = (y₂ - y₁) / (x₂ - x₁) m = (12 - 3) / (4 - 1) = 9 / 3 = 3
Step two: plug one point into f(x) = mx + b to find b The details matter here..
Use (1, 3): 3 = 3(1) + b 3 = 3 + b b = 0
So f(x) = 3x. Done.
I know it sounds simple — but it's easy to miss the sign when points are negative. Slow down there.
Given a Slope and One Point
Now they say: m = -2, and the line passes through (3, 4). Write a linear function f with the given values.
You can use point-slope if you like, but I usually just go straight to f(x) = mx + b Worth keeping that in mind..
4 = -2(3) + b 4 = -6 + b b = 10
So f(x) = -2x + 10 Still holds up..
Look, point-slope is fine too: f(x) - 4 = -2(x - 3), then simplify. Same answer. Use whatever your brain trusts more.
Given a Table
Tables trip people up because they look busy. But you only need two rows.
x | f(x) 0 | 7 2 | 13
Slope: (13 - 7) / (2 - 0) = 6 / 2 = 3. Since x = 0 gives f(x) = 7, that's your b. So f(x) = 3x + 7 And it works..
Here's what most people miss: if the table doesn't include x = 0, you still find slope from any two rows, then solve for b like before. Don't wait for zero to show up.
Given a Description in Words
This is the one that feels like a trick. "A function f is linear. f(2) = 8 and f(5) = 17." That's just two points again: (2, 8) and (5, 17).
m = (17 - 8) / (5 - 2) = 9 / 3 = 3 8 = 3(2) + b → b = 2 f(x) = 3x + 2.
The short version is: words are just points wearing a costume.
Given a Graph
Read two clear points. So same steps. If it's vertical — that's not a function, so you won't be asked to write f(x) for it. And if the line is horizontal, slope is 0 and f(x) = b. Check the y-intercept if it's marked. Worth knowing Most people skip this — try not to..
Common Mistakes People Make
Honestly, this is the part most guides get wrong because they list "sign errors" and stop. Let's go deeper.
Mixing up which number is x and which is f(x). If the pair is (2, 5), x is 2, output is 5. Not the other way.
Forgetting to distribute the negative. When slope is negative and you use point-slope, that minus sign travels. f(x) - 4 = -2(x - 3) means f(x) = -2x + 6 + 4. People write +6 - 4 and wonder why it's off.
Using slope as b. Slope is m. The y-intercept is b. They are not the same unless the line goes through zero.
Assuming the first value in a table is x = 0. It might be x = 1 or x = -3. Read the labels.
Writing y = instead of f(x) =. If the prompt says "write a linear function f," use f(x). Teachers and editors notice. In practice, they mean the same, but match the notation Worth keeping that in mind..
Rounding too early. If slope is 2/3, keep it as 2/3. Don't write 0.67 and then wonder why b is wrong Simple, but easy to overlook..
Practical Tips That Actually Work
Skip the generic "practice makes perfect." Here's what helps:
- Always write the formula first. Literally scratch out f(x) = mx + b before you do anything. It anchors your brain.
- Circle the given values. Physically mark what's x, what's f(x), what's m. Reduces mix-ups.
- Check with the second point. Found f(x) = 3x + 2 from (2,8)? Plug in the other point, say (5,17). 3(5)+2 = 17. Yes. If it fails, you
've caught the error before it ever reaches a test or a boss Less friction, more output..
-
Say it out loud in plain English. "The output goes up 3 every time input goes up 1, and it starts at 2." If the sentence sounds wrong, the math probably is too.
-
Sketch it quickly even when you don't have to. A rough line on scrap paper makes slope and intercept obvious and stops you from trusting a number that "looks right."
Conclusion
Writing a linear function isn't about memorizing five separate methods — it's about recognizing that every format, whether equation, table, sentence, or graph, is really just handing you points and a rate of change. Learn to spot m and b, write the formula first, and check your answer against a second point, and the rest is repetition. The notation might shift, the numbers might get messy, but the structure never does: f(x) = mx + b, always Worth keeping that in mind..