3.7: Writing Linear Equations

section 3.7 Learning Objectives

3.7: Writing Linear Equations

  • Write the equation of the line given the slope and the y-intercept using the slope-intercept form
  • Write the equation of the line given the slope and a point on the line using the point-slope form
  • Write the equation of the line given two points on the line
  • Write the equation of a horizontal or vertical line when given the graph
  • Write the equation of a line given a point and a parallel or perpendicular line

 

In this section, we will write the equation of a line given some information about the line.  We will use two forms of a line to help us do this.

The Slope-Intercept Form:  [latex]y = mx + b[/latex]

The Point-Slope Form:  [latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex]

Write the equation of a line given the slope and y-intercept

In a previous section, we were introduced to the Slope-Intercept Form of a line.  We learned that if an equation is written in this form, it is easy to identify the slope of the line and its y-intercept.  In this section, we are being asked to write the equation of the line.  If we know the slope and the y-intercept of a line, we can use the Slope-Intercept Form to help us do that.

[latex]y = mx + b[/latex]

[latex]\begin{array}{l}\,\,\,\,\,m\,\,\,\,=\,\,\,\text{slope}\\(x,y)=\,\,\,\text{a point on the line}\\\,\,\,\,\,\,\,b\,\,\,\,=\,\,\,\text{the y value of the y-intercept}\end{array}[/latex]

Example 1

Write the equation of the line that has a slope of [latex] \displaystyle \frac{1}{2}[/latex] and a y-intercept of [latex](0,-5)[/latex].

We can also find the equation by looking at a graph and finding the slope and y-intercept.

Example 2

Write the equation of the line in the graph by identifying the slope and y-intercept.
SVG_Grapher

 

 

Write the equation of a line given the slope and a point on the line

Using the slope-intercept form of a line is easy when you know both the slope (m) and the y-intercept (b), but what if you know the slope and just any point on the line, not specifically the y-intercept? Can you still write the equation? The answer is yes, but you will need to put in a little more thought and work than you did previously.

Point-Slope Form

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

[latex]\begin{array}{l}\,\,\,\,\,m\,\,\,\,=\,\,\,\text{slope}\\\left({x}_{1},{y}_{1}\right)=\,\,\,\text{a point on the line}\end{array}[/latex]

This is an important formula, as it will be used in other algebra courses 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.

Point-Slope Form

Given a point [latex]\left({x}_{1},{y}_{1}\right)[/latex] and slope m, point-slope form will give the following equation of a line:

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

In our first example, we are given the slope and a point on a line.  We will use the Point-Slope Form to write the equation of the line.

Example 3

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

The following video shows how to write the equation for a line given its slope and a point on the line.

Think about it

There is an alternate method to finding the equation of a line given a point and a slope. See the example below.

Write the equation of the line that has a slope of 3 and contains the point [latex](1,4)[/latex].

The following video gives an example of this alternate method.

Write the equation of a line given two points on the line

Let’s suppose you don’t know either the slope or the y-intercept, but you do know the location of two points on the line. It is more challenging, but you can find the equation of the line that would pass through those two points.  We will begin by using the two points to find the slope of the line.  Once you know the slope of the line, you can use the slope and one of the points in the Point-Slope Form to write the equation of the line.

Example 4

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

In the next example, we again look for the equation of a line given two points. However, this time we are not given the [latex]y[/latex]-intercept.

Example 5

Write the equation of the line that passes through the points [latex](2,1)[/latex] and [latex](−1,−5)[/latex]. Write the equation in slope-intercept form.

To further support that all the ideas we have presented will yield the same result, we now redo the same problem from Example 5 using the “alternate method” presented earlier in this section.

Example 6

Write the equation of the line that passes through the points [latex](2,1)[/latex] and [latex](−1,−5)[/latex]. Write the equation in slope-intercept form.

Notice that is doesn’t matter which point you use when you substitute and solve for b—you get the same result for b either way. In the example above, you substituted the coordinates of the point (2, 1) in the equation [latex]y=2x+b[/latex]. Let’s start with the same equation, [latex]y=2x+b[/latex], but substitute in [latex](−1,−5)[/latex]:

[latex]\begin{array}{l}\,\,\,\,\,y=2x+b\\-5=2\left(-1\right)+b\\-5=-2+b\\-3=b\end{array}[/latex]

The final equation is the same: [latex]y=2x–3[/latex].

Video: Write the equation of a line given two points on the line (Alternate Method)

 

Write the equation of a line given a point and a parallel or perpendicular line

The relationships between slopes of parallel and perpendicular lines can be used to write equations of parallel and perpendicular lines.

Let’s start with an example involving parallel lines.

Write the equation of a line given a point and a parallel line

Example 7

Write the equation of a line that is parallel to the line [latex]x–y=5[/latex] and goes through the point [latex](−2,1)[/latex].

Write the equation of a line given a point and a perpendicular line

When you are working with perpendicular lines, you will usually be given one of the lines and an additional point. Remember that two non-vertical lines are perpendicular if the slope of one is the negative reciprocal of the slope of the other. To find the slope of a perpendicular line, find the reciprocal, and then find the opposite of this reciprocal.  In other words, flip it and change the sign.

Example 8

Write the equation of a line that contains the point [latex](1,5)[/latex] and is perpendicular to the line [latex]y=2x– 6[/latex].

Video: Write the equation of a line given a point and a perpendicular line (Alternate Method)

Write the equations of lines parallel and perpendicular to horizontal and vertical lines

Example 9

Write the equation of a line that is parallel to the line [latex]y=4[/latex] through the point [latex](0,10)[/latex].

Example 10

Write the equation of a line that is perpendicular to the line [latex]y=-3[/latex] through the point [latex](-2,5)[/latex].

Summary

The slope-intercept form of a linear equation is written as [latex]y=mx+b[/latex], where m is the slope and b is the value of y at the y-intercept, which can be written as [latex](0,b)[/latex]. When you know the slope and the y-intercept of a line you can use the slope-intercept form to immediately write the equation of that line. The point-slope form,  [latex]y-{y}_{1}=m\left(x-{x}_{1}\right)[/latex], can be used to write the equation of a line when you know the slope and a point on the line or when you know two points on the line.

When lines in a plane are parallel (that is, they never cross), they have the same slope. When lines are perpendicular (that is, they cross at a 90° angle), their slopes are opposite reciprocals of each other. The product of their slopes will be [latex]-1[/latex], except in the case where one of the lines is vertical causing its slope to be undefined. You can use these relationships to find an equation of a line that goes through a particular point and is parallel or perpendicular to another line.