Back to homeMathematics · Algebra 1 · Change subject
Start for free
Algebra 1 · Mathematics
Functions · Elementary functions

Types of linear functions. First-degree polynomial

Before you start, make sure you know: Linear equations (Math 8 (Pre-Algebra))

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.

Three lines: y = 0.5x through the origin, y = 0.5x + 2 crossing the y-axis at 2, and the horizontal line y = 3. x y (0, 2) y = 0.5x y = 0.5x + 2 y = 3

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:

Practice★☆☆Not started
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:

  1. a) $y = -4x + 7$
  2. b) $y = \frac{2}{5}x$
  3. c) $y = -3$
Solve
Practice★☆☆Not started
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$.

Solve
Practice★☆☆Not started
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:

  1. a) $f(x) = 3x - 1$
  2. b) $g(x) = \frac{x}{4}$
  3. c) $h(x) = 8$
Solve

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$.

Practice★☆☆Not started
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?

Solve
Practice★☆☆Not started
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$.

Solve

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})$.

The line y = -2x + 6 meets the axes at (0, 6) and (3, 0), forming a right triangle with area 9. x y (0, 6) (3, 0) area = 9

You can also run it backwards.

Practice★☆☆Not started
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$.

Solve
Practice★★☆Not started
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.

Solve
Practice★★★Not started
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.

Solve

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.

Practice★☆☆Not started
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)$.

Solve
Practice★★☆Not started
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)$.

Solve

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.

The line y = 0.75x + 1 through (0, 1) and (4, 4), with a run of 4 and a rise of 3 marked. x y (0, 1) (4, 4) run = 4 rise = 3

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$.

Practice★☆☆Not started
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.

X Y 2 −4
Solve
Practice★★☆Not started
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)$.

Solve

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$.

Practice★★☆Not started
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)$.

Solve
Practice★★★Not started
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$.

Solve
Practice★★★Not started
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).

Solve

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.

Practice★★☆Not started
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.

X Y ? ?
Solve
Practice★★★Not started
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$.

Solve

Modeling with linear functions

To turn a story into a function, ask two questions:

  1. What is the starting amount (the value when $x = 0$)? That is $b$.

  2. 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$.

Practice★★☆Not started
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.

Solve
Practice★★☆Not started
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.

Solve
Practice★★☆Not started
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$).

Solve

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}$.

Practice★★★Not started
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$?

Solve
Practice★★★Not started
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.

Solve

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.

Distance from home versus time: ride out 24 miles in 2 hours, rest for 1 hour, return home in 2 hours. d (miles) t (hours) 1 2 3 4 5 (2, 24) (3, 24) d = 12t d = 60 − 12t
Practice★★★Not started
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.

Solve
Practice★★★Not started
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.

t (h) d (mi) 2 3 5 40
Solve

Summary

See all the exercises in this section