GRAPHING LINEAR FUNCTIONS

Objectives:

• To recall how to graph straight lines or linear functions.
• Find x and y intercepts
• How to find a line knowing a point and its slope.
• Recognize equations of vertical or horizontal lines
Recall 1:  (Definition of a graph)

Suppose that f:A -> B is a function from A to B.  The graph of f is the set of points in the plane described by (x,f(x)), where x is in the domain of f.  If we plot (x,f(x))  for a sufficient number of values of x, we find that the points (x,f(x)), plotted in the Cartesian plane, are ordered along a curve.

In this Workout, we shall be looking at graphs of functions that come from linear expressions, that is where the variable x is not raised to a power.  For example,

f(x) = 2x - 6.

The graph of such an expression will be a set of points (x,f(x)) which are ordered along a straight line.  Indeed, if we look at a table of values for (x,f(x)), we find

If we plot these points on the plane, and connect the points by straight lines, we find that all the points lie on the single straight line illustrated below.

Note
Since graphs of functions are plotted with reference to an x-axis and a y-axis, it is often useful to label the function y.  We say that y = f(x), or that y is a function of x.  Notice that the value of f(x) is measured along the vertical y axis.  For the same reason, we may write equations, such as y = 2x - 6, when we mean f(x) = 2x - 6.

Recall 2:  (The x and y intercepts of a straight line.)

Notice that any straight line that you can draw in the plane  must intersect one of the axes, either the x-axis or the y-axis.  Therefore, straight lines can be classified into three   categories:

1.  Lines that intersect only the x-axis.
2.  Lines that intersect only the y-axis.
3.  Lines that intersect both the x-axis and the y-axis.

Lines of type 1 cannot be the graph of any function.  They must be vertical lines.  Therefore, such lines are completely determined by where they cross the x-axis.  For example if  a vertical line crosses the x-axis at x = 9, then the x value of its   graph must always be 9.  In other words, the graph must be   the set of all points (9,y), and it does not matter what y is. (y can be any real number.)  This is a peculiar case, since   such a vertical straight line cannot be the graph of any   function.  Recall that a function must have a unique value of f(x) for each value of x.

Lines of type 2 are horizontal lines.  Therefore they have   the same y value for every x value.  In this case it is the   graph of a function that takes on the same value for all   values of the independent variable x.  It is the graph of the   form (x, b), where b is the value at which the line crosses   the y-axis.  For example, a horizontal line of height 5 is the   set of points of the form (x,5).  This means that it is the   graph of the function f(x) = 5.  A function for which the   value of the function is the same for every value of x is   called a constant function.   The graph of any constant   function is always horizontal and it crosses the y-axis at the   value of the constant.

Now we come to the last type.  Lines of type 3 intersect  the x-axis exactly one time and intersect the y-axis exactly one time.  The point at which the line intersects the x-axis   is called the x-intercept.  The point at which the line   intersects the y axis is called the y-intercept.

How do we find the intercepts?

Let y=0 to find the x-intercept; let x=0 to find the y-intercept.

Recall 3:  (The x- and y-intercepts determine the line)

Euclid says that two points determine a unique line.  We   can see this geometrically.  With two points, we are able   to draw an unambiguous, well-defined, unique line   connecting those two points and extending indefinitely into   space.  How do we determine a line of type 3?  The easiest   two points to find are the x-intercept and the y-intercept.    These points will help us graph the line, if we already know   the function. Later we will learn how to find the function,   if we already know the points.

The x-intercept is a point of the form (a,0), where a is some fixed   real number.  The y-intercept is a point of the form (0,b), where b is   some fixed real number.  These two points can easily be obtained from   the function by setting y equal to 0 and x equal to 0,   respectively.  For example, if the function is f(x) = 2x - 6,   then, by setting y = f(x) = 0, we have 0 = 2x - 6.  Solving   for x gives x = 3.  So the x-intercept for the graph of this   function is the point (3,0).  Set x = 0 to find the y-intercept.    Doing so yields (0,-6).  We therefore have two points on   our graph, (3,0) and (0,-6).  Draw the line connecting these   two points to sketch the graph of f(x) = 2x - 6.  Notice that   we get the same straight line that appears in Recall 1; this time we simply plotted two points instead of 13.

Recall 4:  (The slope of a line)

If you take another look at the line illustrated in Recall 1, (the graph of f(x) = 2x - 6) you may notice that the y value increases 2 units every time the x value increases by 1 unit.  All lines of type 3 have the property that their y   value increases or decreases each time the x value increases   by one unit.  The amount that the y value increases or   decreases for each unit of increase of the x value is called   the slope of the line.  The line given by the function f(x) =2x - 6 has a slope of 2--that is, it increases by 2 units every   time x increases by 1 unit.  To see this, take the point  (0,-6); by increasing x one unit you come to the point on   the line given by (1,-4).  The difference between -4 and -6   is 2 units.  The point (x,y) on the curve has moved 2 units   higher.

It is no accident that the coefficient of the x value of the   function f(x) = 2x - 6 is the same as the slope of the line.    In general the graph of a function

will be a straight line of slope a.  The form of the function above is called the standard form of a line function. In this form a is the slope and b is called y-intercept of the line.

Another way of finding the slope is to pick any two points on the graph, say (x0,y0) and (x1,y1).  Then the difference between the abscissa values x1 and x0  is the horizontal  change, called the run.  The difference between the  ordinate values y1 and y0 is the vertical change, called the rise.  The slope is then calculated as the ratio

For example, if you picked the x-intercept (3,0) and the y-intercept (0,-6) as the two points, then

which is 2, as expected.

Recall 5:  (The y-intercept)

The y-intercept has a special use in determining the function from the graph.  If the y-intercept and the slope are known, then the function is also known.  All linear functions may be written as

f(x) = ax + b.

We have seen (in the last Recall) that the coefficient of the  x term is the slope of the straight line that is the graph of   the function.  What is the significance of the constant term   b?  To answer, simply set x equal to 0 and notice that we   have f(0) = b.  Therefore, b is the value of y at which the   line crosses the y axis--in other words, b is the y value of the y-intercept.  This means that by knowing two quantities--the   slope a and the y-intercept b--we may write the function that   describes the line.  The function is

f(x) = ax + b.

For example, if a line has a slope of 2 and a y-intercept of   (0,-6), then the line is the graph of the function

f(x) = 2x - 6.

Recall 6:  (How to find the line, knowing the slope and a point)

The slope of a line may be computed knowing any two   points (x0,y0) and (x1,y1).  We have seen that slope is given by the ratio

Therefore, if we know the slope--call it m--and if we know  one point--say (x0,y0), then take any point (x,y) on the line and compute the slope once more.  We get

y-y0=m(x-x0)

This is the equation of the line with slope m and passing through the point (x0,y0)

Thus, we have the function f(x) = m(x - x0)+y0  whose graph is the straight line of slope m passing through (x0,y0).

Recall 7:  (How to find the line knowing only two points)

If we know two points (x0,y0) and (x1,y1), then we can find  the slope of the line going through these two poins by

m =(y1-y0)/(x1-x0) .

From the last Recall, we know how to find the equation of the line by knowing the slope and one point.  Now we know the slope  and the point (x0,y0), and we may proceed as we did in   Recall 6.

Examples

Example 1.    Find the x- and y-intercepts of the graph of the function

f(x) = 4x + 12.

Solution:    The y-intercept is the point (x,f(x)) having the x value equal to 0.
Therefore, we are looking for (0,f(0)).  We must compute f(0).  It is f(0) = 4(0) + 12 = 12.  The y-intercept is (0,12).

The x-intercept is the point (x,f(x)) having the y value equal to 0.  Set f(x) = 0 to get 0 = 4x + 12, or x = -3.  The x-intercept is, therefore, (-3,0).

Example 2. Find the slope of the function

f(x) = -4x - 3.

Solution: We know that any function that can be put in the form

f(x) = mx + b

must have a graph that is a straight line with slope m.  Therefore, the slope of f(x) is m = -4.

Note
To see that the line with the equation given by the function f(x) = mx + b has slope m, check the rise per unit run ratio.  Consider (x,f(x)) and (x+1,f(x+1)) and find

which is equal to

which equals m.

Example 4. Sketch the graph of the function

f(x) = (x-16)/2.

Solution:  Rewrite this function in standard form as

f(x) = x/2 - 8.

Notice that this function has no higher powers of x than 1.  Therefore, the graph of this function is a straight line. Compare the form of this function to the form

f(x) = mx + b,

where m is the slope of the line and b is the y-intercept.  We find that m =1/2  and b = -8.  Knowing that the slope is 1/2 and that the y-intercept is -8, we sketch the line below. We find the x-intercept solving the equation x/2-8=0. We get the point (16, 0). So the graph is the line that goes through the points (0, -8) and (16, 0)

Example 4. Find the function whose graph is the straight line passing through the two points (-12,-8) and (5,9).  Where does this curve cross the y- axis?  Where does it cross the x-axis?.  Sketch the line through the two points (-12,-8) and (5,9) to be sure that it does cross the axes at the computed x and y intercepts.

Solution: First let's find the slope with the formula given in Recall 4, ; we get m=1.

Now we have a slope and a point, namely slope 1 and point (5,9). So the equation of the line is
y-9=1*(x-5)

hence,

y = x + 4.

To complete the example, notice that it crosses the y-axis at (0,4) -- (the y-intercept).
It crosses the x-axis when y = 0, or at (-4,0) (the x-intercept)

Notice that by comparing the form of the equation with the form of a function whose graph is the line with slope m and y-intercept b, we may check that our result is correct.

EXERCISES

1. Sketch the graph of  6(x +3) = 2y - 4 by plotting the points (-4,f(-4)), (-3,f(-3)), (-2,f(-2)), (-1,f(-1)), (0,f(0)), (1,f(1)), (2,f(2)), 3,f(3)), and (4,f(4)).

2. Find the equation of the line that has slope 3 and y-intercept -8.

3. Put the equation 6(x +5) = 2y - 4 into the standard form of an equation of a straight line.

4. Find the equation of the line that has slope -2 and y-intercept -6.

5. Find the equation of the line that has slope -3 and passes through the point (-4,9).

6. Find the equation for the line with x-intercept at (4,0) and y-intercept at (0,-9).

7. Find the x and y intercepts of the line y = 4x + 28.

8. Find the equation of the line passing through (-3,8) and (5,4).

9. Find the equation of the line passing through (5,3) and (-7,-4).

10. Sketch the graph of the function f(x) = 2x + 7.
11. Use the same graph paper as you used in exercise 10 to sketch the graph of the function  g(x) = -2x + 7.
12. Use the same graph paper as you used in exercise 10 to sketch the graph of the function  h(x) = -2x - 7.
13. Use the same graph paper as you used in exercise 10 to sketch the graph of the function   s(x) = x.
14. Use the same graph paper as you used in exercise 10 to sketch the graph of the function t(x) = x + 7.
15. Sketch the graph of the function f(x) = 8.

16. Sketch the line  x = 8.

2.  y = 3x - 8

3.   y = 3x + 11

4.  y = -2x - 6

5.  y = -3x - 3

6.  y = x - 9

7.  (-7,0) and (0,28)