Types of linear functions. First-degree polynomial
You rent an electric scooter. The app charges $\$1$ to unlock it, plus $\$0.40$ for every minute you ride. How much will a 15-minute ride cost? And how could you find the price of any ride without redoing the thinking each time? A rule like this is a linear function, and its graph is always a straight line.
The three types of linear functions
A first-degree polynomial in $x$ has the form $mx + b$. As a function, it is the simplest one whose graph is a line that is not horizontal. Letting $m = 0$ also gives horizontal lines.
Depending on $m$ and $b$, there are three cases:
| Type | Condition | Equation | Graph |
|---|---|---|---|
| Direct variation (proportional) | $b = 0$, $m \neq 0$ | $y = mx$ | Line through the origin $(0, 0)$ |
| Non-proportional linear (also called affine) | $m \neq 0$, $b \neq 0$ | $y = mx + b$ | Slanted line that misses the origin |
| Constant | $m = 0$ | $y = b$ | Horizontal line |
Some problems call direct variation the "strictly linear" function, and the second type the "affine" function. Those are just other names for the cases in the table.
Why does $b$ matter so much? If $b = 0$, doubling $x$ doubles $y$, because $m(2x) = 2(mx)$. That is what "proportional" means. If $b \neq 0$, the fixed amount $b$ does not get doubled. For $y = 0.5x + 2$: $x = 2$ gives $y = 3$, but $x = 4$ gives $y = 4$, not $6$.
Move the sliders and watch what $m$ and $b$ do to the line:
Identify the slope $m$ and the y-intercept $n$ of the following linear functions: a) $y = -4x + 7$ b) $y = \frac{2}{5}x$ c) $y = -3$
Identify the slope $m$ and the y-intercept $n$ of the following linear functions:
- a) $y = -4x + 7$
- b) $y = \frac{2}{5}x$
- c) $y = -3$
Write the equation of the line that has a slope of $5$ and a y-intercept of $-2$.
Write the equation of the line that has a slope of $5$ and a y-intercept of $-2$.
Classify the following functions as direct proportion functions (strictly linear), affine functions, or constant functions: a) $f(x) = 3x - 1$ b) $g(x) = \frac{x}{4}$ c)…
Classify the following functions as direct proportion functions (strictly linear), affine functions, or constant functions:
- a) $f(x) = 3x - 1$
- b) $g(x) = \frac{x}{4}$
- c) $h(x) = 8$
Evaluating a function and checking points
To evaluate $f$ at $a$, substitute $a$ for $x$ and compute $f(a)$. To go the other way, finding the input that gives a certain output $k$, you solve the equation $mx + b = k$.
The fare of a taxi is given by the function $C(x) = 1.50x + 3$, where $C(x)$ is the cost in dollars and $x$ is the distance traveled in miles. How much will a trip of…
The fare of a taxi is given by the function $C(x) = 1.50x + 3$, where $C(x)$ is the cost in dollars and $x$ is the distance traveled in miles. How much will a trip of $8$ miles cost?
Check analytically whether the points $A(2, 5)$ and $B(-1, -3)$ belong to the graph of the function $y = 2x + 1$.
Check analytically whether the points $A(2, 5)$ and $B(-1, -3)$ belong to the graph of the function $y = 2x + 1$.
Intercepts and the triangle with the axes
A line meets the axes at special points.
-
y-intercept: set $x = 0$. You get $(0, b)$.
-
x-intercept: set $y = 0$ and solve $mx + b = 0$. You get $x = -\dfrac{b}{m}$, when $m \neq 0$.
If a line has positive intercepts, it cuts off a right triangle in the first quadrant. The two legs lie on the axes, so the area is $\tfrac{1}{2} \cdot (\text{x-intercept}) \cdot (\text{y-intercept})$.
You can also run it backwards.
Calculate the points of intersection with the coordinate axes (x-axis and y-axis) of the line $y = 3x - 12$.
Calculate the points of intersection with the coordinate axes (x-axis and y-axis) of the line $y = 3x - 12$.
Calculate the area of the triangle formed by the line $y = -\frac{3}{4}x + 3$ when it intersects the coordinate axes in the first quadrant.
Calculate the area of the triangle formed by the line $y = -\frac{3}{4}x + 3$ when it intersects the coordinate axes in the first quadrant.
Find the equation of the line that passes through the point $(0, 5)$ and forms a right triangle of area $10$ square units with the coordinate axes in the first quadrant.
Find the equation of the line that passes through the point $(0, 5)$ and forms a right triangle of area $10$ square units with the coordinate axes in the first quadrant.
Writing an equation from a slope and a point
If you know the slope $m$ and one point on the line, the only unknown in $y = mx + b$ is $b$. Substitute the point and solve for $b$. One point alone is not enough, because infinitely many lines pass through it. You need two independent pieces of information, such as a point and the slope.
The same idea finds an unknown parameter. If a line must pass through a point, substitute the point and solve for the unknown.
Find the equation of the line that has a slope of $m = -2$ and passes through the point $(1, 4)$.
Find the equation of the line that has a slope of $m = -2$ and passes through the point $(1, 4)$.
Determine the value of the parameter $k$ so that the line with equation $y = kx + 5$ passes through the point $(3, -4)$.
Determine the value of the parameter $k$ so that the line with equation $y = kx + 5$ passes through the point $(3, -4)$.
Writing an equation from two points or a graph
With two points $(x_1, y_1)$ and $(x_2, y_2)$, first find the slope, then find $b$ as in the last section.
To read an equation from a graph, look for the y-intercept (where the line crosses the y-axis) and for two points that fall exactly on grid intersections. Count the rise and the run between them. In the picture, the y-intercept is $1$ and the slope is $\tfrac{3}{4}$, so $y = \tfrac{3}{4}x + 1$.
From the following graph, determine the slope, the y-intercept, and the equation of the line.
From the following graph, determine the slope, the y-intercept, and the equation of the line.
Find the equation of the line that passes through the points $A(-2, 5)$ and $B(4, -7)$.
Find the equation of the line that passes through the points $A(-2, 5)$ and $B(4, -7)$.
Parallel and coincident lines
Two lines $y = m_1x + b_1$ and $y = m_2x + b_2$ compare like this:
-
Parallel: same slope, different y-intercepts ($m_1 = m_2$, $b_1 \neq b_2$). They never meet.
-
Coincident: same slope and same y-intercept. They are the same line.
-
Different slopes: they cross at exactly one point.
When a problem gives several conditions, translate each into an equation about $m$ and $b$: "parallel to $r$" fixes the slope, "passes through a point" or "has a given y-intercept" fixes $b$.
Find the equation of the line that is parallel to $y = 3x - 2$ and passes through the point $(-1, 4)$.
Find the equation of the line that is parallel to $y = 3x - 2$ and passes through the point $(-1, 4)$.
The line $r$ passes through the points $(1, 2)$ and $(3, 8)$. The line $s$ is parallel to $r$ and its y-intercept is half the y-intercept of $r$. Determine the equation…
The line $r$ passes through the points $(1, 2)$ and $(3, 8)$. The line $s$ is parallel to $r$ and its y-intercept is half the y-intercept of $r$. Determine the equation of the line $s$.
Given the lines $y = (2m - 1)x + 5$ and $y = 3x - n$, determine the values of the parameters $m$ and $n$ so that both equations represent exactly the same line…
Given the lines $y = (2m - 1)x + 5$ and $y = 3x - n$, determine the values of the parameters $m$ and $n$ so that both equations represent exactly the same line (coincident lines).
Where two lines meet
At the intersection point, both lines have the same $x$ and the same $y$. So set the two expressions for $y$ equal, solve for $x$, then substitute back to get $y$.
Intersections often give the point for another step.
Find analytically the point of intersection of the lines $y = 4x - 5$ and $y = -2x + 7$. Check that your result matches the point indicated on the following graph.
Find analytically the point of intersection of the lines $y = 4x - 5$ and $y = -2x + 7$. Check that your result matches the point indicated on the following graph.
Find the values of $a$ and $b$ so that the line $y = ax + b$ simultaneously satisfies two conditions: being parallel to the line $y = \frac{1}{2}x$ and passing through…
Find the values of $a$ and $b$ so that the line $y = ax + b$ simultaneously satisfies two conditions: being parallel to the line $y = \frac{1}{2}x$ and passing through the point of intersection of the lines $y = 2x - 4$ and $y = -x + 5$.
Modeling with linear functions
To turn a story into a function, ask two questions:
-
What is the starting amount (the value when $x = 0$)? That is $b$.
-
How much does the output change for each extra unit of input? That is $m$. It is negative when the quantity decreases.
When you only know two data points, find the slope first.
Back to the start: the scooter costs $\$1$ to unlock plus $\$0.40$ per minute, so $C(t) = 0.4t + 1$. A 15-minute ride costs $C(15) = 0.4 \cdot 15 + 1 = 6 + 1 = \$7$.
A plumber charges $\$30$ for a service call, plus $\$15$ for each hour of work. Write the algebraic expression of the function that relates the cost to the time worked…
A plumber charges $\$30$ for a service call, plus $\$15$ for each hour of work. Write the algebraic expression of the function that relates the cost to the time worked and calculate how much they will charge for a repair that takes $3.5$ hours.
A water tank initially contains $800$ gallons and is emptying at a constant rate of $20$ gallons per minute. Write the function that relates the volume of water in the…
A water tank initially contains $800$ gallons and is emptying at a constant rate of $20$ gallons per minute. Write the function that relates the volume of water in the tank to the elapsed time and calculate in which minute the tank will empty completely.
The relationship between the temperature in degrees Celsius ($^\circ C$) and degrees Fahrenheit ($^\circ F$) is linear. We know that water freezes at $0^\circ C$, which…
The relationship between the temperature in degrees Celsius ($^\circ C$) and degrees Fahrenheit ($^\circ F$) is linear. We know that water freezes at $0^\circ C$, which is equivalent to $32^\circ F$, and boils at $100^\circ C$, which is equivalent to $212^\circ F$. Find the linear function that allows converting degrees Celsius ($x$) to degrees Fahrenheit ($y$).
Cost, revenue, and inverse functions
Businesses use two linear functions. Cost $C(x) = (\text{cost per item})x + (\text{fixed cost})$ and revenue $R(x) = (\text{price})x$. The profit is $P(x) = R(x) - C(x)$. To find how many items give at least a goal profit, solve an inequality.
For $f(x) = mx + b$, the inverse comes from swapping the roles of input and output and solving: $x = \dfrac{y - b}{m}$.
A sneaker factory has fixed monthly costs of $\$5000$. In addition, producing each pair of sneakers costs $\$15$. If the company sells each pair for $\$40…
A sneaker factory has fixed monthly costs of $\$5000$. In addition, producing each pair of sneakers costs $\$15$. If the company sells each pair for $\$40$, write the cost function $C(x)$ and the revenue function $R(x)$. How many pairs of sneakers must they sell per month to make a profit of at least $\$2000$?
The length $L$ of an elastic spring, measured in inches, is given by the function $L(p) = 15 + 0.2p$, where $p$ is the weight hung in ounces. Find the expression for the…
The length $L$ of an elastic spring, measured in inches, is given by the function $L(p) = 15 + 0.2p$, where $p$ is the weight hung in ounces. Find the expression for the inverse function $p(L)$ and use it to calculate what weight has been hung if the spring measures exactly $22$ in.
Piecewise linear functions and graphs
Sometimes a situation follows one linear rule at first and a different one later. A piecewise function uses a different formula on each interval of $x$.
Graphs of distance versus time are also piecewise linear. The slope of each segment is the speed: a flat segment means stopped, a positive slope means moving away from home, and a negative slope means coming back. Speed itself is the size of the slope.
A parking lot charges $\$2.50$ for the first hour (or fraction of an hour). After the first hour, it charges $\$0.05$ for each additional minute. Write the piecewise…
A parking lot charges $\$2.50$ for the first hour (or fraction of an hour). After the first hour, it charges $\$0.05$ for each additional minute. Write the piecewise function $C(t)$ that represents the total cost in dollars as a function of the time $t$ in minutes that a vehicle is parked.
The following graph shows the distance a cyclist is from their home as a function of time. Determine the piecewise analytical expression of the function $d(t)$ and…
The following graph shows the distance a cyclist is from their home as a function of time. Determine the piecewise analytical expression of the function $d(t)$ and calculate what the cyclist's constant speed was during the return trip.