We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > Intermediate Algebra

Equations of Linear Functions

5.2 Learning Objectives

  • Write the equation of a line
    • Define the equation of a line given two points
    • Define the equation of a line given the slope and a point
    • Write a linear function in standard form
    • Identify the equations for vertical and horizontal lines
    • Given a graph, write the equation of a linear function
    • Given two function values and corresponding inputs, write the equation of the linear function passing through them
    • Given a linear function, write the equations of parallel and perpendicular lines through a given point
  • Model an Application With a Linear Function
    • Define initial value
    • Write a linear function given an initial value and a rate of change
    • Write a linear function given data in a table
In this section, we will learn how to write equations for linear functions given different pieces of information, including two points on the line and the graph of the line.  We will also identify the equations of horizontal and vertical lines and write linear equations from written information.

5.2.1 Point-Slope Formula

We have seen that we can define the slope of a line given two points on the line, and use that information along with the y-intercept to graph the line.  If you don't know the y-intercept, or the equation for the line you can use two points to define the equation of the line using the point-slope formula.

[latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

This is an important formula, as it will be used in other areas of college algebra and often in calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.

The Point-Slope Formula

Given one point and the slope, the point-slope formula will lead to the equation of a line:

[latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

In our first example, we will start with the slope, then we will show how to find the equation of a line without being given the slope.

Example 5.2.A

Write the equation of the line with slope [latex]m=-3[/latex] and passing through the point [latex]\left(4,8\right)[/latex]. Write the final equation in slope-intercept form.

Answer: Using the point-slope formula, substitute [latex]-3[/latex] for m and the point [latex]\left(4,8\right)[/latex] for [latex]\left({x}_{1},{y}_{1}\right)[/latex].

[latex]\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 8=-3\left(x - 4\right)\hfill \\ y - 8=-3x+12\hfill \\ y=-3x+20\hfill \end{array}[/latex]

Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.

In our next example we will start with two points and define the equation of the line that passes through them.

Example 5.2.B

Find the equation of the line passing through the points [latex]\left(3,4\right)[/latex] and [latex]\left(0,-3\right)[/latex]. Write the final equation in slope-intercept form.

Answer: First, we calculate the slope using the slope formula and two points.

[latex]\begin{array}{l}m\hfill=\frac{-3 - 4}{0 - 3}\hfill \\ \hfill =\frac{-7}{-3}\hfill \\ \hfill =\frac{7}{3}\hfill \end{array}[/latex]

Next, we use the point-slope formula with the slope of [latex]\frac{7}{3}[/latex], and either point. Let’s pick the point [latex]\left(3,4\right)[/latex] for [latex]\left({x}_{1},{y}_{1}\right)[/latex].

[latex]\begin{array}{l}y - 4=\frac{7}{3}\left(x - 3\right)\hfill \\ y - 4=\frac{7}{3}x - 7\hfill&\text{Distribute the }\frac{7}{3}.\hfill \\ y=\frac{7}{3}x - 3\hfill \end{array}[/latex]

In slope-intercept form, the equation is written as [latex]y=\frac{7}{3}x - 3[/latex]. To prove that either point can be used, let us use the second point [latex]\left(0,-3\right)[/latex] and see if we get the same equation.

[latex]\begin{array}{l}y-\left(-3\right)=\frac{7}{3}\left(x - 0\right)\hfill \\ y+3=\frac{7}{3}x\hfill \\ y=\frac{7}{3}x - 3\hfill \end{array}[/latex]

We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.

The following video examples shows how to write the equation for a line given it's slope and a point on the line. https://youtu.be/vut5b2fRQQ0

5.2.2 Standard Form of a Line

Another way that we can represent the equation of a line is in standard form. Standard form is given as

[latex]Ax+By=C[/latex]

where [latex]A[/latex], [latex]B[/latex], and [latex]C[/latex] are integers. The x- and y-terms are on one side of the equal sign and the constant term is on the other side.

Example 5.2.C

Find the equation of the line with [latex]m=-6[/latex] and passing through the point [latex]\left(\frac{1}{4},-2\right)[/latex]. Write the equation in standard form.

Answer: We begin using the point-slope formula.

[latex]\begin{array}{l}y-\left(-2\right)=-6\left(x-\frac{1}{4}\right)\hfill \\ y+2=-6x+\frac{3}{2}\hfill \end{array}[/latex]

From here, we multiply through by 2, as no fractions are permitted in standard form, and then move both variables to the left aside of the equal sign and move the constants to the right.

[latex]\begin{array}{l}2\left(y+2\right)=\left(-6x+\frac{3}{2}\right)2\hfill \\ 2y+4=-12x+3\hfill \\ 12x+2y=-1\hfill \end{array}[/latex]

This equation is now written in standard form.

5.2.3 Vertical and Horizontal Lines

The equations of vertical and horizontal lines do not require any of the preceding formulas, although we can use the formulas to prove that the equations are correct. The equation of a vertical line is given as

[latex]x=c[/latex]

where c is a constant. The slope of a vertical line is undefined, and regardless of the y-value of any point on the line, the x-coordinate of the point will be c. Suppose that we want to find the equation of a line containing the following points: [latex]\left(-3,-5\right),\left(-3,1\right),\left(-3,3\right)[/latex], and [latex]\left(-3,5\right)[/latex]. First, we will find the slope.

[latex]m=\frac{5 - 3}{-3-\left(-3\right)}=\frac{2}{0}[/latex]

Zero in the denominator means that the slope is undefined and, therefore, we cannot use the point-slope formula. However, we can plot the points. Notice that all of the x-coordinates are the same and we find a vertical line through [latex]x=-3[/latex]. The equation of a horizontal line is given as

[latex]y=c[/latex]

where c is a constant. The slope of a horizontal line is zero, and for any x-value of a point on the line, the y-coordinate will be c. Suppose we want to find the equation of a line that contains the following set of points: [latex]\left(-2,-2\right),\left(0,-2\right),\left(3,-2\right)[/latex], and [latex]\left(5,-2\right)[/latex]. We can use the point-slope formula. First, we find the slope using any two points on the line.

[latex]\begin{array}{l}m=\frac{-2-\left(-2\right)}{0-\left(-2\right)}\hfill \\ =\frac{0}{2}\hfill \\ =0\hfill \end{array}[/latex]

Use any point for [latex]\left({x}_{1},{y}_{1}\right)[/latex] in the formula, or use the y-intercept.

[latex]\begin{array}{l}y-\left(-2\right)=0\left(x - 3\right)\hfill \\ y+2=0\hfill \\ y=-2\hfill \end{array}[/latex]

The graph is a horizontal line through [latex]y=-2[/latex]. Notice that all of the y-coordinates are the same.
Coordinate plane with the x-axis ranging from negative 7 to 4 and the y-axis ranging from negative 4 to 4. The function y = negative 2 and the line x = negative 3 are plotted. The line [latex]x=−3[/latex] is a vertical line. The line [latex]y=−2[/latex] is a horizontal line.

Example 5.2.D

Find the equation of the line passing through the given points: [latex]\left(1,-3\right)[/latex] and [latex]\left(1,4\right)[/latex].

Answer: The x-coordinate of both points is 1. Therefore, we have a vertical line, [latex]x=1[/latex].

Our last video show another example of writing the equation of a line given two points on the line. https://youtu.be/ndRpJxdmZJI

Now that we have written equations for linear functions in both the slope-intercept form and the point-slope form, we can choose which method to use 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 f below.

Graph depicting how to calculate the slope of a line The function f passing through the points (0.7) and  (4,4) with a negative slope.

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 (0, 7) and (4, 4). We can use these points to calculate the slope.

[latex]\begin{array}{l}m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ \text{ } =\frac{4 - 7}{4 - 0}\hfill \\ \text{ } =-\frac{3}{4} \end{array}[/latex]

Now we can substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 4=-\frac{3}{4}\left(x - 4\right)\hfill \end{array}[/latex]

If we want to rewrite the equation in the slope-intercept form, we would find

[latex]\begin{array}{l}y - 4=-\frac{3}{4}\left(x - 4\right)\hfill \\ y - 4=-\frac{3}{4}x+3\hfill \\ \text{ }y=-\frac{3}{4}x+7\hfill \end{array}[/latex]
Rewrite the equation in slope intercept form.

If we wanted 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, b = 7. We now have the initial value b and the slope m so we can substitute m and b into the slope-intercept form of a line.

So the function is [latex]f\left(x\right)=-\frac{3}{4}x+7[/latex], and the linear equation would be [latex]y=-\frac{3}{4}x+7[/latex].

Given the graph of a linear function, write an equation to represent the function.

  1. Identify two points on the line.
  2. Use the two points to calculate the slope.
  3. Determine where the line crosses the y-axis to identify the y-intercept by visual inspection.
  4. Substitute the slope and y-intercept into the slope-intercept form of a line equation.
 

Example 5.2.E

Write an equation for a linear function given a graph of f shown below. Graph of an increasing function with points at (-3, 0) and (0, 1).

Answer:

Identify two points on the line, such as (0, 2) and (–2, –4). Use the points to calculate the slope.

[latex-display]\begin{array} \\ m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ \text{ }=\frac{-4 - 2}{-2 - 0}\hfill \\ \text{ }=\frac{-6}{-2}\hfill \\ \text{ }=3\hfill \end{array}[/latex-display]
 

Substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]\begin{array} \\ y-{y}_{1}=m\left(x-{x}_{1}\right)\\ y-\left(-4\right)=3\left(x-\left(-2\right)\right)\\ y+4=3\left(x+2\right)\end{array}[/latex]
 

We can use algebra to rewrite the equation in the slope-intercept form.

[latex]\begin{array} \\ y+4=3\left(x+2\right)\hfill \\ y+4=3x+6\hfill \\ \text{ }y=3x+2\hfill \end{array}[/latex]

 

Analysis of the Solution

This makes sense because we can see from the graph below that the line crosses the y-axis at the point (0, 2), which is the y-intercept, so b = 2. Graph of an increasing line with points at (0, 2) and (-2, -4). In the following video we show an example of how to write the equation of a line given it's graph. https://youtu.be/mmWf_oLTNSQ

Example 5.2.F

If f is a linear function, with [latex]f\left(3\right)=-2[/latex] , and [latex]f\left(8\right)=1[/latex], find an equation for the function in slope-intercept form.

Answer:

We can write the given points using coordinates.

[latex]\begin{array}f\left(3\right)=-2\to \left(3,-2\right)\hfill \\ f\left(8\right)=1\to \left(8,1\right)\hfill \end{array}[/latex]

We can then use the points to calculate the slope.

[latex]\begin{array} m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\hfill \\ \text{ }=\frac{1-\left(-2\right)}{8 - 3}\hfill \\ \text{ }=\frac{3}{5}\hfill \end{array}[/latex]

Substitute the slope and the coordinates of one of the points into the point-slope form.

[latex]\begin{array}\text{ }y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y-\left(-2\right)=\frac{3}{5}\left(x - 3\right)\hfill \end{array}[/latex]

We can use algebra to rewrite the equation in the slope-intercept form.

[latex]\begin{array}y+2=\frac{3}{5}\left(x - 3\right)\hfill \\ y+2=\frac{3}{5}x-\frac{9}{5}\hfill \\ \text{ }y=\frac{3}{5}x-\frac{19}{5}\hfill \end{array}[/latex]

In the video we show another example of how to write a linear function given two points written with function notation. https://youtu.be/TSIcryAtCmY

5.2.4 Parallel and Perpendicular Lines

Parallel lines have the same slope and different y-intercepts. Lines that are parallel to each other will never intersect. For example, the figure below shows the graphs of various lines with the same slope, [latex]m=2[/latex].
Coordinate plane with the x-axis ranging from negative 8 to 8 in intervals of 2 and the y-axis ranging from negative 7 to 7. Three functions are graphed on the same plot: y = 2 times x minus 3; y = 2 times x plus 1 and y = 2 times x plus 5. Parallel lines
All of the lines shown in the graph are parallel because they have the same slope and different y-intercepts. Lines that are perpendicular intersect to form a [latex]{90}^{\circ }[/latex] -angle. The slope of one line is the negative reciprocal of the other. We can show that two lines are perpendicular if the product of the two slopes is [latex]-1:{m}_{1}\cdot {m}_{2}=-1[/latex]. For example, the figure above shows the graph of two perpendicular lines. One line has a slope of 3; the other line has a slope of [latex]-\frac{1}{3}[/latex].

[latex]\begin{array}{l}\text{ }{m}_{1}\cdot {m}_{2}=-1\hfill \\ \text{ }3\cdot \left(-\frac{1}{3}\right)=-1\hfill \end{array}[/latex]

Coordinate plane with the x-axis ranging from negative 3 to 6 and the y-axis ranging from negative 2 to 5. Two functions are graphed on the same plot: y = 3 times x minus 1 and y = negative x/3 minus 2. Their intersection is marked by a box to show that it is a right angle. Perpendicular lines

Example: Graphing Two Equations, and Determining Whether the Lines are Parallel, Perpendicular, or Neither 5.2.G

Graph the equations of the given lines, and state whether they are parallel, perpendicular, or neither: [latex]3y=-4x+3[/latex] and [latex]3x - 4y=8[/latex].

Answer: The first thing we want to do is rewrite the equations so that both equations are in slope-intercept form. First equation:

[latex]\begin{array}{l}3y=-4x+3\hfill \\ y=-\frac{4}{3}x+1\hfill \end{array}[/latex]

Second equation:

[latex]\begin{array}{l}3x - 4y=8\hfill \\ -4y=-3x+8\hfill \\ y=\frac{3}{4}x - 2\hfill \end{array}[/latex]

See the graph of both lines in the graph below. Coordinate plane with the x-axis ranging from negative 4 to 5 and the y-axis ranging from negative 4 to 4. Two functions are graphed on the same plot: y = negative 4 times x/3 plus 1 and y = 3 times x/4 minus 2. A box is placed at the intersection to note that it forms a right angle. From the graph, we can see that the lines appear perpendicular, but we must compare the slopes.

[latex]\begin{array}{l}{m}_{1}=-\frac{4}{3}\hfill \\ {m}_{2}=\frac{3}{4}\hfill \\ {m}_{1}\cdot {m}_{2}=\left(-\frac{4}{3}\right)\left(\frac{3}{4}\right)=-1\hfill \end{array}[/latex]

The slopes are negative reciprocals of each other, confirming that the lines are perpendicular.

Try It

Graph the two lines and determine whether they are parallel, perpendicular, or neither: [latex]2y-x=10[/latex] and [latex]2y=x+4[/latex].

Answer: Parallel lines: equations are written in slope-intercept form. Coordinate plane with the x-axis ranging from negative 5 to 5 and the y-axis ranging from negative 1 to 6. Two functions are graphed on the same plot: y = x/2 plus 5 and y = x/2 plus 2. The lines do not cross.

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 following equation.

[latex]f\left(x\right)=3x+1[/latex]

We know that the slope of the line formed by the function 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). So the lines formed by all of the following functions will be parallel to f(x).

[latex]\begin{cases}g\left(x\right)=3x+6\hfill \\ h\left(x\right)=3x+1\hfill \\ p\left(x\right)=3x+\frac{2}{3}\hfill \end{cases}[/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 with the point-slope form of an equation for a line, and then rewrite it in the slope-intercept form.

[latex]\begin{cases}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 7=3\left(x - 1\right)\hfill \\ y - 7=3x - 3\hfill \\ \text{ }y=3x+4\hfill \end{cases}[/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 parallel to the given line that passes through the given point.

  1. Find the slope of the function.
  2. Substitute the given values into either the general point-slope equation or the slope-intercept equation for a line.
  3. Simplify.

Example: Finding a Line Parallel to a Given Line 5.2.H

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

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

[latex]\begin{cases}g\left(x\right)=3x+b\hfill \\ \text{ }0=3\left(3\right)+b\hfill \\ \text{ }b=-9\hfill \end{cases}[/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 graph 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 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 following function:

[latex]f\left(x\right)=2x+4[/latex]

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

[latex]\begin{cases}g\left(x\right)=-\frac{1}{2}x+4\hfill \\ h\left(x\right)=-\frac{1}{2}x+2\hfill \\ p\left(x\right)=-\frac{1}{2}x-\frac{1}{2}\hfill \end{cases}[/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 then 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{1}{2}[/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]\begin{cases}g\left(x\right)=mx+b\hfill \\ 0=-\frac{1}{2}\left(4\right)+b\hfill \\ 0=-2+b\hfill \\ 2=b\hfill \\ b=2\hfill \end{cases}[/latex]

The equation for the function with a slope of [latex]-\frac{1}{2}[/latex] and a y-intercept of 2 is [latex]g\left(x\right)=-\frac{1}{2}x+2[/latex]. So [latex]g\left(x\right)=-\frac{1}{2}x+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 perpendicular to the given line THROUGH A GIVEN POINT.

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

Example: Finding the Equation of a Perpendicular Line 5.2.I

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

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

[latex]\begin{cases}y_{2}=-\frac{1}{3}x+b\hfill \\ \text{ }0=-\frac{1}{3}\left(3\right)+b\hfill \\ \text{ }1=b\hfill \\ \text{ }b=1\hfill \end{cases}[/latex]

The line perpendicular to y that passes through (3, 0) is [latex]y_{2}=-\frac{1}{3}x+1[/latex].

Analysis of the Solution

A graph of the two lines is shown in the graph 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

Given the line [latex]y=2x - 4[/latex], write an equation for the line passing through (0, 0) that is
  1. parallel to y
  2. perpendicular to y

Answer:

  1. [latex]y=2x[/latex]is parallel
  2. [latex]y=-\frac{1}{2}x[/latex]is perpendicular

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 the 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 Perpendicular to a Given Line Passing through a Point 5.2.J

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).

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

[latex]\begin{cases}{m}_{1}=\frac{5 - 6}{4-\left(-2\right)}\hfill \\ =\frac{-1}{6}\hfill \\ =-\frac{1}{6}\hfill \end{cases}[/latex]

Find the negative reciprocal of the slope.

[latex]\begin{cases}{m}_{2}=\frac{-1}{-\frac{1}{6}}\hfill \\ =-1\left(-\frac{6}{1}\right)\hfill \\ =6\hfill \end{cases}[/latex]

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

[latex]\begin{cases}g\left(x\right)=6x+b\hfill \\ 5=6\left(4\right)+b\hfill \\ 5=24+b\hfill \\ -19=b\hfill \\ b=-19\hfill \end{cases}[/latex]

The equation for the line that is perpendicular to the line passing through the two given points and also passes through point (4, 5) 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).

Answer: [latex]y=-\frac{1}{3}x+6[/latex]

Writing the Equations of Lines Parallel or Perpendicular to a Given Line

As we have learned, determining whether two lines are parallel or perpendicular is a matter of finding the slopes. To write the equation of a line parallel or perpendicular to another line, we follow the same principles as we do for finding the equation of any line. After finding the slope, use the point-slope formula to write the equation of the new line.

How To: Given an equation for a line, write the equation of a line parallel or perpendicular to it THROUGH A GIVEN POINT.

  1. Find the slope of the given line. The easiest way to do this is to write the equation in slope-intercept form.
  2. Use the slope and the given point with the point-slope formula.
  3. Simplify the line to slope-intercept form and compare the equation to the given line.

Example: Writing the Equation of a Line Parallel to a Given Line Passing Through a Given Point 5.2.K

Write the equation of line parallel to a [latex]5x+3y=1[/latex] and passing through the point [latex]\left(3,5\right)[/latex].

Answer: First, we will write the equation in slope-intercept form to find the slope.

[latex]\begin{array}{l}5x+3y=1\hfill \\ 3y=-5x+1\hfill \\ y=-\frac{5}{3}x+\frac{1}{3}\hfill \end{array}[/latex]

The slope is [latex]m=-\frac{5}{3}[/latex]. The y-intercept is [latex]\frac{1}{3}[/latex], but that really does not enter into our problem, as the only thing we need for two lines to be parallel is the same slope. The one exception is that if the y-intercepts are the same, then the two lines are the same line. The next step is to use this slope and the given point with the point-slope formula.

[latex]\begin{array}{l}y - 5=-\frac{5}{3}\left(x - 3\right)\hfill \\ y - 5=-\frac{5}{3}x+5\hfill \\ y=-\frac{5}{3}x+10\hfill \end{array}[/latex]

The equation of the line is [latex]y=-\frac{5}{3}x+10[/latex]. Coordinate plane with the x-axis ranging from negative 8 to 8 in intervals of 2 and the y-axis ranging from negative 2 to 12 in intervals of 2. Two functions are graphed on the same plot: y = negative 5 times x/3 plus 1/3 and y = negative 5 times x/3 plus 10. The lines do not cross.

Try It

Find the equation of the line parallel to [latex]5x=7+y[/latex] and passing through the point [latex]\left(-1,-2\right)[/latex].

Answer: [latex]y=5x+3[/latex]

Example: Finding the Equation of a Line Perpendicular to a Given Line Passing Through a Given Point 5.2.L

Find the equation of the line perpendicular to [latex]5x - 3y+4=0\left(-4,1\right)[/latex].

Answer: The first step is to write the equation in slope-intercept form.

[latex]\begin{array}{l}5x - 3y+4=0\hfill \\ -3y=-5x - 4\hfill \\ y=\frac{5}{3}x+\frac{4}{3}\hfill \end{array}[/latex]

We see that the slope is [latex]m=\frac{5}{3}[/latex]. This means that the slope of the line perpendicular to the given line is the negative reciprocal, or [latex]-\frac{3}{5}[/latex]. Next, we use the point-slope formula with this new slope and the given point.

[latex]\begin{array}{l}y - 1=-\frac{3}{5}\left(x-\left(-4\right)\right)\hfill \\ y - 1=-\frac{3}{5}x-\frac{12}{5}\hfill \\ y=-\frac{3}{5}x-\frac{12}{5}+\frac{5}{5}\hfill \\ y=-\frac{3}{5}x-\frac{7}{5}\hfill \end{array}[/latex]

Key Concepts

  • Given two points, we can find the slope of a line using the slope formula.
  • We can identify the slope and y-intercept of an equation in slope-intercept form.
  • We can find the equation of a line given the slope and a point.
  • We can also find the equation of a line given two points. Find the slope and use the point-slope formula.
  • The standard form of a line has no fractions.
  • Horizontal lines have a slope of zero and are defined as [latex]y=c[/latex], where c is a constant.
  • Vertical lines have an undefined slope (zero in the denominator), and are defined as [latex]x=c[/latex], where c is a constant.
  • Parallel lines have the same slope and different y-intercepts.
  • Perpendicular lines have slopes that are negative reciprocals of each other unless one is horizontal and the other is vertical.
  • A linear equation can be used to solve for an unknown in a number problem.

Glossary

slope the change in y-values over the change in x-values

5.2.5 Model an Application With a Linear Function

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.

Given a linear function f and the initial value and rate of change, evaluate f(c).

  1. Determine the initial value and the rate of change (slope).
  2. Substitute the values into [latex]f\left(x\right)=mx+b[/latex].
  3. Evaluate the function at [latex]x=c[/latex].
Initial value is a term that is typically used in applications of functions.  It can be represented as the starting point of the relationship we are describing with a function. In the case of linear functions, the initial value is typically the y-intercept. Here are some characteristics of initial value:
  • The point [latex](0,y)[/latex] is often the initial value of a linear function
  • The y value of the initial value comes from b in the slope intercept form of a linear function, [latex]f\left(x\right)=mx+b[/latex]
  • The initial value can be found by solving for b, or substituting 0 for x in a linear function.
In our first example, we are given a scenario where Marcus wants to increase the number of songs in his music collection by a fixed amount each month. This is a perfect candidate for a linear function because the increase in the number of songs stays the same each month. We will identify the initial value for the music collection, and write an equation that represents the number of songs in the collection for any number of months, t.

Example 5.2.M

Marcus currently has 200 songs in his music collection. Every month, he adds 15 new songs. Write a formula for the number of songs, N, in his collection as a function of time, t, the number of months. How many songs will he own in a year?

Answer:

The initial value for this function is 200 because he currently owns 200 songs, so N(0) = 200, which means that b = 200.

Figure 12

The number of songs increases by 15 songs per month, so the rate of change is 15 songs per month. Therefore we know that m = 15. We can substitute the initial value and the rate of change into the slope-intercept form of a line.

We can write the formula [latex]N\left(t\right)=15t+200[/latex].

With this formula, we can then predict how many songs Marcus will have in 1 year (12 months). In other words, we can evaluate the function at t = 12.

[latex]\begin{array}N\left(12\right)=15\left(12\right)+200\hfill \\ \text{ }=180+200\hfill \\ \text{ }=380\hfill \end{array}[/latex]

Marcus will have 380 songs in 12 months.

5.2.6 Analysis of the Solution

Notice that N is an increasing linear function. As the input (the number of months) increases, the output (number of songs) increases as well.

In our next example, we will show that you can write the equation for a linear function given two data points.  In this case, Ilya's weekly income depends on the number of insurance policies he sells.  We are given his income for two different weeks and the number of policies sold.  We first find the rate of change and then solve for the initial value.

Example 5.2.N

Working as an insurance salesperson, Ilya earns a base salary plus a commission on each new policy. Therefore, Ilya’s weekly income, I, depends on the number of new policies, n, he sells during the week. Last week he sold 3 new policies, and earned $760 for the week. The week before, he sold 5 new policies and earned $920. Find an equation for I(n), and interpret the meaning of the components of the equation.

Answer:

The given information gives us two input-output pairs: (3, 760) and (5, 920). We start by finding the rate of change.

[latex]\begin{array}m=\frac{920 - 760}{5 - 3}\hfill \\ \text{ }=\frac{$160}{\text{2 policies}}\hfill \\ \text{ }=$80\text{ per policy}\hfill \end{array}[/latex]

Keeping track of units can help us interpret this quantity. Income increased by $160 when the number of policies increased by 2, so the rate of change is $80 per policy. Therefore, Ilya earns a commission of $80 for each policy sold during the week.

We can then solve for the initial value.

[latex]\begin{array}\text{ }I\left(n\right)=80n+b\hfill & \hfill \\ \text{ }760=80\left(3\right)+b\hfill & \text{when }n=3, I\left(3\right)=760\hfill \\ 760 - 80\left(3\right)=b\hfill & \hfill \\ \text{ }520=b\hfill & \hfill \end{array}[/latex]

The value of b is the starting value for the function and represents Ilya’s income when n = 0, or when no new policies are sold. We can interpret this as Ilya’s base salary for the week, which does not depend upon the number of policies sold.

We can now write the final equation.

[latex]I\left(n\right)=80n+520[/latex]

Our final interpretation is that Ilya’s base salary is $520 per week and he earns an additional $80 commission for each policy sold.

5.2.7 Analysis of the Solution

We used units to help us verify that we were calculating the rate correctly. It makes sense to speak in terms of the price per policy. To calculate the initial value, we solved for b by substituting values from one of the points we were given for n and I. In the following video example we show how to identify the initial value, slope and equation for a linear function. https://youtu.be/JMQSdRFJ1S4 We will show one more example of how to write a linear function that represents the monthly cost to run a company given monthly fixed costs and production costs per item.

Example 5.2.o

Suppose Ben starts a company in which he incurs a fixed cost of $1,250 per month for the overhead, which includes his office rent. His production costs are $37.50 per item. Write a linear function where C(x) is the cost for x items produced in a given month.

Answer: The fixed cost is present every month, $1,250. The costs that can vary include the cost to produce each item, which is $37.50 for Ben. The variable cost, called the marginal cost, is represented by 37.5. The cost Ben incurs is the sum of these two costs, represented by [latex]C\left(x\right)=1250+37.5x[/latex].

5.2.8 Analysis of the Solution

It is important to note that we are writing a function based on monthly costs, so the initial cost will be $1,250 becuase Ben has to pay that amount monthly for rent. If Ben produces 100 items in a month, his monthly cost is represented by

[latex]\begin{array}C\left(100\right)=1250+37.5\left(100\right)\hfill\text{ } \\ =5000\hfill \end{array}[/latex]

So his monthly cost would be $5,000.

The following video example show how to write a linear function that represents how many miles you can travel in a rental car for a fixed amount. https://youtu.be/H8KR3w2nXqs
In the next example we will take data that is in tabular (table) form to write an equation that describes the rate of change in the numbers of a rat population.

Example 5.2.P

The table below relates the number of rats in a population to time, in weeks. Use the table to write a linear equation.

w, number of weeks 0 2 4 6
P(w), number of rats 1000 1080 1160 1240

Answer:

We can see from the table that the initial value for the number of rats is 1000, so b = 1000.

Rather than solving for m, we can tell from looking at the table that the population increases by 80 for every 2 weeks that pass. This means that the rate of change is 80 rats per 2 weeks, which can be simplified to 40 rats per week.

[latex]P\left(w\right)=40w+1000[/latex]

If we did not notice the rate of change from the table we could still solve for the slope using any two points from the table. For example, using (2, 1080) and (6, 1240)

[latex]\begin{array}m=\frac{1240 - 1080}{6 - 2}\hfill \\ \text{ }=\frac{160}{4}\hfill \\ \text{ }=40\hfill \end{array}[/latex]

Think About It

Is the initial value always provided in a table of values like the table in the previous example? Write your ideas in the textbox below before you look at the answer. If your answer is no, give a description of how you would find the initial value. [practice-area rows="2"][/practice-area]

Answer: No. Sometimes the initial value is provided in a table of values, but sometimes it is not. If you see an input of 0, then the initial value would be the corresponding output. If the initial value is not provided because there is no value of input on the table equal to 0, find the slope, substitute one coordinate pair and the slope into [latex]f\left(x\right)=mx+b[/latex], and solve for b.

Summary

Slope of a line

  • The slope of a line indicates the direction in which a line slants as well as its steepness. Slope is defined algebraically as:[latex]m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}[/latex]
  • Given the slope and one point on a line, we can find the equation of the line using the point-slope formula. [latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

Equations of Lines

  • Standard form of a line is given as [latex]Ax+By=C[/latex].
  • The equation of a vertical line is given as [latex]x=c[/latex]
  • The equation of a horizontal line is given as [latex]y=c[/latex]
  • Given a graph you can write the equation of the line it represents
  • This method only works for graphs that have points that are easy to verify by visual inspection

Modeling Applications With Linear Functions

  • Sometimes we are given an initial value, and sometimes we have to solve for it
  • Using units can help you verify that you have calculated slope correctly
  • We can write the equation for a line given a slope and a data point, or from a table of data

Licenses & Attributions

CC licensed content, Original

  • Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
  • Ex: Savings Linear Function Application (Slope, Intercept Meaning). Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.

CC licensed content, Shared previously

  • Ex: Find the Equation of a Line in Point Slope and Slope Intercept Form Given the Slope and a Point. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Ex: Find The Equation of the Line in Point-Slope and Slope Intercept Form Given Two Points. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • College Algebra. Provided by: OpenStax Located at: https://cnx.org/contents/[email protected]:1/Preface. License: CC BY: Attribution. License terms: Download for free: http://cnx.org/contents/[email protected]:1/Preface.
  • Ex: Linear Equation Application (Cost of a Rental Car). Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Ex 1: Find the Equation of a Line in Slope Intercept Form Given the Graph of a Line. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.
  • Ex: Find the Linear Function Given Two Function Values in Function Notation. Authored by: James Sousa (Mathispower4u.com) . License: CC BY: Attribution.