Linear Models
Textbook Reference
| Primary source | OpenStax Calculus Volume 1, Section 1.2: “Basic Classes of Functions” |
| Direct link | https://openstax.org/books/calculus-volume-1/pages/1-2-basic-classes-of-functions |
| Supplementary | OpenStax Precalculus 2e, Section 2.2: “Linear Functions” |
| Supplementary link | https://openstax.org/books/precalculus-2e/pages/2-2-linear-functions |
Both sources are free and openly licensed.
Try This First
A plant is 5 centimeters tall when first measured. Over the next several weeks, it grows at a steady rate of 2 centimeters per week.
Fill in the table below. Predict first, then compute.
| Weeks elapsed | Height (cm) |
|---|---|
| 0 | ? |
| 1 | ? |
| 2 | ? |
| 3 | ? |
| $t$ | ? |
Questions before reading further:
- If you plot the data points (weeks, height), what kind of curve do you expect?
- How much does the height change for each additional week? Does that amount change?
- What does the “2 cm per week” represent geometrically on the graph?
Keep your answers. The slope, the linear model, and the rate of change build on them.
Key idea
A linear function models any situation where a constant amount is added to the output every time the input increases by one unit. The graph is a straight line. The slope of that line is the constant rate of change. Understanding slope as a rate -- specifically, the ratio of how much the output changes to how much the input changes -- is the foundational idea that calculus will later generalize to non-constant rates.
In the plant example: adding 2 cm per week is a constant rate of change. When the rate of change is not constant (a plant grows faster in summer and slower in winter), the linear model no longer applies, and calculus is needed to describe the changing rate. The constant case is the baseline; a changing rate needs calculus.
Prerequisite Check
Before this lesson, make sure you can do all of the following:
If any of these is uncertain, review linear equations before continuing.
Quick Reference
Forms of a linear equation.
| Form | Equation | When to use |
|---|---|---|
| Slope-intercept | $y = mx + b$ | When slope and $y$-intercept are known |
| Point-slope | $y - y_1 = m(x - x_1)$ | When slope and one point are known |
| Standard | $Ax + By = C$ | General form; easy to find both intercepts |
Slope. For a line through $(x_1, y_1)$ and $(x_2, y_2)$: $$ m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x} $$
Parallel and perpendicular lines.
| Relationship | Slope condition |
|---|---|
| Parallel | Same slope: $m_1 = m_2$ |
| Perpendicular | Negative reciprocal slopes: $m_1 \cdot m_2 = -1$ |
Key Concepts
1. Slope as a Rate of Change
Slope is not just a number attached to a line. Slope is the rate at which the output changes per unit increase in the input.
If $f(x) = mx + b$, then for any two inputs $x_1$ and $x_2$: $$ \frac{f(x_2) - f(x_1)}{x_2 - x_1} = \frac{(mx_2 + b) - (mx_1 + b)}{x_2 - x_1} = \frac{m(x_2 - x_1)}{x_2 - x_1} = m. $$
The ratio of output change to input change is always $m$, regardless of which two inputs are chosen. This is the defining property of linearity: a constant rate of change.
Two representations, one idea.
Algebraic: The coefficient $m$ in $y = mx + b$ is the rate of change of $y$ with respect to $x$.
Graphical: Move right 1 unit on the graph; move up (or down, if $m < 0$) by exactly $m$ units. The line has constant steepness everywhere.
Translation prompt: For the plant problem from the opener, identify $m$ and $b$ in the formula $h(t) = mt + b$. Write a sentence explaining what $m$ and $b$ represent in the context of the plant. Then reverse: given only the slope $m = 2$ and the $y$-intercept $b = 5$ on a graph, write the real-world interpretation.
Predict-then-check. For $f(x) = 3x - 7$, predict the change in output when $x$ increases from $4$ to $7$.
Prediction: Input increases by $7 - 4 = 3$ units. Rate of change is $m = 3$. Output should change by $3 \times 3 = 9$ units.
Check: $f(7) - f(4) = (21 - 7) - (12 - 7) = 14 - 5 = 9$. Prediction confirmed.
2. Slope-Intercept Form and Point-Slope Form
Slope-intercept form: $y = mx + b$.
Here $m$ is the slope and $b$ is the $y$-intercept (the output when the input is zero). This form is useful when graphing or when the starting value $b$ has meaning in the context.
Example. A cell phone plan charges a flat fee of \$20 per month plus \$0.10 per minute of calls. If $x$ is the number of minutes used, the monthly cost is: $$ C(x) = 0.10x + 20. $$ The $y$-intercept $b = 20$ is the cost even with zero minutes (the flat fee). The slope $m = 0.10$ is the rate: 10 cents per additional minute.
Point-slope form: $y - y_1 = m(x - x_1)$.
This form is useful when you know the slope and one specific point $(x_1, y_1)$ on the line, but not the $y$-intercept.
Example. A line has slope $m = -2$ and passes through the point $(3, 5)$.
Write in point-slope form: $y - 5 = -2(x - 3)$.
Convert to slope-intercept: $y - 5 = -2x + 6 \implies y = -2x + 11$.
Ask why: Why is point-slope form defined the way it is? The slope formula says $\dfrac{y - y_1}{x - x_1} = m$ for any point $(x, y)$ on the line. Multiplying both sides by $(x - x_1)$ gives the point-slope form. It is the slope formula, rearranged. Knowing this derivation means you never need to memorize the formula -- you can reconstruct it from the definition of slope.
3. Standard Form
The standard form of a linear equation is $Ax + By = C$, where $A$, $B$, $C$ are integers and $A \geq 0$ (by convention).
Finding intercepts from standard form.
$x$-intercept: set $y = 0$, solve for $x$: $x = C/A$.
$y$-intercept: set $x = 0$, solve for $y$: $y = C/B$.
Example. Find the intercepts of $3x + 4y = 12$.
$x$-intercept ($y = 0$): $3x = 12 \implies x = 4$. Point: $(4, 0)$.
$y$-intercept ($x = 0$): $4y = 12 \implies y = 3$. Point: $(0, 3)$.
Two points determine the line. Plot $(4, 0)$ and $(0, 3)$ and connect them.
Slope: $m = -A/B = -3/4$. For every 4 units moved to the right, the line drops 3 units.
Two representations, one idea.
Numerical table:
| $x$ | $0$ | $4$ | $8$ |
|---|---|---|---|
| $y$ | $3$ | $0$ | $-3$ |
Algebraic: $y = -\frac{3}{4}x + 3$.
Translation prompt: Given the table above, compute the slope between each consecutive pair of points. Confirm all three slopes are equal. Then write the slope-intercept form directly from the table.
4. Parallel and Perpendicular Lines
Two lines are parallel if and only if they have the same slope (and different $y$-intercepts -- if the $y$-intercepts are also the same, the lines are identical).
Two lines are perpendicular if and only if their slopes are negative reciprocals: $m_1 \cdot m_2 = -1$, or equivalently $m_2 = -1/m_1$.
Example. Line $L_1$: $y = \frac{2}{3}x + 1$. Find a line $L_2$ parallel to $L_1$ through $(6, 0)$ and a line $L_3$ perpendicular to $L_1$ through $(6, 0)$.
Parallel ($L_2$): Same slope $m = 2/3$. Through $(6, 0)$: $$ y - 0 = \frac{2}{3}(x - 6) \implies y = \frac{2}{3}x - 4. $$
Perpendicular ($L_3$): Slope $= -\dfrac{1}{2/3} = -\dfrac{3}{2}$. Through $(6, 0)$: $$ y - 0 = -\frac{3}{2}(x - 6) \implies y = -\frac{3}{2}x + 9. $$
Check: Do $L_1$ and $L_3$ meet at a right angle? Slopes $2/3$ and $-3/2$. Product: $(2/3)(-3/2) = -1$. Confirmed.
5. Linear Models in Context
A linear model is appropriate when the rate of change of the quantity is constant over the interval being modeled. The key checks:
- Does the output change by a fixed amount for each unit increase in input? (If yes: constant rate, linear model.)
- Does the graph of the data look like a straight line? (Visually: are the points collinear or close to a line?)
Example. A car rents for \$40 per day plus \$0.25 per mile driven. Express the total cost as a function of miles $d$ driven in a 1-day rental.
$$C(d) = 0.25d + 40.$$
Slope: 0.25 (dollars per mile). $y$-intercept: 40 (cost for zero miles, i.e., the flat daily fee).
Predict-then-check. Predict the cost for 200 miles: $C(200) = 0.25(200) + 40 = 50 + 40 = \$90$. Reasonable for a one-day rental.
Ask why: Is the model exactly right? The cost per mile might change (gas prices, tire wear), and the flat fee might include some mileage. A linear model is an approximation. Knowing when the approximation is good enough and when a better model is needed is part of mathematical modeling, a theme that will recur throughout calculus.
Named Misconception
Misconception ID: rate-as-fixed-number
Some students treat the slope $m$ as merely a fixed number -- a label attached to the line -- rather than as a rate describing how the output changes relative to the input. A symptom of this misconception: a student can report $m = 3$ for a line but cannot say what it means in a given context, or cannot explain why a slope of $3$ makes the line steeper than a slope of $1$.
Why this breaks: The slope is the ratio $\Delta y / \Delta x$. It carries units: “output units per input unit”. A slope of $m = 3$ meters per second means something very different from $m = 3$ dollars per mile. Treating slope as just a number strips away the meaning that makes linear models useful.
Small test: A function has slope $m = -5$ in a model where $x$ is measured in hours and $y$ is measured in liters of water in a tank. What does the slope mean? The answer is not “the line tilts downward”. The slope means the tank loses 5 liters per hour. If the slope were $-5$ in a different context where $x$ is in days and $y$ is in kilometers, it would mean something entirely different.
Correct view: Slope is a rate of change with units. Reading slope correctly means reading both the number and the units, and connecting both to the situation being modeled.
Worked Example
Problem. At noon, a store has sold 15 units of a product. By 4 PM (four hours later), it has sold 47 units.
(a) Assuming a constant sales rate, write a linear model $S(t)$ for the number of units sold, where $t$ is hours after noon. (b) Predict the number of units sold by 7 PM. (c) If the store closes with 80 units sold, at what time does that happen?
Step 1: Predict. The sales are increasing at a constant rate. Expect a line with positive slope. At $t = 0$, $S = 15$.
Step 2: Find the slope. $$ m = \frac{47 - 15}{4 - 0} = \frac{32}{4} = 8 \text{ units per hour.} $$
Step 3: Write the model. $y$-intercept is 15 (units sold at noon). Slope is 8. $$ S(t) = 8t + 15. $$
Step 4: Predict for 7 PM. $7$ PM is $t = 7$ (hours after noon). $$ S(7) = 8(7) + 15 = 56 + 15 = 71 \text{ units.} $$
Step 5: Find when $S = 80$. $$ 8t + 15 = 80 \implies 8t = 65 \implies t = 8.125 \text{ hours.} $$ $0.125$ hours $= 7.5$ minutes. The store reaches 80 units at $t = 8$ hours $7.5$ minutes after noon, which is 8:07:30 PM.
Step 6: Check the prediction. $S(4) = 8(4) + 15 = 47$. Matches the given data.
Common Errors
| Error | Example | Correction |
|---|---|---|
| Inverting the slope fraction | $m = (x_2 - x_1)/(y_2 - y_1)$ instead of $\Delta y / \Delta x$ | Slope is always $\Delta y$ (output change) divided by $\Delta x$ (input change) |
| Writing $y - y_1 = m(x + x_1)$ in point-slope form | Sign error on $x_1$ | The form is $y - y_1 = m(x - x_1)$; both terms have minus signs |
| Confusing parallel (same slope) with perpendicular (negative reciprocal) | “Perpendicular means same slope with opposite sign” | Perpendicular slopes are negative reciprocals: if $m = 2/3$, perpendicular slope is $-3/2$ |
| Treating slope as a number without units | “Slope is 4” with no unit | Slope is 4 output-units per input-unit; always attach the unit context |
| Forgetting to include the flat rate as the $y$-intercept | Modeling a rental as $C = 0.25d$ when there is a \$40 flat fee | The flat fee is the $y$-intercept: $C = 0.25d + 40$ |
Common Misconceptions
the slope of a linear model is a single fixed number that describes the whole relationship, not a rate of change between quantities.
This is the rate-as-fixed-number error. The slope $m$ in $f(x) = mx + b$ is a rate: it measures how many units the output changes for each one-unit increase in the input. For a taxi fare model $C = 0.25d + 3$, the slope 0.25 means the cost increases by \$0.25 for each additional kilometer -- it always carries units (dollars per kilometer) and always describes a ratio of changes, not an isolated number. Writing “slope = 0.25” without the units loses the meaning that makes the model useful.
Leveled Practice
Level 1 -- Direct Application
Problem 1. Find the slope of the line through $(2, -3)$ and $(8, 9)$.
Show answer
$m = \dfrac{9 - (-3)}{8 - 2} = \dfrac{12}{6} = 2$.
The line rises 2 units for every 1 unit moved to the right.
Problem 2. Write the equation of the line with slope $-4$ that passes through $(5, 3)$, in slope-intercept form.
Show answer
Point-slope: $y - 3 = -4(x - 5)$.
Expand: $y - 3 = -4x + 20$.
Slope-intercept: $y = -4x + 23$.
Check: at $x = 5$: $y = -20 + 23 = 3$. Correct.
Problem 3. Determine whether the lines $2x + 3y = 6$ and $3x - 2y = 4$ are parallel, perpendicular, or neither.
Show answer
Line 1: $3y = -2x + 6 \implies y = -\frac{2}{3}x + 2$. Slope: $m_1 = -2/3$.
Line 2: $2y = 3x - 4 \implies y = \frac{3}{2}x - 2$. Slope: $m_2 = 3/2$.
Product: $(-2/3)(3/2) = -1$. The lines are perpendicular.
Level 2 -- Multiple Representations
Problem 4. A linear function $f$ satisfies $f(2) = 7$ and $f(5) = -2$.
(a) Find the slope. (b) Write $f$ in slope-intercept form. (c) Find the $x$-intercept. (d) Interpret the slope: if the input is time in hours and the output is temperature in degrees Celsius, what does the slope mean?
Show answer
(a) $m = \dfrac{-2 - 7}{5 - 2} = \dfrac{-9}{3} = -3$.
(b) Using point $(2, 7)$: $y - 7 = -3(x - 2) \implies y = -3x + 13$.
(c) Set $y = 0$: $0 = -3x + 13 \implies x = 13/3 \approx 4.33$.
(d) The temperature decreases by 3 degrees Celsius per hour.
Problem 5. A rideshare service charges a base fare of \$2.50 plus \$1.75 per mile.
(a) Write a linear model for the total cost $C$ as a function of miles $m$. (b) How much does a 12-mile trip cost? (c) A budget of \$25 is available. What is the maximum number of whole miles that can be traveled? (d) On a graph with miles on the horizontal axis and cost on the vertical axis, identify the slope and $y$-intercept and explain what each represents.
Show answer
(a) $C(m) = 1.75m + 2.50$.
(b) $C(12) = 1.75(12) + 2.50 = 21 + 2.50 = \$23.50$.
(c) $1.75m + 2.50 \leq 25 \implies 1.75m \leq 22.50 \implies m \leq 12.857...$. Maximum whole miles: 12.
(d) Slope $= 1.75$: each additional mile costs \$1.75. $y$-intercept $= 2.50$: the base fare charged even for a zero-mile trip.
Level 3 -- Derivation and Extension
Problem 6 (Low Floor, High Ceiling). Derive the point-slope form $y - y_1 = m(x - x_1)$ from the definition of slope. Use only the definition $m = \dfrac{y_2 - y_1}{x_2 - x_1}$.
Show answer
Let $(x_1, y_1)$ be a fixed known point on the line with slope $m$. Let $(x, y)$ be any other point on the same line.
By the definition of slope: $$ m = \frac{y - y_1}{x - x_1} \quad \text{(for any point } (x, y) \neq (x_1, y_1) \text{ on the line)}. $$
Multiply both sides by $(x - x_1)$: $$ m(x - x_1) = y - y_1. $$
Rewrite: $$ y - y_1 = m(x - x_1). $$
This is the point-slope form. It is not a separate formula -- it is the slope definition solved for $y$. Once the slope definition is understood, the point-slope form follows in one step.
Extension question: What happens if we replace $(x_1, y_1)$ with the $y$-intercept $(0, b)$? Then $y - b = m(x - 0) \implies y = mx + b$. The slope-intercept form is a special case of point-slope form.
Mastery Checklist
You have mastered this skill when you can do all of the following without referring to notes:
Mental Model
A linear function describes any situation where the same amount is added to the output every time the input increases by one unit. The slope is that amount per unit, with units attached. The $y$-intercept is the starting value (the output when the input is zero).
The graph is a straight line because the rate of change is constant: every horizontal step of the same size produces the same vertical step. If you walk along the line and measure the rise over run between any two points, you always get the same ratio -- that is the defining property of a straight line.
Calculus extends this idea. For curves (non-linear functions), the rate of change is not constant. The slope of the curve at a single point is the derivative. The derivative at each point is defined as the limit of slope calculations over smaller and smaller intervals. Everything learned here about slope as a ratio and rate of change is the foundation for that definition.
Connections
Within Chapter 1
- Polynomial functions: A polynomial of degree 1 is a linear function. Linear functions are the simplest polynomials. The end behavior, slope, and intercepts developed here are the starting point for understanding all polynomial functions.
- All other function families: Linear models are the baseline for comparison. When you later ask “does this exponential function grow faster or slower than a linear function?”, the answer requires knowing what linear growth looks like.
Toward Later Calculus
- Definition of the derivative (Chapter 3): The derivative at a point is defined as $f'(a) = \lim_{h \to 0} \dfrac{f(a+h) - f(a)}{h}$. This limit is the limit of a slope (change in output over change in input) as the input interval shrinks to zero. The slope concepts in this lesson are the precursor.
- Linear approximation (Chapter 4): Near any point where a function is differentiable, the function is approximately linear. The tangent line at a point is the best linear approximation to the function there. The slope of that tangent line is the derivative.
- Integration (Chapter 5): The integral of a constant function (which is a horizontal line) is a linear function of the bounds. Linear functions are the easiest integrands.
Audience Notes
For students who find slopes confusing: Always attach units. If the output is dollars and the input is hours, the slope is dollars per hour. The number alone is incomplete. Writing out the units forces you to think about what the slope means, not just compute it.
For students who want to go further: The concept of slope as a rate generalizes in multiple directions. In multivariable calculus, a function of two variables has a slope in every direction (a gradient). In linear algebra, linear functions are the central object of study. The eigenvalues and eigenvectors of a matrix describe the special directions along which the linear transformation acts like a simple scaling -- a multidimensional generalization of slope.
Back to Chapter 1 Skills | Previous: Power Functions | Next: Algebraic Functions