Learning Objectives

In this section you will:

Front view of a subway train, the maglev train.
Figure 1. Shanghai MagLev Train (credit: “kanegen”/Flickr)

Just as with the growth of a bamboo plant, there are many situations that involve constant change over time. Consider, for example, the first commercial maglev train in the world, the Shanghai MagLev Train (Figure 1). It carries passengers comfortably for a 30-kilometer trip from the airport to the subway station in only eight minutes[1] .

Suppose a maglev train travels a long distance, and maintains a constant speed of 83 meters per second for a period of time once it is 250 meters from the station. How can we analyze the train’s distance from the station as a function of time? In this section, we will investigate a kind of function that is useful for this purpose, and use it to investigate real-world situations such as the train’s distance from the station at a given point in time.

2.1.1 – Representing Linear Functions

The function describing the train’s motion is a linear function, which is defined as a function with a constant rate of change. This is a polynomial of degree 1. There are several ways to represent a linear function, including word form, function notation, tabular form, and graphical form. We will describe the train’s motion as a function using each method.

Representing a Linear Function in Word Form

Let’s begin by describing the linear function in words. For the train problem we just considered, the following word sentence may be used to describe the function relationship.

  • The train’s distance from the station is a function of the time during which the train moves at a constant speed plus its original distance from the station when it began moving at constant speed.

The speed is the rate of change. Recall that a rate of change is a measure of how quickly the dependent variable changes with respect to the independent variable. The rate of change for this example is constant, which means that it is the same for each input value. As the time (input) increases by 1 second, the corresponding distance (output) increases by 83 meters. The train began moving at this constant speed at a distance of 250 meters from the station.

Representing a Linear Function in Function Notation

Another approach to representing linear functions is by using function notation. One example of function notation is an equation written in the slope-intercept form of a line, where [latex]\,x\,[/latex] is the input value, [latex]\,m\,[/latex] is the rate of change, and [latex]\,b\,[/latex] is the initial value of the dependent variable.


[latex]$$\begin{array}{cc}\text{Equation form}\phantom{\rule{2em}{0ex}}\hfill & y=mx+b\hfill \\ \text{Function notation}\phantom{\rule{2em}{0ex}}\hfill & f\left(x\right)=mx+b\hfill \end{array}$$[/latex]

In the example of the train, we might use the notation [latex]\,D\left(t\right)\,[/latex] where the total distance [latex]\,D\,[/latex] is a function of the time [latex]\,t.\,[/latex] The rate, [latex]\,m,\,[/latex] is 83 meters per second. The initial value of the dependent variable [latex]\,b\,[/latex] is the original distance from the station, 250 meters. We can write a generalized equation to represent the motion of the train.



Representing a Linear Function in Tabular Form

A third method of representing a linear function is through the use of a table. The relationship between the distance from the station and the time is represented in Figure 2. From the table, we can see that the distance changes by 83 meters for every 1 second increase in time.

Table with the first row, labeled t, containing the seconds from 0, 1, 2, 3, and with the second row, labeled D (t), containing the meters 250, 333, 416, and 499. Each value in the first row increases by 1 second, and each value in the second row increases by 83 meters.
Figure 2. Tabular representation of the function [latex]\,D\,[/latex] showing selected input and output values

Can the input in the previous example be any real number?

No. The input represents time so while nonnegative rational and irrational numbers are possible, negative real numbers are not possible for this example. The input consists of non-negative real numbers.

Representing a Linear Function in Graphical Form

Another way to represent linear functions is visually, using a graph. We can use the function relationship from above, [latex]\,D\left(t\right)=83t+250,\,[/latex] to draw a graph as represented in Figure 3. Notice the graph is a line. When we plot a linear function, the graph is always a line.

The rate of change, which is constant, determines the slant, or slope of the line. The point at which the input value is zero is the vertical intercept, or y-intercept, of the line. We can see from the graph that the y-intercept in the train example we just saw is [latex]\,\left(0,250\right)\,[/latex] and represents the distance of the train from the station when it began moving at a constant speed.

This is a graph with y-axis labeled “Distance (m)” and x-axis labeled “Time (s).” The x-axis spans from 0 to 5 and is marked in increments of one. The y-axis spans from 0 to 500 and is marked in increments of one hundred. The graph shows an increasing function. As time increases, distance also increases. The line is graphed along the points (0, 250) and (1, 333)
Figure 3. The graph of [latex]\,D\left(t\right)=83t+250\,[/latex] . Graphs of linear functions are lines because the rate of change is constant.

Notice that the graph of the train example is restricted, but this is not always the case. Consider the graph of the line [latex]\,f\left(x\right)=2x+1.\,[/latex] Ask yourself what numbers can be input to the function. In other words, what is the domain of the function? The domain is comprised of all real numbers because any number may be doubled, and then have one added to the product.

Linear Function

A linear function is a function whose graph is a line. Linear functions can be written in the slope-intercept form of a line




where [latex]\,b\,[/latex] is the initial or starting value of the function (when input, [latex]\,x=0\,[/latex] ), and [latex]\,m\,[/latex] is the constant rate of change, or slope of the function. The y-intercept is at [latex]\,\left(0,b\right).[/latex]

Example 1 – Using a Linear Function to Find the Pressure on a Diver

The pressure, [latex]\,P,[/latex] in pounds per square inch (PSI) on the diver in Figure 4 depends upon her depth below the water surface, [latex]\,d,[/latex] in feet. This relationship may be modeled by the equation, [latex]\,P\left(d\right)=0.434d+14.696.\,[/latex] Restate this function in words.

This figure shows a scuba diver.
Figure 4. (credit: Ilse Reijs and Jan-Noud Hutten)

To restate the function in words, we need to describe each part of the equation. The pressure as a function of depth equals four hundred thirty-four thousandths times depth plus fourteen and six hundred ninety-six thousandths.


The initial value, 14.696, is the pressure in PSI on the diver at a depth of 0 feet, which is the surface of the water. The rate of change, or slope, is 0.434 PSI per foot. This tells us that the pressure on the diver increases 0.434 PSI for each foot her depth increases.

2.1.2 – Building Linear Models from Verbal Descriptions

A skyline view of Seattle with a focus on the Space Needle.
Figure 5. (credit: EEK Photography/Flickr)

Emily is a college student who plans to spend a summer in Seattle. She has saved $3,500 for her trip and anticipates spending $400 each week on rent, food, and activities. How can we write a linear model to represent her situation? What would be the x-intercept, and what can she learn from it? To answer these and related questions, we can create a model using a linear function. Models such as this one can be extremely useful for analyzing relationships and making predictions based on those relationships. In this subsection, we will explore examples of linear function models.

When building linear models to solve problems involving quantities with a constant rate of change, we typically follow the same problem strategies that we would use for any type of function. Let’s briefly review them:

  1. Identify changing quantities, and then define descriptive variables to represent those quantities. When appropriate, sketch a picture or define a coordinate system.
  2. Carefully read the problem to identify important information. Look for information that provides values for the variables or values for parts of the functional model, such as slope and initial value.
  3. Carefully read the problem to determine what we are trying to find, identify, solve, or interpret.
  4. Identify a solution pathway from the provided information to what we are trying to find. Often this will involve checking and tracking units, building a table, or even finding a formula for the function being used to model the problem.
  5. When needed, write a formula for the function.
  6. Solve or evaluate the function using the formula.
  7. Reflect on whether your answer is reasonable for the given situation and whether it makes sense mathematically.
  8. Clearly convey your result using appropriate units, and answer in full sentences when necessary.

Now let’s take a look at the student in Seattle. In her situation, there are two changing quantities: time and money. The amount of money she has remaining while on vacation depends on how long she stays. We can use this information to define our variables, including units.


[latex]$$\begin{array}{l}\text{Output:}\,M,\text{money remaining, in dollars}\\ \text{Input:}\,t,\text{time, in weeks}\end{array}$$[/latex]

So, the amount of money remaining depends on the number of weeks: [latex]\,M\left(t\right)[/latex]. We can also identify the initial value and the rate of change.


[latex]$$\begin{array}{l}\text{ Initial Value: She saved \$3,500, so \$3,500 is the initial value for}\,M.\\ \text{ Rate of Change: She anticipates spending \$400 each week, so}-\text{\$400 per week is the rate of change, or slope}.\end{array}$$[/latex]

Notice that the unit of dollars per week matches the unit of our output variable divided by our input variable. Also, because the slope is negative, the linear function is decreasing. This should make sense because she is spending money each week.

The rate of change is constant, so we can start with the linear model [latex]\,M\left(t\right)=mt+b.\,[/latex] Then we can substitute the intercept and slope provided.

To find the x-intercept, we set the output to zero, and solve for the input.


[latex]$$\begin{array}{ccc}\hfill 0& =& -400t+3500\hfill \\ \hfill t& =& \frac{3500}{400}\hfill \\ & =& 8.75\hfill \end{array}$$[/latex]

The x-intercept is 8.75 weeks. Because this represents the input value when the output will be zero, we could say that Emily will have no money left after 8.75 weeks.

When modeling any real-life scenario with functions, there is typically a limited domain over which that model will be valid—almost no trend continues indefinitely. Here the domain refers to the number of weeks. In this case, it doesn’t make sense to talk about input values less than zero. A negative input value could refer to a number of weeks before she saved $3,500, but the scenario discussed poses the question once she saved $3,500 because this is when her trip and subsequent spending starts. It is also likely that this model is not valid after the x-intercept, unless Emily uses a credit card and goes into debt. The domain represents the set of input values, so the reasonable domain for this function is [latex]\,0\le t\le 8.75.[/latex]

In this example, we were given a written description of the situation. We followed the steps of modeling a problem to analyze the information. However, the information provided may not always be the same. Sometimes we might be provided with an intercept. Other times we might be provided with an output value. We must be careful to analyze the information we are given, and use it appropriately to build a linear model.

Using a Given Intercept to Build a Model

Some real-world problems provide the y-intercept, which is the constant or initial value. Once the y-intercept is known, the x-intercept can be calculated. Suppose, for example, that Hannah plans to pay off a no-interest loan from her parents. Her loan balance is $1,000. She plans to pay $250 per month until her balance is $0. The y-intercept is the initial amount of her debt, or $1,000. The rate of change, or slope, is -$250 per month. We can then use the slope-intercept form and the given information to develop a linear model.


[latex]$$\begin{array}{ccc}\hfill f\left(x\right)& =& mx+b\hfill \\ & =& -250x+1000\hfill \end{array}$$[/latex]

Now we can set the function equal to 0, and solve for [latex]\,x\,[/latex] to find the x-intercept.


[latex]$$\begin{array}{ccc}\hfill 0& =& -250x+1000\hfill \\ \hfill 1000& =& 250x\hfill \\ \hfill 4& =& x\hfill \\ \hfill x& =& 4\hfill \end{array}$$[/latex]

The x-intercept is the number of months it takes her to reach a balance of $0. The x-intercept is 4 months, so it will take Hannah four months to pay off her loan.

Using a Given Input and Output to Build a Model

Many real-world applications are not as direct as the ones we just considered. Instead they require us to identify some aspect of a linear function. We might sometimes instead be asked to evaluate the linear model at a given input or set the equation of the linear model equal to a specified output.

How To

Given a word problem that includes two pairs of input and output values, use the linear function to solve a problem.

  1. Identify the input and output values.
  2. Convert the data to two coordinate pairs.
  3. Find the slope.
  4. Write the linear model.
  5. Use the model to make a prediction by evaluating the function at a given x-value.
  6. Use the model to identify an x-value that results in a given y-value.
  7. Answer the question posed.

Example 2 – Using a Linear Model to Investigate a Town’s Population

A town’s population has been growing linearly. In 2004, the population was 6,200. By 2009, the population had grown to 8,100. Assume this trend continues.

  1. Predict the population in 2013.
  2. Identify the year in which the population will reach 15,000.

The two changing quantities are the population size and time. While we could use the actual year value as the input quantity, doing so tends to lead to very cumbersome equations because the y-intercept would correspond to the year 0, more than 2000 years ago!

To make computation a little nicer, we will define our input as the number of years since 2004.


[latex]$$\begin{array}{l}\\ \begin{array}{l}\text{Input:}\,t,\text{years since 2004}\hfill \\ \text{Output:}\,P\left(t\right),\text{the town’s population}\hfill \end{array}\end{array}$$[/latex]


To predict the population in 2013 ( [latex]t=9[/latex] ), we would first need an equation for the population. Likewise, to find when the population would reach 15,000, we would need to solve for the input that would provide an output of 15,000. To write an equation, we need the initial value and the rate of change, or slope.

To determine the rate of change, we will use the change in output per change in input.


[latex]$$m=\frac{\text{change in output}}{\text{change in input}}$$[/latex]


The problem gives us two input-output pairs. Converting them to match our defined variables, the year 2004 would correspond to [latex]\,t=0,[/latex] giving the point [latex]\,\left(0,\text{6200}\right).\,[/latex] Notice that through our clever choice of variable definition, we have “given” ourselves the y-intercept of the function. The year 2009 would correspond to [latex]\,t=\text{5,}[/latex] giving the point [latex]\,\left(5,\text{8100}\right).[/latex]

The two coordinate pairs are [latex]\,\left(0,\text{6200}\right)\,[/latex] and [latex]\,\left(5,\text{8100}\right).\,[/latex] Recall that we encountered examples in which we were provided two points earlier in the chapter. We can use these values to calculate the slope.


[latex]$$\begin{array}{ccc}\hfill m& =& \frac{8100-6200}{5-0}\hfill \\ & =& \frac{1900}{5}\hfill \\ & =& 380\text{ people per year}\hfill \end{array}$$[/latex]


We already know the y-intercept of the line, so we can immediately write the equation:




To predict the population in 2013, we evaluate our function at [latex]\,t=9.[/latex]


[latex]$$\begin{array}{ccc}\hfill P\left(9\right)& =& 380\left(9\right)+6,200\hfill \\ & =& 9,620\hfill \end{array}$$[/latex]


If the trend continues, our model predicts a population of 9,620 in 2013.

To find when the population will reach 15,000, we can set [latex]\,P\left(t\right)=15000\,[/latex] and solve for [latex]\,t.[/latex]


[latex]$$\begin{array}{ccc}\hfill 15000& =& 380t+6200\hfill \\ \hfill 8800& =& 380t\hfill \\ \hfill t& \approx & 23.158\hfill \end{array}$$[/latex]


Our model predicts the population will reach 15,000 in a little more than 23 years after 2004, or somewhere around the year 2027.

Example 3 – Using a Linear Function to Determine the Number of Songs in a Music Collection

Marcus currently has 200 songs in his music collection. Every month, he adds 15 new songs. Write a formula for the number of songs, [latex]\,N,[/latex] in his collection as a function of time, [latex]\,t,[/latex] the number of months. How many songs will he own at the end of one year?

The initial value for this function is 200 because he currently owns 200 songs, so [latex]\,N\left(0\right)=200,[/latex] which means that [latex]\,b=200.[/latex]

The number of songs increases by 15 songs per month, so the rate of change is 15 songs per month. Therefore we know that [latex]\,m=15.\,[/latex] We can substitute the initial value and the rate of change into the slope-intercept form of a line.

This image shows the equation f of x equals m times x plus b. It shows that m is the value 15 and b is 200. It then shows the equation rewritten as N of t equals 15 times t plus 200.

We can write the formula [latex]\,N\left(t\right)=15t+200.[/latex]

With this formula, we can then predict how many songs Marcus will have at the end of one year (12 months). In other words, we can evaluate the function at [latex]\,t=12.[/latex]

[latex]$$\begin{array}{ccc}N\left(12\right)& =& 15\left(12\right)+200\hfill \\ & =& 180+200\hfill \\ & =& 380\hfill \end{array}$$[/latex]

Marcus will have 380 songs in 12 months.


Notice that N is an increasing linear function. As the input (the number of months) increases, the output (number of songs) increases as well.

Example 4 – Using Tabular Form to Write an Equation for a Linear Function

The table below relates the number of rats in a population to time, in weeks. Use the table to write a linear equation.

number of weeks, w 0 2 4 6
number of rats, P(w) 1000 1080 1160 1240

We can see from the table that the initial value for the number of rats is 1000, so [latex]\,b=1000.[/latex]

Rather than solving for [latex]\,m,[/latex] we can tell from looking at the table that the population increases by 80 for every 2 weeks that pass. This means that the rate of change is 80 rats per 2 weeks, which can be simplified to 40 rats per week.


Is the initial value always provided in a table of values like in Example 4?

No. Sometimes the initial value is provided in a table of values, but sometimes it is not. If you see an input of 0, then the initial value would be the corresponding output. If the initial value is not provided because there is no value of input on the table equal to 0, find the slope, substitute one coordinate pair and the slope into [latex]\,f\left(x\right)=mx+b,\,[/latex] and solve for [latex]\,b.[/latex]

Try It

A company sells doughnuts. They incur a fixed cost of $25,000 for rent, insurance, and other expenses. It costs $0.25 to produce each doughnut.

  1. Write a linear model to represent the cost [latex]\,C\,[/latex] of the company as a function of [latex]\,x,[/latex] the number of doughnuts produced.
  2. Find and interpret the y-intercept.
Show answer

a. [latex]\,C\left(x\right)=0.25x+25,000\,[/latex] b. The y-intercept is [latex]\,\left(0,25,000\right).\,[/latex] If the company does not produce a single doughnut, they still incur a cost of $25,000.

Try It

A city’s population has been growing linearly. In 2008, the population was 28,200. By 2012, the population was 36,800. Assume this trend continues.

  1. Predict the population in 2014.
  2. Identify the year in which the population will reach 54,000.
Show answer
  1. 41,100
  2. 2020
Finding the x-intercept of a Line

So far we have been finding the y-intercepts of a function: the point at which the graph of the function crosses the y-axis. Recall that a function may also have an x-intercept, which is the x-coordinate of the point where the graph of the function crosses the x-axis. In other words, it is the input value when the output value is zero.

To find the x-intercept, set a function [latex]\,f\left(x\right)\,[/latex] equal to zero and solve for the value of [latex]\,x.\,[/latex] For example, consider the function shown.


Set the function equal to 0 and solve for [latex]\,x.[/latex]

[latex]$$\begin{array}{ccc}\hfill 0& =& 3x-6\hfill \\ \hfill 6& =& 3x\hfill \\ \hfill 2& =& x\hfill \\ \hfill x& =& 2\hfill \end{array}$$[/latex]

The graph of the function crosses the x-axis at the point [latex]\,\left(2,\text{0}\right).[/latex]

Do all linear functions have x-intercepts?

No. However, linear functions of the form [latex]\,y=c,[/latex] where [latex]\,c\,[/latex] is a nonzero real number are the only examples of linear functions with no x-intercept. For example, [latex]\,y=5\,[/latex] is a horizontal line 5 units above the x-axis. This function has no x-intercepts, as shown in Figure 6.

Graph of the function y = 5, a completely horizontal line that goes through the point (0,5). Graphed on an xy-plane with the x-axis ranging from -3 to 3 and the y-plane ranging from -1 to 8.
Figure 6.


The x-intercept of the function is value of [latex]\,x\,[/latex] when [latex]\,f\left(x\right)=0.\,[/latex] It can be solved by the equation [latex]\,0=mx+b.[/latex]

Example 5 – Finding an x-intercept

Find the x-intercept of [latex]\,f\left(x\right)=\frac{1}{2}x-3.[/latex]

Set the function equal to zero to solve for [latex]\,x.[/latex]

[latex]$$\begin{array}{ccc}\hfill 0& =& \frac{1}{2}x-3\hfill \\ \hfill 3& =& \frac{1}{2}x\hfill \\ \hfill 6& =& x\hfill \\ \hfill x& =& 6\hfill \end{array}$$[/latex]

The graph crosses the x-axis at the point [latex]\,\left(6,\text{0}\right).[/latex]


A graph of the function is shown in Figure 7. We can see that the x-intercept is [latex]\,\left(6,\text{0}\right)\,[/latex] as we expected.

Graph of the linear function with the points (6,0) and (0,-3) labeled with a slope of ½.
Figure 7.

Try It

Find the x-intercept of [latex]\,f\left(x\right)=\frac{1}{4}x-4.[/latex]

Show answer

[latex]\,\left(16,\text{ 0}\right)[/latex]

Access this online resource for additional instruction and practice with linear functions.

Key Concepts

  • Linear functions can be represented in words, function notation, tabular form, and graphical form. See Example 1.
  • When modeling and solving a problem, identify the variables and look for key values, including the slope and y-intercept. See Example 2, Example 3, and Example 4.
  • The x-intercept is the point at which the graph of a linear function crosses the x-axis. See Example 5.


linear function
a function with a constant rate of change and whose graph is a straight line
the ratio of the change in output values to the change in input values; a measure of the steepness of a line
slope-intercept form
the equation for a line that represents a linear function in the form [latex]\,f\left(x\right)=mx+b[/latex]


Icon for the Creative Commons Attribution 4.0 International License

Algebra and Trigonometry Copyright © 2015 by OpenStax is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book