Writing assignment graphing linear functions

We can now describe a variety of characteristics that explain the behavior of linear functions. We will use this information to analyze a graphed line and write an equation based on its observable properties. From evaluating the graph, what can you determine about this linear function?

Graph of the function f(x)= frac <2></p>
<p> x plus 1

In this section, you will practice writing linear function equations using the information you’ve gathered. We will also practice graphing linear functions using different methods and predict how the graphs of linear functions will change when parts of the equation are altered.

[latex]\\[/latex]

Graphing Linear Functions

We previously saw that that the graph of a linear function is a straight line. We were also able to see the points of the function as well as the initial value from a graph.

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. The third is applying transformations to the identity function [latex]f\left(x\right)=x[/latex].

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 of the function. For example, given the function [latex]f\left(x\right)=2x[/latex], 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 (1, 2). Evaluating the function for an input value of 2 yields an output value of 4 which is represented by the point (2, 4). Choosing three points is often advisable because if all three points do not fall on the same line, we know we made an error.

How To: Given a linear function, graph by plotting points.

  1. Choose a minimum of two input values.
  2. Evaluate the function at each input value.
  3. Use the resulting output values to identify coordinate pairs.
  4. Plot the coordinate pairs on a grid.
  5. Draw a line through the points.

Example: Graphing by Plotting Points

Graph [latex]f\left(x\right)=-\fracx+5[/latex] by plotting points.

Show Solution

Begin by choosing input values. This function includes a fraction with a denominator of 3 so let’s choose multiples of 3 as input values. We will choose 0, 3, and 6.

Evaluate the function at each input value and use the output value to identify coordinate pairs.

[latex]\beginx=0& & f\left(0\right)=-\frac\left(0\right)+5=5\Rightarrow \left(0,5\right)\\ x=3& & f\left(3\right)=-\frac\left(3\right)+5=3\Rightarrow \left(3,3\right)\\ x=6& & f\left(6\right)=-\frac\left(6\right)+5=1\Rightarrow \left(6,1\right)\end[/latex]

Plot the coordinate pairs and draw a line through the points. The graph below is of the function [latex]f\left(x\right)=-\fracx+5[/latex].

The graph of the linear function [latex]f\left(x\right)=-\frac<2></p>
<p>x+5[/latex].

Analysis of the Solution

The graph of the function is a line as expected for a linear function. In addition, the graph has a downward slant which indicates a negative slope. This is also expected from the negative constant rate of change in the equation for the function.

Try It

Graph [latex]f\left(x\right)=-\fracx+6[/latex] by plotting points.

Show Solution

cnx_precalc_figure_02_02_0022

Graphing a Linear 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 [latex]x=0[/latex] in the equation.

The other characteristic of the linear function is its slope, m, which is a measure of its steepness. Recall that the slope is the rate of change of the function. The slope of a linear function is equal to the ratio of the change in outputs to the change in inputs. Another way to think about the slope is by dividing the vertical difference, or rise, between any two points by the horizontal difference, or run. The slope of a linear function will be the same between any two points. We encountered both the y-intercept and the slope in Linear Functions.

Let’s consider the following function.

The slope is [latex]\frac[/latex]. 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 x = 0. The graph crosses the y-axis at (0, 1). Now we know the slope and the y-intercept. We can begin graphing by plotting the point (0, 1) We know that the slope is rise over run, [latex]m=\frac>>[/latex]. From our example, we have [latex]m=\frac[/latex], which means that the rise is 1 and the run is 2. Starting from our y-intercept (0, 1), we can rise 1 and then run 2 or run 2 and then rise 1. We repeat until we have multiple points, and then we draw a line through the points as shown below.

graph of the line y = (1/2)x +1 showing the

A General Note: Graphical Interpretation of a Linear Function

In the equation [latex]f\left(x\right)=mx+b[/latex]

Q & A

Do all linear functions have y-intercepts?

Yes. All linear functions cross the y-axis and therefore have y-intercepts. (Note: A vertical line parallel to the y-axis does not have a y-intercept. Keep in mind that a vertical line is the only line that is not a function.)

How To: Given the equation for a linear function, graph the function using the y-intercept and slope.

  1. Evaluate the function at an input value of zero to find the y-intercept.
  2. Identify the slope.
  3. Plot the point represented by the y-intercept.
  4. Use [latex]\frac>>[/latex] to determine at least two more points on the line.
  5. Draw a line which passes through the points.

Example: Graphing by Using the y-intercept and Slope

Graph [latex]f\left(x\right)=-\fracx+5[/latex] using the y-intercept and slope.

Show Solution

Evaluate the function at x = 0 to find the y-intercept. The output value when x = 0 is 5, so the graph will cross the y-axis at (0, 5).

According to the equation for the function, the slope of the line is [latex]-\frac[/latex]. This tells us that for each vertical decrease in the “rise” of [latex]–2[/latex] units, the “run” increases by 3 units in the horizontal direction. We can now graph the function by first plotting the y-intercept. From the initial value (0, 5) we move down 2 units and to the right 3 units. We can extend the line to the left and right by repeating, and then draw a line through the points.

graph of the line y = (-2/3)x + 5 showing the change of -2 in y and change of 3 in x.

Analysis of the Solution

The graph slants downward from left to right which means it has a negative slope as expected.

Try It

Find a point on the graph we drew in the previous example: Graphing by Using the y-intercept and Slope that has a negative x-value.

Show Solution

Possible answers include [latex]\left(-3,7\right)[/latex], [latex]\left(-6,9\right)[/latex], or [latex]\left(-9,11\right)[/latex].

Graphing a Linear Function Using Transformations

Another option for graphing is to use transformations on the identity function [latex]f\left(x\right)=x[/latex]. 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 [latex]f\left(x\right)=mx[/latex], the m is acting as the vertical stretch or compression of the identity function. When m is negative, there is also a vertical reflection of the graph. Notice that multiplying the equation [latex]f\left(x\right)=x[/latex] by m stretches the graph of f by a factor of m units if m > 1 and compresses the graph of f by a factor of m units if 0 < m < 1. This means the larger the absolute value of m, the steeper the slope.

Graph with several linear functions including y = 3x, y = 2x, y = x, y = (1/2)x, y = (1/3)x, y = (-1/2)x, y = -x, and y = -2x

Vertical stretches and compressions and reflections on the function [latex]f\left(x\right)=x[/latex].

Vertical Shift

In [latex]f\left(x\right)=mx+b[/latex], the b acts as the vertical shift, moving the graph up and down without affecting the slope of the line. Notice that adding a value of b to the equation of [latex]f\left(x\right)=x[/latex] shifts the graph of f a total of b units up if b is positive and |b| units down if b is negative.

graph showing y = x , y = x+2, y = x+4, y = x-2, y = x-4

This graph illustrates vertical shifts of the function [latex]f\left(x\right)=x[/latex].

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.

How To: Given the equation of a linear function, use transformations to graph the linear function in the form [latex]f\left(x\right)=mx+b[/latex].

  1. Graph [latex]f\left(x\right)=x[/latex].
  2. Vertically stretch or compress the graph by a factor m.
  3. Shift the graph up or down b units.

Example: Graphing by Using Transformations

Graph [latex]f\left(x\right)=\fracx - 3[/latex] using transformations.

Show Solution

The equation for the function shows that [latex]m=\frac[/latex] so the identity function is vertically compressed by [latex]\frac[/latex]. The equation for the function also shows that [latex]b=-3[/latex], so the identity function is vertically shifted down 3 units.

First, graph the identity function, and show the vertical compression.

graph showing the lines y = x and y = (1/2)x

The function [latex]y=x[/latex] compressed by a factor of [latex]\frac[/latex].

Then, show the vertical shift.

Graph showing the lines y = (1/2)x, and y = (1/2) + 3

The function [latex]y=\fracx[/latex] shifted down 3 units.

Try It

Graph [latex]f\left(x\right)=4+2x[/latex], using transformations.

Show Solution

cnx_precalc_figure_02_02_0092

Q & A

In Example: Graphing by Using Transformations, could we have sketched the graph by reversing the order of the transformations?

No. The order of the transformations follows the order of operations. When the function is evaluated at a given input, the corresponding output is calculated by following the order of operations. This is why we performed the compression first. For example, following order of operations, let the input be 2.

Writing Equations of Linear Functions

We previously 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 the graph below. We can see right away that the graph crosses the y-axis at the point (0, 4), 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 (–2, 0). 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 slope-intercept form of a line gives:

How To: Given THE graph of A linear function, find the equation to describe the function.

  1. Identify the y-intercept from the graph.
  2. Choose two points to determine the slope.
  3. Substitute the y-intercept and slope into slope-intercept form of a line.

Example: Matching Linear Functions to Their Graphs

Match each equation of a linear function with one of the lines in the graph below.

  1. [latex]f\left(x\right)=2x+3[/latex]
  2. [latex]g\left(x\right)=2x - 3[/latex]
  3. [latex]h\left(x\right)=-2x+3[/latex]
  4. [latex]j\left(x\right)=\fracx+3[/latex]

Graph of three lines, line 1) passes through (0,3) and (-2, -1), line 2) passes through (0,3) and (-6,0), line 3) passes through (0,-3) and (2,1)

Show Solution

Analyze the information for each function.

  1. This function has a slope of 2 and a y-intercept of 3. It must pass through the point (0, 3) and slant upward from left to right. We can use two points to find the slope, or we can compare it with the other functions listed. Function g has the same slope, but a different y-intercept. Lines I and III have the same slant because they have the same slope. Line III does not pass through (0, 3) so f must be represented by line I.
  2. This function also has a slope of 2, but a y-intercept of –3. It must pass through the point (0, –3) and slant upward from left to right. It must be represented by line III.
  3. This function has a slope of –2 and a y-intercept of 3. This is the only function listed with a negative slope, so it must be represented by line IV because it slants downward from left to right.
  4. This function has a slope of [latex]\frac[/latex] and a y-intercept of 3. It must pass through the point (0, 3) and slant upward from left to right. Lines I and II pass through (0, 3), but the slope of j is less than the slope of f so the line for j must be flatter. This function is represented by Line II.

Now we can re-label the lines.

Try It

Finding the x-intercept of a Line

So far we have been finding the y-intercepts of functions: the point at which the graph of a function crosses the y-axis. A function may also have an x-intercept, which is the x-coordinate of the point where the graph of a 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 the function f(x) equal to zero and solve for the value of x. For example, consider the function shown:

Set the function equal to 0 and solve for x.

[latex]\begin0=3x - 6\hfill \\ 6=3x\hfill \\ 2=x\hfill \\ x=2\hfill \end[/latex]

The graph of the function crosses the x-axis at the point (2, 0).

Q & A

Do all linear functions have x-intercepts?

No. However, linear functions of the form y = c, where c is a nonzero real number are the only examples of linear functions with no x-intercept. For example, y = 5 is a horizontal line 5 units above the x-axis. This function has no x-intercepts.

Graph of y = 5.

A General Note: x-intercept

The x-intercept of a function is the value of x where f(x) = 0. It can be found by solving the equation 0 = mx + b.

Example: Finding an x-intercept

Find the x-intercept of [latex]f\left(x\right)=\fracx - 3[/latex].

Show Solution

Set the function equal to zero to solve for x.

The graph crosses the x-axis at the point (6, 0).

Analysis of the Solution

A graph of the function is shown below. We can see that the x-intercept is (6, 0) as expected.

The graph of the linear function [latex]f\left(x\right)=\fracx – 3[/latex].

Try It

Find the x-intercept of [latex]f\left(x\right)=\fracx - 4[/latex].

Show Solution

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 the graph below, we see that the output has a value of 2 for every input value. The change in outputs between any two points is 0. In the slope formula, the numerator is 0, so the slope is 0. If we use m = 0 in the equation [latex]f\left(x\right)=mx+b[/latex], the equation simplifies to [latex]f\left(x\right)=b[/latex]. In other words, the value of the function is a constant. This graph represents the function [latex]f\left(x\right)=2[/latex].

A horizontal line representing the function [latex]f\left(x\right)=2[/latex].

M equals change of output divided by change of input. The numerator is a non-zero real number, and the change of input is zero.

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.

Notice that a vertical line has an x-intercept but no y-intercept unless it’s the line x = 0. This graph represents the line x = 2.

The vertical line [latex]x=2[/latex] which does not represent a function.

A General Note: Horizontal and Vertical Lines

Lines can be horizontal or vertical.

A horizontal line is a line defined by an equation of the form [latex]f\left(x\right)=b[/latex] where [latex]b[/latex] is a constant.

A vertical line is a line defined by an equation of the form [latex]x=a[/latex] where [latex]a[/latex] is a constant.

Example: Writing the Equation of a Horizontal Line

Write the equation of the line graphed below.

Graph of x = 7.

Show Solution

For any x-value, the y-value is [latex]–4[/latex], so the equation is [latex]y=–4[/latex].

Try it

Example: Writing the Equation of a Vertical Line

Write the equation of the line graphed below.

Graph of two functions where the baby blue line is y = -2/3x + 7, and the blue line is y = -x + 1.

Show Solution

The constant x-value is 7, so the equation is [latex]x=7[/latex].

Try It

Try It

Parallel and Perpendicular Lines

The two lines in the graph below are parallel lines: they will never intersect. Notice that 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 y-intercept of the other, they would become the same line.

Graph of two functions where the blue line is y = -2/3x + 1, and the baby blue line is y = -2/3x +7. Notice that they are parallel lines.

The functions 2x plus 6 and negative 2x minus 4 are parallel. The functions 3x plus 2 and 2x plus 2 are not parallel.

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 below are perpendicular.

Graph of two functions where the blue line is perpendicular to the orange line.

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 1. If [latex]_\text< and >_[/latex] are negative reciprocals of one another, they can be multiplied together to yield [latex]-1[/latex].

To find the reciprocal of a number, divide 1 by the number. So the reciprocal of 8 is [latex]\frac[/latex], and the reciprocal of [latex]\frac[/latex] 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. 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.

A General Note: Parallel and Perpendicular Lines

Two lines are parallel lines if they do not intersect. The slopes of the lines are the same.

If and only if [latex]_=_[/latex] and [latex]_=_[/latex], we say the lines coincide. Coincident lines are the same line.

Two lines are perpendicular lines if they intersect at right angles.

Example: Identifying Parallel and Perpendicular Lines

Given the functions below, identify the functions whose graphs are a pair of parallel lines and a pair of perpendicular lines.

[latex]\beginf\left(x\right)=2x+3\hfill & \hfill & h\left(x\right)=-2x+2\hfill \\ g\left(x\right)=\fracx - 4\hfill & \hfill & j\left(x\right)=2x - 6\hfill \end[/latex]

Show Solution

Parallel lines have the same slope. Because the functions [latex]f\left(x\right)=2x+3[/latex] and [latex]j\left(x\right)=2x - 6[/latex] each have a slope of 2, they represent parallel lines. Perpendicular lines have negative reciprocal slopes. Because −2 and [latex]\frac[/latex] are negative reciprocals, the equations, [latex]g\left(x\right)=\fracx - 4[/latex] and [latex]h\left(x\right)=-2x+2[/latex] represent perpendicular lines.

Analysis of the Solution

A graph of the lines is shown below.

Graph of four functions where the blue line is h(x) = -2x + 2, the orange line is f(x) = 2x + 3, the green line is j(x) = 2x - 6, and the red line is g(x) = 1/2x - 4.

The graph shows that the lines [latex]f\left(x\right)=2x+3[/latex] and [latex]j\left(x\right)=2x – 6[/latex] are parallel, and the lines [latex]g\left(x\right)=\fracx – 4[/latex] and [latex]h\left(x\right)=-2x+2[/latex] are perpendicular.

Writing Equations of Parallel Lines

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.

Suppose we are given the following function:

We know that the slope of the line is 3. We also know that the y-intercept is (0, 1). Any other line with a slope of 3 will be parallel to f(x). The lines formed by all of the following functions will be parallel to f(x).

[latex]\beging\left(x\right)=3x+6\hfill \\ h\left(x\right)=3x+1\hfill \\ p\left(x\right)=3x+\frac\hfill \end[/latex]

Suppose then we want to write the equation of a line that is parallel to f and passes through the point (1, 7). We already know that the slope is 3. We just need to determine which value for b will give the correct line. We can begin by using point-slope form of an equation for a line. We can then rewrite it in slope-intercept form.

[latex]\beginy-_=m\left(x-_\right)\hfill \\ y - 7=3\left(x - 1\right)\hfill \\ y - 7=3x - 3\hfill \\ \text<>y=3x+4\hfill \end[/latex]

So [latex]g\left(x\right)=3x+4[/latex] is parallel to [latex]f\left(x\right)=3x+1[/latex] and passes through the point (1, 7).

How To: Given the equation of a linear function, write the equation of a line WHICH passes through a given point and is parallel to the given line.

  1. Find the slope of the function.
  2. Substitute the slope and given point into point-slope or slope-intercept form.
  3. Simplify.

Example: Finding a Line Parallel to a Given Line

Find a line parallel to the graph of [latex]f\left(x\right)=3x+6[/latex] that passes through the point (3, 0).

Show Solution

The slope of the given line is 3. If we choose slope-intercept form, we can substitute [latex]m=3[/latex], [latex]x=3[/latex], and [latex]f(x)=0[/latex] into slope-intercept form to find the y-intercept.

[latex]\beging\left(x\right)=3x+b\hfill \\ \text<>0=3\left(3\right)+b\hfill \\ \text<>b=-9\hfill \end[/latex]

The line parallel to f(x) that passes through (3, 0) is [latex]g\left(x\right)=3x - 9[/latex].

Analysis of the Solution

We can confirm that the two lines are parallel by graphing them. The figure below shows that the two lines will never intersect.

Graph of two functions where the blue line is y = 3x + 6, and the orange line is y = 3x - 9.

Writing Equations of Perpendicular Lines

We can use a very similar process to write the equation of 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 following function:

The slope of the line is 2, and its negative reciprocal is [latex]-\frac[/latex]. Any function with a slope of [latex]-\frac[/latex] will be perpendicular to f(x). The lines formed by all of the following functions will be perpendicular to f(x).

[latex]\beging\left(x\right)=-\fracx+4\hfill \\ h\left(x\right)=-\fracx+2\hfill \\ p\left(x\right)=-\fracx-\frac\hfill \end[/latex]

As before, we can narrow down our choices for a particular perpendicular line if we know that it passes through a given point. Suppose that we want to write the equation of a line that is perpendicular to f(x) and passes through the point (4, 0). We already know that the slope is [latex]-\frac[/latex]. 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 b.

[latex]\beging\left(x\right)=mx+b\hfill \\ 0=-\frac\left(4\right)+b\hfill \\ 0=-2+b\hfill \\ 2=b\hfill \\ b=2\hfill \end[/latex]

The equation for the function with a slope of [latex]-\frac[/latex] and a y-intercept of 2 is

So [latex]g\left(x\right)=-\fracx+2[/latex] is perpendicular to [latex]f\left(x\right)=2x+4[/latex] and passes through the point (4, 0). Be aware that perpendicular lines may not look obviously perpendicular on a graphing calculator unless we use the square zoom feature.

Q & A

A horizontal line has a slope of zero and a vertical line has an undefined slope. These two lines are perpendicular, but the product of their slopes is not –1. Doesn’t this fact contradict the definition of perpendicular lines?

No. For two perpendicular linear functions, the product of their slopes is –1. However, a vertical line is not a function so the definition is not contradicted.

How To: Given the equation of a linear function, write the equation of a line WHICH passes through a given point and is Perpendicular to the given line.

  1. Find the slope of the given function.
  2. Determine the negative reciprocal of the slope.
  3. Substitute the new slope and the values for x and y from given point into [latex]g\left(x\right)=mx+b[/latex].
  4. Solve for b.
  5. Write the equation of the line.

Example: Finding the Equation of a Perpendicular Line

Find the equation of a line perpendicular to [latex]f\left(x\right)=3x+3[/latex] that passes through the point (3, 0).

Show Solution

The original line has slope [latex]m=3[/latex], so the slope of the perpendicular line will be its negative reciprocal, or [latex]-\frac[/latex]. Using this slope and the given point, we can find the equation for the line.

[latex]\beging\left(x\right)=-\fracx+b\hfill \\ 0=-\frac\left(3\right)+b\hfill \\ \text< >1=b\hfill \\ b=1\hfill \end[/latex]

The line perpendicular to f(x) that passes through (3, 0) is [latex]g\left(x\right)=-\fracx+1[/latex].

Analysis of the Solution

A graph of the two lines is shown below.

Graph of two functions where the blue line is g(x) = -1/3x + 1, and the orange line is f(x) = 3x + 6.

Try It

  1. For what y-intercept will the graph of[latex]f(x)[/latex] pass through the point [latex](-2,5)[/latex]?
  2. Add a new function that uses the slope m that will create a line that is perpendicular to the function [latex]f(x)=mx-2[/latex].
  3. For what y-intercept will the new function pass through the point [latex](4,1)[/latex], and still be perpendicular to [latex]f(x)[/latex]
Show Solution
  1. When the y-intercept is [latex](0,3)[/latex] the function will be [latex]f(x) = mx+3[/latex] and the function will pass through the point [latex](-2,5)[/latex].
  2. [latex]f(x)=\fracx-2[/latex] for example. Any value for the y-intercept will work.
  3. The y-intercept [latex](0,-3)[/latex] will give a line perpendicular to [latex]f(x)[/latex] that passes through the point [latex](4,1)[/latex].

How To: Given two points on a line and a third point, write the equation of the perpendicular line that passes through the point.

  1. Determine the slope of the line passing through the points.
  2. Find the negative reciprocal of the slope.
  3. Use slope-intercept form or point-slope form to write the equation by substituting the known values.
  4. Simplify.

Example: Finding the Equation of a Line going through a point and Perpendicular to a Given Line

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

Show Solution

From the two points of the given line, we can calculate the slope of that line.

Find the negative reciprocal of the slope.

We can then solve for the y-intercept of the line passing through the point (4, 5).

[latex]\beging\left(x\right)=6x+b\hfill \\ 5=6\left(4\right)+b\hfill \\ 5=24+b\hfill \\ -19=b\hfill \\ b=-19\hfill \end[/latex]

The equation of the line that passes through the point (4, 5) and is perpendicular to the line passing through the two given points is [latex]y=6x - 19[/latex].

Try It

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

Show Solution

Absolute Value Functions

The Milky Way.

Distances in deep space can be measured in all directions. As such, it is useful to consider distance in terms of absolute values. (credit: “s58y”/Flickr)

Until the 1920s, the so-called spiral nebulae were believed to be clouds of dust and gas in our own galaxy some tens of thousands of light years away. Then, astronomer Edwin Hubble proved that these objects are galaxies in their own right at distances of millions of light years. Today, astronomers can detect galaxies that are billions of light years away. Distances in the universe can be measured in all directions. As such, it is useful to consider distance as an absolute value function. In this section, we will investigate absolute value functions.

Understanding Absolute Value

Recall that in its basic form [latex]\displaystyle\left(\right)=<|x|>[/latex], the absolute value function, is one of our toolkit functions. The absolute value function is commonly thought of as providing the distance a number is from zero on a number line. Algebraically, for whatever the input value is, the output is the value without regard to sign.

A General Note: Absolute Value Function

The absolute value function can be defined as a piecewise function

[latex]f(x) =\beginx ,\ x \geq 0 \\ -x , x < 0\\ \end[/latex]

Example: Determine a Number within a Prescribed Distance

Describe all values [latex]x[/latex] within or including a distance of 4 from the number 5.

Show Solution

Number line describing the difference of the distance of 4 away from 5.

We want the distance between [latex]x[/latex] and 5 to be less than or equal to 4. We can draw a number line to represent the condition to be satisfied.

The distance from [latex]x[/latex] to 5 can be represented using [latex]|x - 5|[/latex]. We want the values of [latex]x[/latex] that satisfy the condition [latex]|x - 5|\le 4[/latex].

Analysis of the Solution

[latex]\displaystyle\le[/latex]
[latex]\displaystyle\le[/latex]
And:
[latex]\displaystyle\le[/latex]
[latex]\displaystyle\le[/latex]

So [latex]|x - 5|\le 4[/latex] is equal to [latex]1\le x\le 9[/latex].

However, mathematicians generally prefer absolute value notation.

Try It

Describe all values [latex]x[/latex] within a distance of 3 from the number 2.

Show Solution

[latex]|x - 2|\le 3[/latex]

Example: Resistance of a Resistor

Electrical parts, such as resistors and capacitors, come with specified values of their operating parameters: resistance, capacitance, etc. However, due to imprecision in manufacturing, the actual values of these parameters vary somewhat from piece to piece even when they are supposed to be the same. The best that manufacturers can do is to try to guarantee that the variations will stay within a specified range, often [latex]\pm 1\%,\pm5\%,[/latex] or [latex]\displaystyle\pm10\%[/latex].

Suppose we have a resistor rated at 680 ohms, [latex]\pm 5\%[/latex]. Use the absolute value function to express the range of possible values of the actual resistance.

Show Solution

5% of 680 ohms is 34 ohms. The absolute value of the difference between the actual and nominal resistance should not exceed the stated variability, so, with the resistance [latex]R[/latex] in ohms,

[latex]|R - 680|\le 34[/latex]

Try It

Students who score within 20 points of 80 will pass a test. Write this as a distance from 80 using absolute value notation.

Show Solution

Using the variable [latex]p[/latex] for passing, [latex]|p - 80|\le 20[/latex].

The most significant feature of the absolute value graph is the corner point at which the graph changes direction. This point is shown at the origin.

Graph of an absolute function

The graph below is of [latex]y=2\left|x - 3\right|+4[/latex]. The graph of [latex]y=|x|[/latex] has been shifted right 3 units, vertically stretched by a factor of 2, and shifted up 4 units. This means that the corner point is located at [latex]\left(3,4\right)[/latex] for this transformed function.

Graph of the different types of transformations for an absolute function.

Example: Writing an Equation for an Absolute Value Function

Write an equation for the function graphed below.

Graph of an absolute function. Two rays stem from the point 3, negative 2. One ray crosses the point 0, 4. The other ray crosses the point 5, 2.

Show Solution

The basic absolute value function changes direction at the origin, so this graph has been shifted to the right 3 units and down 2 units from the basic toolkit function.

Graph of two transformations for an absolute function at (3, -2).

We also notice that the graph appears vertically stretched, because the width of the final graph on a horizontal line is not equal to 2 times the vertical distance from the corner to this line, as it would be for an unstretched absolute value function. Instead, the width is equal to 1 times the vertical distance.

Graph of two transformations for an absolute function at (3, -2) and describes the ratios between the two different transformations.

From this information we can write the equation

Analysis of the Solution

Note that these equations are algebraically the same—the stretch for an absolute value function can be written interchangeably as a vertical or horizontal stretch or compression.

Q & A

If we couldn’t observe the stretch of the function from the graphs, could we algebraically determine it?

Yes. If we are unable to determine the stretch based on the width of the graph, we can solve for the stretch factor by putting in a known pair of values for [latex]x[/latex] and [latex]f\left(x\right)[/latex].

Now substituting in the point (1, 2)

[latex]\begin2=a|1 - 3|-2\hfill \\ 4=2a\hfill \\ a=2\hfill \end[/latex]

Try It

Write the equation for the absolute value function that is horizontally shifted left 2 units, vertically flipped, and vertically shifted up 3 units.

Show Solution

Q & A

Do the graphs of absolute value functions always intersect the vertical axis? The horizontal axis?

Yes, they always intersect the vertical axis. The graph of an absolute value function will intersect the vertical axis when the input is zero.

No, they do not always intersect the horizontal axis. The graph may or may not intersect the horizontal axis depending on how the graph has been shifted and reflected. It is possible for the absolute value function to intersect the horizontal axis at zero, one, or two points.

Graph of the different types of transformations for an absolute function.

(a) The absolute value function does not intersect the horizontal axis. (b) The absolute value function intersects the horizontal axis at one point. (c) The absolute value function intersects the horizontal axis at two points.

Find the Intercepts of an Absolute Value Function

Knowing how to solve problems involving absolute value functions is useful. For example, we may need to identify numbers or points on a line that are at a specified distance from a given reference point.

How To: Given the formula for an absolute value function, find the horizontal intercepts of its graph.

  1. Isolate the absolute value term.
  2. Use [latex]|A|=B[/latex] to write [latex]A=B[/latex] or [latex]\mathrm=B[/latex], assuming [latex]B>0[/latex].
  3. Solve for [latex]x[/latex].

Example: Finding the Zeros of an Absolute Value Function

For the function [latex]f\left(x\right)=|4x+1|-7[/latex] , find the values of [latex]x[/latex] such that [latex]\text< >f\left(x\right)=0[/latex] .

Show Solution

[latex]\begin0=|4x+1|-7\hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \textf\left(x\right).\hfill \\ 7=|4x+1|\hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \text.\hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ 7=4x+1\hfill & \text\hfill & \hfill & \hfill & \hfill & -7=4x+1\hfill & \text.\hfill \\ 6=4x\hfill & \hfill & \hfill & \hfill & \hfill & -8=4x\hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ x=\frac=1.5\hfill & \hfill & \hfill & \hfill & \hfill & \text< >x=\frac=-2\hfill & \hfill \end[/latex]

Graph an absolute function with x-intercepts at -2 and 1.5.

The function’s output is 0 when [latex]x=1.5[/latex] or [latex]x=-2[/latex].

Try It

For the function [latex]f\left(x\right)=|2x - 1|-3[/latex], find the values of [latex]x[/latex] such that [latex]f\left(x\right)=0[/latex].

Show Solution

[latex]x=-1[/latex] or [latex]x=2[/latex]

Key Concepts

Glossary

absolute value equation an equation of the form [latex]|A|=B[/latex], with [latex]B\ge 0[/latex]; it will have solutions when [latex]A=B[/latex] or [latex]-A=B[/latex] absolute value inequality a relationship in the form [latex]|< A >|,|< A >|\le < B >,|< A >|>< B >,\text|< A >|\ge< B >[/latex] horizontal line a line defined by [latex]f\left(x\right)=b[/latex] where b is a real number. The slope of a horizontal line is 0. parallel lines two or more lines with the same slope perpendicular lines two lines that intersect at right angles and have slopes that are negative reciprocals of each other vertical line a line defined by [latex]x=a[/latex] where a is a real number. The slope of a vertical line is undefined. x-intercept the point on the graph of a linear function when the output value is 0; the point at which the graph crosses the horizontal axis

Licenses and Attributions CC licensed content, Original CC licensed content, Shared previously