# Linear Functions

## Linear Functions


### Learning Objectives

1. Find the slope of a line (IA 3.2.1)
2. Find an equation of the line given two points (IA 3.3.3)

### Objective 1: Find the slope of a line. (IA 3.2.1)

Linear functions are a specific type of function that can be used to model many real-world applications, such as the growth of a plant, earned salary, the distance a train travels over time, or the costs to start a new business. In this section, we will explore linear functions, their graphs, and how to find them using data points.

### 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  is the initial or starting value of the function (when input, ), and  is the constant rate of change, or slope of the function. The  -intercept is at (  ).
  
When interpreting slope, it will be important to consider the units of measurement. Make sure to always attach these units to both the numerator and denominator when they are provided to you. 

### Practice Makes Perfect

Find the slope of the line.


### Objective 2: Find an equation of the line given two points. (IA 3.3.3)


### Find an Equation of the Line Given Two Points

When data is collected, a linear model can be created from two data points. In the next example we’ll see how to find an equation of a line when two points are given by following the steps below.

### Practice Makes Perfect

Find an equation of the line given two points.
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 (). It carries passengers comfortably for a 30-kilometer trip from the airport to the subway station in only eight minuteshttp://www.chinahighlights.com/shanghai/transportation/maglev-train.htm. 
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.

### 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.
1. 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 
         is the input value, 
         is the rate of change, and 
         is the initial value of the dependent variable.
In the example of the train, we might use the notation 
         where the total distance 
         is a function of the time 
  The rate, 
         is 83 meters per second. The initial value of the dependent variable 
         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 . From the table, we can see that the distance changes by 83 meters for every 1 second increase in time.

### 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, 
  to draw a graph as represented in . 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 , of the line. We can see from the graph that the y-intercept in the train example we just saw is 
  and represents the distance of the train from the station when it began moving at a constant speed.
Notice that the graph of the train example is restricted, but this is not always the case. Consider the graph of the line 
 
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.

### Determining Whether a Linear Function Is Increasing, Decreasing, or Constant

The linear functions we used in the two previous examples increased over time, but not every linear function does. A linear function may be increasing, decreasing, or constant. For an increasing function, as with the train example, the output values increase as the input values increase. The graph of an increasing function has a positive slope. A line with a positive slope slants upward from left to right as in (a). For a decreasing function, the slope is negative. The output values decrease as the input values increase. A line with a negative slope slants downward from left to right as in (b). If the function is constant, the output values are the same for all input values so the slope is zero. A line with a slope of zero is horizontal as in (c).

### Interpreting Slope as a Rate of Change

In the examples we have seen so far, the slope was provided to us. However, we often need to calculate the slope given input and output values. Recall that given two values for the input, 
  and 
  and two corresponding values for the output, 
  and 
  —which can be represented by a set of points, 
  and 
  —we can calculate the slope 
 


Note that in function notation we can obtain two corresponding values for the output 
  and 
  for the function 
  
  and 
  so we could equivalently write
 indicates how the slope of the line between the points, 
  and 
  is calculated. Recall that the slope measures steepness, or slant. The greater the absolute value of the slope, the steeper the slant is.

### Writing and Interpreting an Equation for a Linear Function

Recall from Equations and Inequalities that we wrote equations in both the slope-intercept form and the point-slope form. Now we can choose which method to use to write equations for linear functions based on the information we are given. That information may be provided in the form of a graph, a point and a slope, two points, and so on. Look at the graph of the function 
  in .
We are not given the slope of the line, but we can choose any two points on the line to find the slope. Let’s choose 
  and 
 

Now we can substitute the slope and the coordinates of one of the points into the point-slope form.
If we want to rewrite the equation in the slope-intercept form, we would find
If we want to find the slope-intercept form without first writing the point-slope form, we could have recognized that the line crosses the y-axis when the output value is 7. Therefore, 
  We now have the initial value 
  and the slope 
  so we can substitute 
  and 
  into the slope-intercept form of a line.
So the function is 
  and the linear equation would be 
  

### Modeling Real-World Problems with Linear Functions

In the real world, problems are not always explicitly stated in terms of a function or represented with a graph. Fortunately, we can analyze the problem by first representing it as a linear function and then interpreting the components of the function. As long as we know, or can figure out, the initial value and the rate of change of a linear function, we can solve many different kinds of real-world problems.

### Graphing Linear Functions

Now that we’ve seen and interpreted graphs of linear functions, let’s take a look at how to create the graphs. There are three basic methods of graphing linear functions. The first is by plotting points and then drawing a line through the points. The second is by using the y-intercept and slope. And the third method is by using transformations of the identity function 
 


### Graphing a Function by Plotting Points

To find points of a function, we can choose input values, evaluate the function at these input values, and calculate output values. The input values and corresponding output values form coordinate pairs. We then plot the coordinate pairs on a grid. In general, we should evaluate the function at a minimum of two inputs in order to find at least two points on the graph. For example, given the function, 
  we might use the input values 1 and 2. Evaluating the function for an input value of 1 yields an output value of 2, which is represented by the point 
  Evaluating the function for an input value of 2 yields an output value of 4, which is represented by the point 
  Choosing three points is often advisable because if all three points do not fall on the same line, we know we made an error.

### Graphing a Function Using y-intercept and Slope

Another way to graph linear functions is by using specific characteristics of the function rather than plotting points. The first characteristic is its y-intercept, which is the point at which the input value is zero. To find the y-intercept, we can set 
  in the equation.
The other characteristic of the linear function is its slope.
Let’s consider the following function.
The slope is 
  Because the slope is positive, we know the graph will slant upward from left to right. The y-intercept is the point on the graph when 
  The graph crosses the y-axis at 
  Now we know the slope and the y-intercept. We can begin graphing by plotting the point 
  We know that the slope is the change in the y-coordinate over the change in the x-coordinate. This is commonly referred to as rise over run, 
  From our example, we have 
  which means that the rise is 1 and the run is 2. So starting from our y-intercept 
  we can rise 1 and then run 2, or run 2 and then rise 1. We repeat until we have a few points, and then we draw a line through the points as shown in .

### Graphing a Function Using Transformations

Another option for graphing is to use a transformation of the identity function 
  A function may be transformed by a shift up, down, left, or right. A function may also be transformed using a reflection, stretch, or compression.

### Vertical Stretch or Compression

In the equation 
  the 
  is acting as the vertical stretch or compression of the identity function. When 
  is negative, there is also a vertical reflection of the graph.  Notice in  that multiplying the equation of 
  by 
  stretches the graph of 
  by a factor of 
  units if 
  and compresses the graph of 
  by a factor of 
  units if 
  This means the larger the absolute value of 
  the steeper the slope.

### Vertical Shift

In 
  the 
  acts as the vertical shift, moving the graph up and down without affecting the slope of the line. Notice in  that adding a value of 
  to the equation of 
  shifts the graph of 
  a total of 
  units up if 
  is positive and 
  units down if 
  is negative.
Using vertical stretches or compressions along with vertical shifts is another way to look at identifying different types of linear functions. Although this may not be the easiest way to graph this type of function, it is still important to practice each method.

### Writing the Equation for a Function from the Graph of a Line

Earlier, we wrote the equation for a linear function from a graph. Now we can extend what we know about graphing linear functions to analyze graphs a little more closely. Begin by taking a look at . We can see right away that the graph crosses the y-axis at the point 
  so this is the y-intercept.
Then we can calculate the slope by finding the rise and run. We can choose any two points, but let’s look at the point 
  To get from this point to the y-intercept, we must move up 4 units (rise) and to the right 2 units (run). So the slope must be
Substituting the slope and y-intercept into the slope-intercept form of a line gives

### 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 , 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 
  equal to zero and solve for the value of 
  For example, consider the function shown.
Set the function equal to 0 and solve for 
  
The graph of the function crosses the x-axis at the point 
 


### Describing Horizontal and Vertical Lines

There are two special cases of lines on a graph—horizontal and vertical lines. A horizontal line indicates a constant output, or y-value. In , we see that the output has a value of 2 for every input value. The change in outputs between any two points, therefore, is 0. In the slope formula, the numerator is 0, so the slope is 0. If we use 
  in the equation 
  the equation simplifies to 
  In other words, the value of the function is a constant. This graph represents the function 
 

A vertical line indicates a constant input, or x-value. We can see that the input value for every point on the line is 2, but the output value varies. Because this input value is mapped to more than one output value, a vertical line does not represent a function. Notice that between any two points, the change in the input values is zero. In the slope formula, the denominator will be zero, so the slope of a vertical line is undefined.
A vertical line, such as the one in , has an x-intercept, but no y-intercept unless it’s the line 
  This graph represents the line 
 


### Determining Whether Lines are Parallel or Perpendicular

The two lines in  are parallel lines: they will never intersect. They have exactly the same steepness, which means their slopes are identical. The only difference between the two lines is the y-intercept. If we shifted one line vertically toward the other, they would become coincident.
We can determine from their equations whether two lines are parallel by comparing their slopes. If the slopes are the same and the y-intercepts are different, the lines are parallel. If the slopes are different, the lines are not parallel.
Unlike parallel lines, perpendicular lines do intersect. Their intersection forms a right, or 90-degree, angle. The two lines in  are perpendicular.
Perpendicular lines do not have the same slope. The slopes of perpendicular lines are different from one another in a specific way. The slope of one line is the negative reciprocal of the slope of the other line. The product of a number and its reciprocal is 
  So, if 
  are negative reciprocals of one another, they can be multiplied together to yield 
 

To find the reciprocal of a number, divide 1 by the number. So the reciprocal of 8 is 
  and the reciprocal of 
  is 8. To find the negative reciprocal, first find the reciprocal and then change the sign.
As with parallel lines, we can determine whether two lines are perpendicular by comparing their slopes, assuming that the lines are neither horizontal nor vertical. The slope of each line below is the negative reciprocal of the other so the lines are perpendicular.
The product of the slopes is –1.

### Writing the Equation of a Line Parallel or Perpendicular to a Given Line

If we know the equation of a line, we can use what we know about slope to write the equation of a line that is either parallel or perpendicular to the given line.

### Writing Equations of Parallel Lines

Suppose for example, we are given the equation shown.
We know that the slope of the line formed by the function is 3. We also know that the y-intercept is 
  Any other line with a slope of 3 will be parallel to 
   So the lines formed by all of the following functions will be parallel to 
  
 
Suppose then we want to write the equation of a line that is parallel to 
   and passes through the point 
  This type of problem is often described as a point-slope problem because we have a point and a slope. In our example, we know that the slope is 3. We need to determine which value of 
   will give the correct line. We can begin with the point-slope form of an equation for a line, and then rewrite it in the slope-intercept form.
So 
   is parallel to 
   and passes through the point 
 

 

### Writing Equations of Perpendicular Lines

We can use a very similar process to write the equation for a line perpendicular to a given line. Instead of using the same slope, however, we use the negative reciprocal of the given slope. Suppose we are given the function shown.
The slope of the line is 2, and its negative reciprocal is 
  Any function with a slope of 
  will be perpendicular to 
  So the lines formed by all of the following functions will be perpendicular to 
 

As before, we can narrow down our choices for a particular perpendicular line if we know that it passes through a given point. Suppose then we want to write the equation of a line that is perpendicular to 
  and passes through the point 
  We already know that the slope is 
  Now we can use the point to find the y-intercept by substituting the given values into the slope-intercept form of a line and solving for 
 

The equation for the function with a slope of 
  and a y-intercept of 2 is
So 
  is perpendicular to 
  and passes through the point 
  Be aware that perpendicular lines may not look obviously perpendicular on a graphing calculator unless we use the square zoom feature.

### Key Concepts

1. Linear functions can be represented in words, function notation, tabular form, and graphical form. See .
2. An increasing linear function results in a graph that slants upward from left to right and has a positive slope. A decreasing linear function results in a graph that slants downward from left to right and has a negative slope. A constant linear function results in a graph that is a horizontal line. See .
3. Slope is a rate of change. The slope of a linear function can be calculated by dividing the difference between y-values by the difference in corresponding x-values of any two points on the line. See  and .
4. An equation for a linear function can be written from a graph. See .
5. The equation for a linear function can be written if the slope 
  and initial value 
  are known. See  and .
6. A linear function can be used to solve real-world problems given information in different forms. See , , and .
7. Linear functions can be graphed by plotting points or by using the y-intercept and slope. See  and .
8. Graphs of linear functions may be transformed by using shifts up, down, left, or right, as well as through stretches, compressions, and reflections. See .
9. The equation for a linear function can be written by interpreting the graph. See .
10. The x-intercept is the point at which the graph of a linear function crosses the x-axis. See .
11. Horizontal lines are written in the form, 
  See .
12. Vertical lines are written in the form, 
  See .
13. Parallel lines have the same slope. Perpendicular lines have negative reciprocal slopes, assuming neither is vertical. See .
14. A line parallel to another line, passing through a given point, may be found by substituting the slope value of the line and the x- and y-values of the given point into the equation, 
  and using the 
  that results. Similarly, the point-slope form of an equation can also be used. See .
15. A line perpendicular to another line, passing through a given point, may be found in the same manner, with the exception of using the negative reciprocal slope. See  and .

### Section Exercises


### Verbal


### Algebraic

For the following exercises, determine whether the equation of the curve can be written as a linear function.
For the following exercises, determine whether each function is increasing or decreasing.
For the following exercises, find the slope of the line that passes through the two given points.
For the following exercises, given each set of information, find a linear equation satisfying the conditions, if possible.
For the following exercises, determine whether the lines given by the equations below are parallel, perpendicular, or neither.
For the following exercises, find the x- and y-intercepts of each equation.
For the following exercises, use the descriptions of each pair of lines given below to find the slopes of Line 1 and Line 2. Is each pair of lines parallel, perpendicular, or neither?
For the following exercises, write an equation for the line described.

### Graphical

For the following exercises, find the slope of the line graphed.
For the following exercises, write an equation for the line graphed.
For the following exercises, match the given linear equation with its graph in .
For the following exercises, sketch a line with the given features.
For the following exercises, sketch the graph of each equation.
For the following exercises, write the equation of the line shown in the graph.

### Numeric

For the following exercises, which of the tables could represent a linear function? For each that could be linear, find a linear equation that models the data.

### Technology

For the following exercises, use a calculator or graphing technology to complete the task.

### Extensions

For the following exercises, use the functions 
  

### Real-World Applications
