Pre-Algebra • Functions

Linear Function Modeling — I can use linear functions to model and solve problems involving distance, cost, or constant rate.

Learn how straight-line equations help you predict costs, distances, and other real-world quantities.

Middle School Math emblem with sigma notation, geometric shapes, and a ruler.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Where Did Linear Functions Come From?

People have been solving problems about constant rates for thousands of years. Ancient farmers needed to know how much grain to plant for a certain area of land. Merchants needed to figure out the total cost of many items at the same price. These are all situations where one quantity changes at a steady, constant rate — and that's exactly what linear functions describe.

~1800 BCE • Babylonian Math Tables

Ancient Babylonians created clay tablets with tables showing constant-rate relationships, like the cost of different amounts of grain.

~300 BCE • Euclid's Geometry

The Greek mathematician Euclid studied proportions and ratios. His work laid the groundwork for understanding constant rates.

1637 • Descartes and the Coordinate Plane

René Descartes invented the x-y coordinate plane. This let people draw equations as lines and curves for the first time.

Today • Linear Models Everywhere

We use linear functions daily — from ride-share pricing to tracking a runner's distance. Any time something grows at a constant rate, a linear function can model it.

Here's the big question these thinkers were trying to answer: If something changes at a steady rate, how can we predict what will happen next? That's the power of a linear function — it gives you a formula to make predictions.

SECTION 2

Core Principles of Linear Functions

Before we start solving problems, let's lock in a few key ideas. A linear function is a rule that creates a straight line when you graph it. It always has a constant rate of change, meaning the output goes up (or down) by the same amount each time the input goes up by one.

1

Slope (Rate of Change)

The slope tells you how fast the output changes. It is the amount of change in y for every 1-unit increase in x. Think of it as the 'speed' of the function.
2

Y-Intercept (Starting Value)

The y-intercept is the output value when the input is 0. It's your starting point — like a flat fee before anything else is added.
3

y = mx + b

This is the slope-intercept form. Here, m is the slope and b is the y-intercept. Every linear function can be written this way.
4

Constant Rate

A constant rate means the same amount is added each time. If you earn $10 per hour, after 1 hour you have $10, after 2 hours $20, and so on. The rate never changes.
✦

KEY TAKEAWAY

Think of a linear function like a vending machine. You put in a number of dollars (x), and the machine gives you a result (y). The slope is how much each dollar 'buys,' and the y-intercept is what you get before you even put in any money — like a free sample!

SECTION 3

Seeing a Linear Function on a Graph

A picture is worth a thousand words — especially in math. When you graph a linear function, you always get a straight line. The diagram below shows the function y = 3x + 2. Notice how the line starts at the point (0, 2) on the y-axis. That's the y-intercept. Then it rises 3 units for every 1 unit it moves to the right. That's the slope.

Graph of y = 3x + 2xy012345025811(0, 2)(1, 5)(2, 8)(3, 11)run = 1rise = 3slope = rise ÷ runm = 3 ÷ 1 = 3
The graph shows y = 3x + 2. The cyan dots are plotted points. The yellow dashed line shows the 'run' (1 unit right), and the pink dashed line shows the 'rise' (3 units up). The slope is 3, and the y-intercept is 2.

Look at how the line goes up from left to right. Every time x increases by 1, y increases by 3. That's the constant rate of change. The line crosses the y-axis at 2. That's the starting value, or y-intercept.

SECTION 4

The Math Behind Linear Models

Every linear function can be written using slope-intercept form. Let's break down the formula and see what each letter means.

SLOPE-INTERCEPT FORM

y=mx+by = mx + b

y = the output (what you're finding), m = slope (rate of change), x = the input (the value you choose), b = y-intercept (the starting value when x = 0)

To find the slope when you know two points, use the slope formula.

SLOPE FORMULA

m=(y2−y1)÷(x2−x1)m = (y₂ − y₁) ÷ (x₂ − x₁)

Pick any two points on the line. Subtract the y-values (the rise), then divide by the difference in x-values (the run).

Let's see how these formulas connect to real life. Imagine a taxi charges $4 just to get in the car, plus $2 per mile. The function would be: y = 2x + 4. Here, m = 2 (dollars per mile) and b = 4 (the flat fee).

DISTANCE FORMULA (CONSTANT SPEED)

d=r×td = r × t

d = distance, r = rate (speed), t = time. This is a linear function where the slope is the speed and the y-intercept is 0 (you start at distance 0).

SECTION 5

Three Types of Linear Models

Linear functions show up in three very common situations: distance problems, cost problems, and constant rate problems. The diagram below compares all three side by side.

Three Types of Linear ModelsDISTANCEd = r × tTime (hours)Distance (mi)Slope = speedb = 0 (start at 0)COSTC = price × n + feeItems boughtTotal cost ($)Slope = price per itemb = flat feeCONSTANT RATEy = mx + bInput (x)Output (y)Slope = rateb = starting value
All three model types produce straight lines. In distance problems, the slope is speed and the y-intercept is usually 0. In cost problems, the slope is the price per item and the y-intercept is a flat fee. In constant rate problems, the slope is the rate and the y-intercept is the starting value.
Model TypeWhat Slope MeansWhat Y-Intercept MeansExample
DistanceSpeed (miles per hour)Starting distance (usually 0)d = 60t (driving 60 mph)
CostPrice per item or unitFlat fee or membership costC = 3n + 5 ($3/item + $5 shipping)
Constant RateAmount gained or lost per unitStarting amounty = 15x + 50 (saving $15/week, starting with $50)

Common linear model types and what their parts mean

SECTION 6

Worked Example: Movie Streaming Cost

Let's work through a real problem step by step. You sign up for a streaming service that charges a $10 monthly fee plus $3 for each movie you rent. How much will you spend if you rent 7 movies this month?

Finding Total Cost

  1. 1

    Step 1 — Identify the slope and y-intercept

    The cost per movie is $3, so the slope m = 3. The monthly fee is $10, so the y-intercept b = 10.
    m = 3, b = 10
  2. 2

    Step 2 — Write the equation

    Using y = mx + b, we get:
    C = 3n + 10
  3. 3

    Step 3 — Substitute the input value

    You want to rent 7 movies, so plug in n = 7: C = 3(7) + 10
    C = 3 × 7 + 10
  4. 4

    Step 4 — Simplify

    Multiply first: 3 × 7 = 21. Then add: 21 + 10 = 31.
    C = $31
💡

Check Your Work!

You can verify by making a table: 0 movies = $10, 1 movie = $13, 2 movies = $16 … each time the cost goes up by $3. At 7 movies you get $31. ✓

SECTION 7

When Linear Models Work — and When They Don't

Linear functions are super useful, but they don't work for every situation. Let's compare when they're a great fit and when you need a different kind of model.

Strengths ✅Limitations ⚠️
Easy to write and use — just y = mx + bOnly works when the rate of change is constant
Great for predictions — plug in any x to find yCan't model things that speed up or slow down (like a bouncing ball)
Graphs are simple straight lines, easy to readDoesn't handle curves, like population growth
Works for distance, cost, temperature, savings, and moreMay give unrealistic answers far outside the data range

Strengths and limitations of linear function models

✦

KEY TAKEAWAY

Think of a linear model like a ruler — it's perfect for drawing straight lines, but it can't draw curves. If the rate of change stays the same, a linear model is your best friend. If the rate changes, you'll need a different tool later on (like quadratic or exponential functions).

SECTION 8

From Linear to Nonlinear: What Comes Next?

You've learned that a linear function has a constant rate of change. But what happens when the rate itself changes? That's where nonlinear functions come in. In future courses, you'll meet exponential functions (where things double repeatedly) and quadratic functions (where things speed up or slow down).

FeatureLinear (You Are Here!)Nonlinear (Coming Soon)
Graph ShapeStraight lineCurved line
Rate of ChangeAlways the same (constant)Changes as x changes
Equation Formy = mx + by = ax² + bx + c, y = a × bˣ, and others
Real-World ExampleDriving at a steady 50 mphA ball thrown into the air (slows, stops, falls)

Linear vs. nonlinear functions

The great news is that everything you learn about linear functions — slope, y-intercept, graphing, writing equations — will help you understand those more advanced models when you get there. You're building a strong foundation right now!

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

In the equation y = 5x + 12, what does the 5 represent and what does the 12 represent? Give a real-world example that could match this equation.
Show answer
The 5 is the slope, which is the rate of change — it tells you that y increases by 5 for every 1-unit increase in x. The 12 is the y-intercept, which is the starting value when x = 0. A real-world example: you have $12 in your piggy bank and you save $5 each week. After x weeks, you'll have y = 5x + 12 dollars.

Question 2: BASIC CALCULATION

A bike rental shop charges $8 per hour. Write a linear function for the total cost, and find how much it costs to rent a bike for 5 hours.
Show answer
Since there is no flat fee, the y-intercept is 0 and the slope is 8. The equation is C = 8h. Substituting h = 5: C = 8 × 5 = 40. The cost for 5 hours is $40. This makes sense because each hour adds $8, and 5 × $8 = $40.

Question 3: INTERMEDIATE

A cell phone plan costs $25 per month plus $0.10 per text message. Last month, your bill was $40. How many text messages did you send?
Show answer
Write the equation: C = 0.10n + 25, where n is the number of texts. We know C = 40, so substitute: 40 = 0.10n + 25. Subtract 25 from both sides: 15 = 0.10n. Divide both sides by 0.10: n = 150. You sent 150 text messages. You can check: 150 × $0.10 = $15, plus $25 = $40. ✓

Question 4: APPLIED

Two friends are saving money. Amir has $30 and saves $8 per week. Brianna has $60 and saves $5 per week. After how many weeks will they have the same amount?
Show answer
Write both equations. Amir: A = 8w + 30. Brianna: B = 5w + 60. Set them equal: 8w + 30 = 5w + 60. Subtract 5w from both sides: 3w + 30 = 60. Subtract 30 from both sides: 3w = 30. Divide by 3: w = 10. After 10 weeks, both will have the same amount. Check: Amir has 8(10) + 30 = $110. Brianna has 5(10) + 60 = $110. ✓

Question 5: CRITICAL THINKING

A car is 200 miles from home and drives toward home at 50 miles per hour. Write a linear function for the distance from home over time. What does a negative slope mean here? When does the car arrive home?
Show answer
The car starts 200 miles away, so b = 200. It gets closer by 50 miles each hour, so the slope is −50 (negative because the distance is decreasing). The equation is d = −50t + 200. A negative slope means the output is going down over time — the car is getting closer to home. To find when it arrives, set d = 0: 0 = −50t + 200. Then 50t = 200, so t = 4. The car arrives home after 4 hours. This previews the idea that slope direction (positive or negative) tells you whether a quantity is increasing or decreasing.

SUMMARY

Lesson Summary

Summary

A linear function is a rule written as y = mx + b, where m (the slope) is the constant rate of change and b (the y-intercept) is the starting value. Its graph is always a straight line. You can use this form to model distance, cost, and constant rate problems by identifying what the slope and y-intercept mean in the real-world situation.

To solve a problem, write the equation by finding m and b, then substitute your known value and simplify. Linear models work best when the rate of change stays constant. If the rate changes, you'll explore nonlinear functions in future courses. Great work — you now have a powerful tool for making predictions!

Varsity Tutors • Pre-Algebra • Linear Function Modeling