$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 2.2 Graphs of Linear Functions

When we are working with a new function, it is useful to know as much as we can about the function: its graph, where the function is zero, and any other special behaviors of the function.  We will begin this exploration of linear functions with a look at graphs.

When graphing a linear function, there are three basic ways to graph it:

1. By plotting points (at least 2) and drawing a line through the points
2. Using the initial value (output when x = 0) and rate of change (slope)
3. Using transformations of the identity function

Example 1

Graph  by plotting points

In general, we evaluate the function at two or more inputs to find at least two points on the graph.  Usually it is best to pick input values that will “work nicely” in the equation.  In this equation, multiples of 3 will work nicely due to the  in the equation, and of course using x = 0 to get the vertical intercept.  Evaluating f(x) at x = 0, 3 and 6:

These evaluations tell us that the points (0,5), (3,3), and (6,1) lie on the graph of the line.  Plotting these points and drawing a line through them gives us the graph

When using the initial value and rate of change to graph, we need to consider the graphical interpretation of these values.  Remember the initial value of the function is the output when the input is zero, so in the equation , the graph includes the point (0, b).  On the graph, this is the vertical intercept – the point where the graph crosses the vertical axis.

For the rate of change, it is helpful to recall that we calculated this value as

From a graph of a line, this tells us that if we divide the vertical difference, or rise, of the function outputs by the horizontal difference, or run, of the inputs, we will obtain the rate of change, also called slope of the line.

Notice that this ratio is the same regardless of which two points we use

 rise 2, run 4 m = 2/4 = ½

 run 2, rise 1 m = ½
 run 2, rise 1 m = ½

Graphical Interpretation of a Linear Equation

Graphically, in the equation

b is the vertical intercept of the graph and tells us we can start our graph at (0, b)

m is the slope of the line and tells us how far to rise & run to get to the next point

Once we have at least 2 points, we can extend the graph of the line to the left and right.

Example 2

Graph  using the vertical intercept and slope.

The vertical intercept of the function is (0, 5), giving us a point on the graph of the line.

The slope is .  This tells us that for every 3 units the graph “runs” in the horizontal, the vertical “rise” decreases by 2 units.  In graphing, we can use this by first plotting our vertical intercept on the graph, then using the slope to find a second point.  From the initial value (0, 5) the slope tells us that if we move to the right 3, we will move down 2, moving us to the point (3, 3).  We can continue this again to find a third point at (6, 1).  Finally, extend the line to the left and right, containing these points.

Try it Now

1. Consider that the slope -2/3 could also be written as .  Using , find another point on the graph that has a negative x value.

Another option for graphing is to use transformations of the identity function.  In the equation, the m is acting as the vertical stretch of the identity function.  When m is negative, there is also a vertical reflection of the graph. Looking at some examples:

In, the b acts as the vertical shift, moving the graph up and down without affecting the slope of the line.  Some examples:

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 for you to graph this type of function, make sure you practice each method.

Example 3

Graph  using transformations.

The equation is the graph of the identity function vertically compressed by ½ and vertically shifted down 3.

Vertical compression                                    combined with Vertical shift

Notice how this nicely compares to the other method where the vertical intercept is found at (0, -3) and to get to another point we rise (go up vertically) by 1 unit and run (go horizontally) by 2 units to get to the next point (2,-2), and the next one (4, -1).  In these three points (0,-3), (2, -2), and (4, -1), the output values change by +1, and the x values change by +2, corresponding with the slope m = 1/2.

Example 4

Match each equation with one of the lines in the graph below

Only one graph has a vertical intercept of -3, so we can immediately match that graph with g(x).  For the three graphs with a vertical intercept at 3, only one has a negative slope, so we can match that line with h(x).  Of the other two, the steeper line would have a larger slope, so we can match that graph with equation f(x), and the flatter line with the equation j(x).

In addition to understanding the basic behavior of a linear function (increasing or decreasing, recognizing the slope and vertical intercept), it is often helpful to know the horizontal intercept of the function – where it crosses the horizontal axis.

Finding Horizontal Intercept

The horizontal intercept of the function is where the graph crosses the horizontal axis.  If a function has a horizontal intercept, you can always find it by solving f(x) = 0.

Example 5

Find the horizontal intercept of

Setting the function equal to zero to find what input will put us on the horizontal axis,

The graph crosses the horizontal axis at (6,0)

There are two special cases of lines: a horizontal line and a vertical line.  In a horizontal line like the one graphed to the right, notice that between any two points, the change in the outputs is 0.  In the slope equation, the numerator will be 0, resulting in a slope of 0.  Using a slope of 0 in the , the equation simplifies to .

Notice a horizontal line has a vertical intercept, but no horizontal intercept (unless it’s the line f(x) = 0).

In the case of a vertical line, notice that between any two points, the change in the inputs is zero.  In the slope equation, the denominator will be zero, and you may recall that we cannot divide by the zero; the slope of a vertical line is undefined.  You might also notice that a vertical line is not a function.  To write the equation of vertical line, we simply write input=value, like.

Notice a vertical line has a horizontal intercept, but no vertical intercept (unless it’s the line x = 0).

Horizontal and Vertical Lines

Horizontal lines have equations of the form

Vertical lines have equations of the form x = a

Example 6

Write an equation for the horizontal line graphed above.

This line would have equation

Example 7

Write an equation for the vertical line graphed above.

This line would have equation

Try it Now

2. Describe the function  in terms of transformations of the identity function and find its horizontal intercept.

Parallel and Perpendicular Lines

When two lines are graphed together, the lines will be parallel if they are increasing at the same rate – if the rates of change are the same.  In this case, the graphs will never cross (unless they’re the same line).

Parallel Lines

Two lines are parallel if the slopes are equal (or, if both lines are vertical).  In other words, given two linear equations  and

The lines will be parallel if

Example 8

Find a line parallel to  that passes through the point (3, 0)

We know the line we’re looking for will have the same slope as the given line, m = 3.  Using this and the given point, we can solve for the new line’s vertical intercept:

then at (3, 0),

The line we’re looking for is

If two lines are not parallel, one other interesting possibility is that the lines are perpendicular, which means the lines form a right angle (90 degree angle – a square corner) where they meet.  In this case, the slopes when multiplied together will equal -1.  Solving for one slope leads us to the definition:

Perpendicular Lines

Given two linear equations  and

The lines will be perpendicular if  , and so

We often say the slope of a perpendicular line is the “negative reciprocal” of the other line’s slope.

Example 9

Find the slope of a line perpendicular to a line with:

a) a slope of 2.          b) a slope of  -4.          c) a slope of .

If the original line had slope 2, the perpendicular line’s slope would be

If the original line had slope -4, the perpendicular line’s slope would be

If the original line had slope , the perpendicular line’s slope would be

Example 10

Find the equation of a line perpendicular to  and passing through the point (3, 0)

The original line has slope m = 3.  The perpendicular line will have slope .  Using this and the given point, we can find the equation for the line.

then at (3, 0),

The line we’re looking for is

Try it Now

3. Given the line , find an equation for the line passing through (0, 0) that is:    a) parallel to h(t).  b) perpendicular to h(t).

Example 12

A line passes through the points (-2, 6) and (4, 5).  Find the equation of a perpendicular line that passes through the point (4, 5).

From the two given points on the reference line, we can calculate the slope of that line:

The perpendicular line will have slope

We can then solve for the vertical intercept that makes the line pass through the desired point:

then at (4, 5),

Giving the line

Intersections of Lines

The graphs of two lines will intersect if they are not parallel.  They will intersect at the point that satisfies both equations.  To find this point when the equations are given as functions, we can solve for an input value so that .  In other words, we can set the formulas for the lines equal, and solve for the input that satisfies the equation.

Example 13

Find the intersection of the lines  and

Setting ,

This tells us the lines intersect when the input is

We can then find the output value of the intersection point by evaluating either function at this input

 h(t)
These lines intersect at the point .  Looking at the graph, this result seems reasonable.

 j(t)

Two parallel lines can also intersect if they happen to be the same line.  In that case, they intersect at every point on the lines.

Try it Now

4. Look at the graph in example 13 above and answer the following for the function j(t):

a. Vertical intercept coordinates

b. Horizontal intercepts coordinates

c. Slope

d. Is j(t) parallel or perpendicular to h(t) (or neither)

e. Is j(t) an Increasing or Decreasing function (or neither)

f. Write a transformation description from the identity toolkit function f(x) = x

Finding the intersection allows us to answer other questions as well, such as discovering when one function is larger than another.

Example 14

Using the functions from the previous example, for what values of t is

To answer this question, it is helpful first to know where the functions are equal, since that is the point where h(t) could switch from being greater to smaller than j(t) or vice-versa.  From the previous example, we know the functions are equal at

By examining the graph, we can see that h(t), the function with positive slope, is going to be larger than the other function to the right of the intersection.  So  when

Important Topics of this Section

Methods for graphing linear functions

Another name for slope = rise/run

Horizontal intercepts (a,0)

Horizontal lines

Vertical lines

Parallel lines

Perpendicular lines

Intersecting lines

1. (-3,7)  found by starting at the vertical intercept, going up 2 units and 3 in the negative horizontal direction. You could have also answered, (-6, 9) or (-9, 11) etc…

2. Vertically stretched by a factor of 3, Vertically flipped (flipped over the x axis),  Vertically shifted up by 6 units.  6-3x=0  when x=2

3. Parallel  ;  Perpendicular

4. Given j(t) = 5-t

a. (0,5)

b. (5,0)

c. Slope -1

d. Neither parallel nor perpendicular

e. Decreasing function

f. Given the identity function, perform a vertical flip (over the t axis) and shift up 5 units.

## Section 2.2 Exercises

Match each linear equation with its graph

Sketch a line with the given features

1. An x-intercept of (-4, 0) and y-intercept of (0, -2)
2. An x-intercept of (-2, 0) and y-intercept of (0, 4)
3. A vertical intercept of (0, 7) and slope
4. A vertical intercept of (0, 3) and slope
5. Passing through the points (-6,-2) and (6,-6)
6. Passing through the points (-3,-4) and (3,0)

Sketch the graph of each equation

13.                              14.

15.                                16.

17.                                  18.

19.                                              20.

21.                                        22.

1. If  is the transformation of  after a vertical compression by , a shift left by 2, and a shift down by 4
1. Write an equation for
2. What is the slope of this line?
3. Find the vertical intercept of this line.

1.  If  is the transformation of  after a vertical compression by , a shift right by 1, and a shift up by 3
1. Write an equation for
2. What is the slope of this line?
3. Find the vertical intercept of this line.

Write the equation of the line shown

25.                              26.

27.                              28.

Find the horizontal and vertical intercepts of each equation

29.                                           30.

31.                                             32.

33.                                            34.

Given below are descriptions of two lines. Find the slopes of Line 1 and Line 2.  Is each pair of lines parallel, perpendicular or neither?

1. Line 1: Passes through  and
Line 2: Passes through  and

2. Line 1: Passes through  and
Line 2: Passes through  and

3. Line 1: Passes through  and
Line 2: Passes through  and

4. Line 1: Passes through  and
Line 2: Passes through  and

5. Line 1: Passes through  and
Line 2: Passes through  and

1. Line 1: Passes through  and
Line 2: Passes through  and

1. Write an equation for a line parallel to  and passing through the point (2,-12)

2. Write an equation for a line parallel to  and passing through the point (4,9)

3. Write an equation for a line perpendicular to  and passing through the point (-4,-1)

1. Write an equation for a line perpendicular to  and passing through the point (3,1)

2. Find the point at which the line  intersects the line

3. Find the point at which the line  intersects the line

1. Use algebra to find the point at which the line  intersects the line

2. Use algebra to find the point at which the line  intersects the line

3. A car rental company offers two plans for renting a car.
Plan A: 30 dollars per day and 18 cents per mile
Plan B: 50 dollars per day with free unlimited mileage
How many miles would you need to drive for plan B to save you money?

1. A cell phone company offers two data options for its prepaid phones

Pay per use:  $0.002 per Kilobyte (KB) used Data Package:$5 for 5 Megabytes (5120 Kilobytes) + \$0.002 per addition KB

Assuming you will use less than 5 Megabytes, under what circumstances will the data package save you money?

1. Sketch an accurate picture of the line having equation . Let c be an unknown constant.  [UW]
1. Find the point of intersection between the line you have graphed and the line ; your answer will be a point in the xy plane whose coordinates involve the unknown c.
2. Find c so that the intersection point in (a) has x-coordinate 10.
3. Find c so that the intersection point in (a) lies on the x-axis.

### Contributors

• David Lippman (Pierce College)
• Melonie Rasmussen (Pierce College)