Reading: Graphs of Linear Functions (part I)
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:
- By plotting points (at least 2) and drawing a line through the points
- Using the initial value (output when x = 0) and rate of change (slope)
- Using transformations of the identity function f(x) = x
Example 1
Graph [latex]\displaystyle{f{{({x})}}}={5}-\frac{{2}}{{3}}{x}[/latex] 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 [latex]\displaystyle\frac{{2}}{{3}}[/latex] in the equation, and of course using x = 0 to get the vertical intercept. Evaluating f(x) at x = 0, 3 and 6: [latex-display]\displaystyle{f{{({0})}}}={5}-\frac{{2}}{{3}}{({0})}={5}[/latex-display] [latex-display]\displaystyle{f{{({3})}}}={5}-\frac{{2}}{{3}}{({3})}={3}[/latex-display] [latex-display]\displaystyle{f{{({6})}}}={5}-\frac{{2}}{{3}}{({6})}={1}[/latex-display] 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 f(x) = b + mx, 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 [latex-display]\displaystyle{m}=\frac{{\text{Change of Output}}}{{\text{Change of Input}}}[/latex-display] 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. [latex-display]\displaystyle{m}=\frac{{\text{Change of Output}}}{{\text{Change of Input}}}=\frac{{\text{rise}}}{{\text{run}}}[/latex-display] Notice that this ratio is the same regardless of which two points we useGraphical Interpretation of a Linear Equation
Graphically, in the equation f(x) = b + mx 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 [latex]\displaystyle{f{{({x})}}}={5}-\frac{{2}}{{3}}{x}[/latex] 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 [latex]\displaystyle-\frac{{2}}{{3}}[/latex]. 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 [latex]\displaystyle-\frac{{2}}{{3}}[/latex], find another point on the graph that has a negative x value. Another option for graphing is to use transformations of the identity function f(x) = x. In the equation f(x) = mx, 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 f(x) = mx + b, 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 [latex]\displaystyle{f{{({x})}}}=-{3}+\frac{{1}}{{2}}{x}[/latex] using transformations. The equation is the graph of the identity function vertically compressed by ½ and vertically shifted down 3. 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 [latex-display]\displaystyle{f{{({x})}}}={2}{x}+{3}[/latex-display] [latex-display]\displaystyle{g{{({x})}}}={2}{x}-{3}[/latex-display] [latex-display]\displaystyle{h}{({x})}=-{2}{x}+{3}[/latex-display] [latex-display]\displaystyle{j}{({x})}=\frac{{1}}{{2}}{x}+{3}[/latex-display] 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 [latex]\displaystyle{f{{({x})}}}=-{3}+\frac{{1}}{{2}}{x}[/latex] Setting the function equal to zero to find what input will put us on the horizontal axis, [latex-display]\displaystyle{0}=-{3}+\frac{{1}}{{2}}{x}[/latex-display] [latex-display]\displaystyle{3}=\frac{{1}}{{2}}{x}[/latex-display] [latex-display]\displaystyle{x}={6}[/latex-display] 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 [latex]\displaystyle{f{{({x})}}}={0}[/latex]). 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 = aExample 6
Write an equation for the horizontal line graphed above. This line would have equation f(x) = 2Example 7
Write an equation for the vertical line graphed above. This line would have equation x = 2Try it Now 2
Describe the function f(x) = 6 – 3x in terms of transformations of the identity function and find its horizontal intercept.Important Topics of this Section
- Methods for graphing linear functions
- Another name for slope = rise/run
- Horizontal intercepts (a,0)
- Horizontal lines
- Vertical lines
Try it Now Answers
- (–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.
- 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
Licenses & Attributions
CC licensed content, Shared previously
- Chapter 2: Functions. Authored by: David Lippman and Melonie Rasmussen. Located at: http://www.opentextbookstore.com/precalc/1.4/Chapter%202.doc. License: CC BY: Attribution.