"

5 Slope Basics

Topics Covered:[1]

In case you missed something in class, or just want to review a specific topic covered in this Module, here is a list of topics covered:
  1. Defining Slope
  2. Slope and Equations
  3. Graphing and Slope
  4. Graphing with Slope and Intercept
  5. Vertical and Horizontal Lines
  6. Key Concepts

Defining Slope

When you graph linear equations, you may notice that some lines tilt up as they go from left to right and some lines tilt down. Some lines are very steep and some lines are flatter.

In mathematics, the measure of the steepness of a line is called the slope of the line.

The concept of slope has many applications in the real world. In construction the pitch of a roof, the slant of the plumbing pipes, and the steepness of the stairs are all applications of slope. and as you ski or jog down a hill, you definitely experience slope.

We can assign a numerical value to the slope of a line by finding the ratio of the rise and run. The rise is the amount the vertical distance changes while the run measures the horizontal change, as shown in this illustration. Slope is a rate of change.

This figure has a diagram of two arrows. The first arrow is vertical and pointed up and labeled “rise”. The second arrow starts at the end of the first. The second arrow is horizontal and pointed right and labeled “run”.

Slope of a Line

The slope of a line is m = \displaystyle\frac{\text{rise}}{\text{run}} .

The rise measures the vertical change and the run measures the horizontal change.

  1. Locate two points on the line whose coordinates are integers.
  2. Starting with one point, sketch a right triangle, going from the first point to the second point.
  3. Count the rise and the run on the legs of the triangle.
  4. Take the ratio of rise to run to find the slope: m = \displaystyle\frac{\text{rise}}{\text{run}} .

To find the slope of a line, we locate two points on the line whose coordinates are integers. Then we sketch a right triangle where the two points are vertices and one side is horizontal and one side is vertical.

Try It!

Find the slope of the line shown.


This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 9. The y-axis runs from negative 1 to 7. The line goes through the points (0, 5), (3, 3), and (6, 1).


Solution  (click to reveal)
Steps Algebraic
Locate two points on the graph whose
coordinates are integers.
(0,5) and (3,3)
Starting at (0,5), sketch a right triangle to (3,3) as shown in this graph. The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 10. The y-axis runs from negative 1 to 8. The line goes through the points (0, 5) and (3, 3). A right triangle is drawn by connecting the three points (0, 3), (0, 5), and (3, 3). The vertical side of the triangle is labeled “rise” and the horizontal side of the triangle is labeled “run”.
Count the rise— since it goes down, it is negative. The rise is −2.
Count the run. The run is 3.
Use the slope formula. m = \displaystyle\frac{\text{rise}}{\text{run}} .
Substitute the values of the rise and run. m = \dispalystyle\frac{-2}{3}
Simplify. m = – \dispalystyle\frac{2}{3}
Solution: The slope of the line is – \dispalystyle\frac{2}{3}.
So y decreases by 2 units as x increases by 3 units.

How do we find the slope of horizontal and vertical lines? To find the slope of the horizontal line, y = 4, we could graph the line, find two points on it, and count the rise and the run. Let’s see what happens when we do this, as shown in the graph below.The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 6. The y-axis runs from negative 1 to 8. The line goes through the points (0, 4) and (3, 4). What is the rise? The rise is 0. What is the run? The run is 3. What is the slope? m equals rise divided by run. m equals 0 divided by 3. m equals 0. The slope of the horizontal line y equals 4 is 0.What is the rise? The rise is 0.

What is the run? The run is 3.

What is the slope? \displaystyle m = \frac{\text{rise}}{\text{run}} = \frac{0}{3} , m = 0

The slope of the horizontal line y = 4 is 0.

Let’s also consider a vertical line, the line x = 3, as shown in the graph.The figure then shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 3 to 3. The line goes through the points (3, 0) and (3, 2). What is the rise? The rise is 2. What is the run? The run is 0. What is the slope? m equals rise divided by run. m equals 2 divided by 0.What is the rise? The rise is 2.

What is the run? The run is 0.

What is the slope? \displaystyle m = \frac{\text{rise}}{\text{run}} = \frac{2}{0},

The slope is undefined since division by zero is undefined. So we say that the slope of the vertical line x = 3 is undefined.

All horizontal lines have slope 0. When the y-coordinates are the same, the rise is 0.

The slope of any vertical line is undefined. When the x-coordinates of a line are all the same, the run is 0.

Slope of a Horizontal and Vertical Line

The slope of a horizontal line, y = b, is 0.

The slope of a vertical line, x = a, is undefined.

Try it!

Find the slope of each line:  a. x = 8   b. y = −5.


Solution (click to reveal)

a. x = 8 This is a vertical line. Its slope is undefined.

b. y = −5 This is a horizontal line. It has slope 0.

Quick Guide to the Slopes of Lines

\Huge\boldsymbol{\underset{positive}{\nearrow}\qquad\underset{negative}{\searrow}\qquad\underset{zero}{\longleftrightarrow}\qquad\underset{positive}{\updownarrow}}

Sometimes we’ll need to find the slope of a line between two points when we don’t have a graph to count out the rise and the run. We could plot the points on grid paper, then count out the rise and the run, but as we’ll see, there is a way to find the slope without graphing. Before we get to it, we need to introduce some algebraic notation.

We will use (x1, y1) to identify the first point and (x2, y2) to identify the second point.

Let’s see how the rise and run relate to the coordinates of the two points by taking another look at the slope of the line between the points (2, 3) and (7, 6), as shown in this graph.The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 1 to 7. The y-axis runs from negative 1 to 7. The line goes through the points (2, 3) and (7, 6). A right triangle is drawn by connecting the three points (2, 3), (2, 6), and (7, 6). The point (2, 3) is labeled (x 1, y 1). The point (7, 6) is labeled (x 2, y 2). The vertical side of the triangle has labels y 2 minus y 1, 6 minus 3, and 3. The horizontal side of the triangle has labels x 2 minus x 1, 7 minus 2, and 5.

Steps Algebraic
Since we have two points, we will use subscript notation. \begin{pmatrix} x_1 & y_1 \\ 2, & 3 \end{pmatrix}\begin{pmatrix} x_2 & y_2 \\ 7, & 6 \end{pmatrix}

 

On the graph, we counted the rise of 3 and the run of 5

Notice that the rise of 3 can be found by subtracting the y-coordinates, 6 and 3, and the run of 5 can be found by subtracting the x-coordinates 7 and 2.

m = \displaystyle\frac{\text{rise}}{\text{run}}; so m = \displaystyle\frac{3}{5}
We rewrite the rise and run by putting in the coordinates. m = \displaystyle\frac{6 - 3}{7 - 2}
But 6 is y2, the y-coordinate of the second point and 3 is y1, the y-coordinate of the first point. So we can rewrite the slope using subscript notation. m = \displaystyle\frac{y_2 - y_1}{7 - 2}
Also 7 is the x-coordinate of the second point and 2 is the x-coordinate of the first point. So again we rewrite the slope using subscript notation. m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}
Slope of a line between two points (Summary)
The Slope of a Line, m, represents the vertical change in y over the horizontal change in x. Given two points, (x1,y1) and (x2,y2), the following formula determines the slope of a line containing these points:
m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}

Slope also indicates the direction in which a line slants as well as its steepness. Slope is sometimes described as rise over run.

Try it!

Use the slope formula to find the slope of the line through the points (−2, −3) and (−7, 4).


Solution (click to reveal)
Steps Algebraic
We’ll call (−2, −3) point #1 and (−7, 4) point #2. \begin{pmatrix} x_1 & y_1 \\ -2, & -3 \end{pmatrix}\begin{pmatrix} x_2 & y_2 \\ -7, & 4 \end{pmatrix}
Use the slope formula. m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}
Substitute the values.
y of the second point minus y of the first point, x
of the second point minus x of the first point
m = \displaystyle\frac{4 - (-3)}{-7 - (-2)}
Simplify. m = \displaystyle\frac{7}{-5}
Solution m = – \displaystyle\frac{7}{5}

Let’s verify this slope on the graph shown.

The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 8 to 2. The y-axis runs from negative 6 to 6. The line goes through the points (negative 7, 4) and (negative 2, negative 3). A right triangle is drawn by connecting the three points (negative 7, 4), (negative 7, negative 3), and (negative 2, negative 3). The vertical side of the triangle is labeled “rise”. The horizontal side of the triangle is labeled “run”.

     \begin{align*} \displaystyle m &= \frac{\text{rise}}{\text{run}} \\ m &= \frac{7}{-5} \\ m &= - \frac{7}{5} \end{align*}

Try it! – Finding the Slope of a Line Given Two Points

Find the slope of a line that passes through the points (2, −1) and (−5, 3).


Solution (click to reveal)

We substitute the y-values and the x-values into the formula.

    \begin{align*} \displaystyle m &= \frac{3 - (-1)}{-5 - 2} \\ &= \frac{4}{-7} \\ &= -\frac{4}{7} \end{align*}

The slope is \displaystyle -\frac{4}{7}

 

Analysis

It does not matter which point is called (x1, y1) or (x2, y2). As long as we are consistent with the order of the y terms and the order of the x terms in the numerator and denominator, the calculation will yield the same result.

Slope and Equations

Now that we’ve defined slope, and looked at the Standard form of a line (Ax + By = C), there are two other forms of a linear equation in addition to the Standard form:

Point Slope Form Slope Intercept Form
y − y1 = m(x − x1) y = mx + b
where m = slope, (x1, y1) is a point on the line. where m = slope and b = y-intercept.

What if all you are given is 2 points of a line? We know from the previous section that you could use them to determine slope, but this process will also allow us to find out what the linear equation would look like.

Suppose we have a line that has slope m and that contains some specific point (x1, y1) and some other point, which we will just call (x, y). We can write the slope of this line and then change it to a different form.

Steps Algebraic
Formula m = \displaystyle\frac{y - y_1}{x - x_1}
Multiply both sides of the equation by x − x1. m(x – x1) = \displaystyle (\frac{y - y_1}{x - x_1})(x - x_1)
Simplify. m(x – x1) = y – y1
Rewrite the equation with the y terms on the left. y – y1 = m(x – x1)

How to Solve for the Equation of a Line with Point-slope Formula

  1. Find the slope using the given points. m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}
  2. Choose one point.
  3. Substitute the values into the point-slope form: y − y1 = m (x − x1)
  4. Write the equation in slope-intercept form.

Once we have the slope, we can use it and one of the given points to find the equation using the point-slope formula. The following example gives two points, so you need to solve for slope first and then use one of the points.

Try it!

Find the equation of the line passing through the points (3, 4) and (0, −3). Write the final equation in slope-intercept form.


Solution (click to reveal)

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

    \begin{align*} \displaystyle m &= \frac{-3 - 4}{0 - 3} \\ &= \frac{-7}{-3} \\ &= \frac{7}{3} \end{align*}

Next, we use the point-slope formula with the slope of \displaystyle\frac{7}{3}, and either point. Let’s pick the point (3, 4) for (x1, y1).

\displaystyle y - 4 = \frac{7}{3}(x-3)
Distribute the \displaystyle \frac{7}{3}

    \begin{align*} \displaystyle y - 4 &= \frac{7}{3}x - 7 \\ y &= \frac{7}{3}x - 3 \end{align*}

The equation is written as y = \displaystyle\frac{7}{3}x – 3. (this is known as Slope-intercept form).

Analysis

To prove that either point can be used, let us use the second point (0,−3) and see if we get the same equation.

    \begin{align*} \displaystyle y - (-3) &= \frac{7}{3}(x - 0) \\ y + 3 &= \frac{7}{3}x \\ y &= \frac{7}{3}x - 3 \end{align*}

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

 Find an equation of a line that contains the points (−3, 5) and (−3, 4). Write the equation in slope-intercept form.


Solution (click to reveal)

Again, the first step will be to find the slope.

Question Algebraic
Formula m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}
Multiply both sides of the equation by x − x1. m = \displaystyle\frac{4 - 5}{-3 - (-3)}
Simplify. m = \displaystyle\frac{-1}{0}
Rewrite the equation with the y terms on the left. The Slope is undefined.

This tells us it is a vertical line. Both of our points have an x-coordinate of −3. So our equation of the line is x = −3. Since there is no y, we cannot write it in slope-intercept form.

You may want to sketch a graph using the two given points. Does your graph agree with our conclusion that this is a vertical line?

Try it! – How to Find the Equation of a Line Given Two Points

Find an equation of a line that contains the points (−3,−1) and (2,−2) Write the equation in slope-intercept form.


Solution (click to reveal)
Steps Algebraic
Find the slope using the given points, (-3, -1) and (2, -2).

     \begin{align*} m &= \frac{y_2 - y_1}{x_2 - x_1} \\ m &= \frac{-2 - (-1)}{2 - (-3)} \\ m &= \frac{-1}{5} \\ \textcolor{mypurple1}{m} &\textcolor{mypurple1}{= -\frac{1}{5}} \end{align*}

Choose either one point.  \begin{pmatrix} \textcolor{myred1}{x_1} & \textcolor{myred1}{y_1} \\ \textcolor{myred1}{2,} & \textcolor{myred1}{-2} \end{pmatrix}
Substitute the values into the point-slope form, y – y1 = m(x – x1).

     \begin{align*} y - \textcolor{myred1}{y_1} &= \textcolor{mypurple1}{m}(x - \textcolor{myred1}{x_1}) \\ y - \textcolor{myred1}{(-2)} &= -\textcolor{mypurple1}{\frac{1}{5}}(x - \textcolor{myred1}{2}) \\ y + 2 &= -\frac{1}{5}x + \frac{2}{5} \end{align*}

Write the equation in slope-intercept form. \displaystyle y = -\frac{1}{5}x - \frac{8}{5}

 

In the examples above you will note the form of the equation we get after using point-slope form is: y = mx + b. where m = slope and b = y-intercept. Practice identifying them below.

Try it! – Identifying the Slope and y-intercept of a Line Given an Equation

Identify the slope and y-intercept, given the equation y = –\displaystyle\frac{3}{4}x – 4


Solution (click to reveal)

As the line is in y = mx + b form, the given line has a slope of m = –\displaystyle\frac{3}{4}. The y-intercept is b = −4.

Analysis:

The y-intercept is the point at which the line crosses the y-axis. On the y-axis, x = 0. We can always identify the y-intercept when the line is in slope-intercept form, as it will always equal b. Or, just substitute x=0 and solve for y.

We can easily determine the slope and intercept of a line if the equation is written in slope-intercept form, y = mx+b. Now we will do the reverse—we will start with the slope and y-intercept and use them to find the equation of the line.

How To: Find the equation given a slope and a point
  1. Identify the slope.
  2. Identify the point.
  3. Substitute the values into the point-slope form, y − y1 = m(x − x1).
  4. Write the equation in slope-intercept form.

Try it! – Finding the Equation of a Line Given the Slope and One Point

Write the equation of the line with slope m = −3 and passing through the point (4, 8). Then solve the equation for y.


Solution (click to reveal)

Using the point-slope formula, substitute −3 for m and the point (4, 8) for (x1, y1).

    \begin{align*} \displaystyle y - y_1 &= m(x - x_1) \\ y - 8 &= -3(x - 4) \\ y - 8 &= -3x + 12 \\ y &= -3x + 20 \end{align*}

Analysis

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

 Find the equation of a line with slope m = –\displaystyle\frac{2}{5}x and containing the point (10, −5).


Solution (click to reveal)

y = –\displaystyle\frac{2}{5}x – 1

 

 Find the equation of the line shown in the graph.

This figure has a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 3, negative 6), (0, negative 4), (3, negative 2), and (6, 0).


Solution (click to reveal)

We need to find the slope and y-intercept of the line from the graph so we can substitute the needed values into the slope-intercept form, y = mx + b

To find the slope, we choose two points on the graph.

The y-intercept is (0, −4) and the graph passes through (3, −2).

Steps Algebraic
Slope formula
 \displaystyle m = \frac{\text{rise}}{\text{run}}
Find the slope, by counting the rise and run.
 \displaystyle m = \textcolor{myred1}{\frac{2}{3}}
Find the y-intercept.
 \displaystyle \text{y-intercept} (0, \textcolor{mypurple1}{-4})
Substitute the values into y = mx + b
\displaystyle y = \textcolor{myred1}{m}x + \textcolor{mypurple1}{b}
Solution
\displaystyle y = \textcolor{myred1}{\frac{2}{3}}x - \textcolor{mypurple1}{4}

Find an equation of a horizontal line that contains the point (−2, −6).  Write the equation in slope-intercept form.


Solution (click to reveal)

Every horizontal line has slope 0. We can substitute the slope and points into the point-slope form, y − y1 = m(x − x1).

Steps Algebraic
Identify the slope. \displaystyle m = \textcolor{mypurple1}{0}
Identify the point.  \displaystyle \begin{pmatrix} \textcolor{myred1}{x_1} & \textcolor{myred1}{y_1} \\ \textcolor{myred1}{-2,} & \textcolor{myred1}{-6} \end{pmatrix}
Substitute the values into y − y1 = m(x − x1)

     \begin{align*} \displaystyle y - \textcolor{myred1}{y_1} &= \textcolor{mypurple1}{m}(x - \textcolor{myred1}{x_1}) \\ y - \textcolor{myred1}{(-6)} &= \textcolor{mypurple1}{m}(x - \textcolor{myred1}{(-2)}) \end{align*}

Simplify.

     \begin{align*} \displaystyle y + 6 &= 0 \\ y  &= -6 \end{align*}

Write in slope-intercept form. It is in y-form, but could be written y = 0x − 6.

Did we end up with the form of a horizontal line, y = a?

Graphing and Slope

We can also graph a line when we know one point and the slope of the line. We will start by plotting the point and then use the definition of slope to draw the graph of the line.

Try it! – How to graph a Line Given a Point and the Slope

Graph the line passing through the point (1, −1) whose slope is m = \displaystyle\frac{3}{4}.


Solution (click to reveal)
Steps Algebraic
Plot the given point (1, -1). Step 1 is to plot the given point. Plot (1, negative 1). The figure then shows the graph of a point on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The point (1, negative 1) is plotted and labeled with its coordinates.
Use the slope formula \displaystyle m = \frac{\text{rise}}{\text{run}} to identify the rise and the run.

     \begin{align*} \displaystyle m &= \frac{3}{4} \\ \frac{rise}{run}  &= \frac{3}{4} \\ rise &= 3 \\ run &= 4 \end{align*}

Starting at the given point (1, -1), count out the rise (up 3 units) and run (right 4 units) to mark the second point. Step 3 is to start at the given point and count out the rise and run to mark the second point. Start at (1, negative 1) and count the rise and the run. Up 3 units, right 4 units. The figure then shows the graph of three points connected by two straight line segments on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The points (1, negative 1), (1, 2), and (5, 2) are plotted. A vertical line segment connects (1, negative 1) to (1, 2) and is labeled 3. A horizontal line segment connects (1, 2) to (5, 2) and is labeled 4.
Connect the two points with a line. Step 4 is to connect the points with a line. Connect the two points with a line. . The figure then shows the graph of a straight line, three points, and two line segments on the x y-coordinate plane. The x-axis runs from negative 2 to 6. The y-axis runs from negative 2 to 4. The points (1, negative 1), (1, 2), and (5, 2) are plotted. A vertical line segment connects (1, negative 1) to (1, 2). A horizontal line segment connects (1, 2) to (5, 2) and is labeled 4. A straight line is drawn through the points (1, negative 1) and (5, 2) with arrows on both ends.

You can check your work by finding a third point. Since the slope is m = \displaystyle\frac{3}{4} it can also be written as m = \displaystyle\frac{-3}{-4} (negative divided by negative is positive!). Go back to (1, −1) and count out the rise, −3, and the run, −4.

Graph the line passing through the point (2, −2) with the slope m = \displaystyle\frac{4}{3}


Solution (click to reveal)

This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 12 to 12. The y-axis runs from negative 12 to 12. The line goes through the points (2, negative 2) and (5, 2).

Graph the line passing through the point (−2, 3) with the slope m = \displaystyle\frac{1}{4}


Solution (click to reveal)

This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 12 to 12. The y-axis runs from negative 12 to 12. The line goes through the points (negative 2, 3) and (2, 4).

Graph a line given a point and the slope.
  1. Plot the given point.
  2. Use the slope formula m = \displaystyle\frac{\text{rise}}{\text{run}} to identify the rise and the run.
  3. Starting at the given point, count out the rise and run to mark the second point.
  4. Connect the points with a line.

Graphing with Slope and Intercept

We have graphed linear equations by plotting points, using intercepts, recognizing horizontal and vertical lines, and using one point and the slope of the line. Once we see how an equation in slope–intercept form and its graph are related, we’ll have one more method we can use to graph lines.

Let’s look at the graph of the equation y = \displaystyle\frac{1}{2}x + 3 and find its slope and y-intercept.

The figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 10 to 10. The y-axis runs from negative 10 to 10. The line goes through the points (0, 3), (2, 4), and (4, 5). A right triangle is drawn by connecting the three points (2, 4), (2, 5), and (4, 5). The vertical side of the triangle is labeled “Rise equals 1”. The horizontal side of the triangle is labeled “Run equals 2”. The line is labeled y equals 1 divided by 2 x plus 3.

The red lines in the graph show us the rise is 1 and the run is 2. Substituting into the slope formula:

m = \displaystyle\frac{\text{rise}}{\text{run}} OR m = \displaystyle\frac{1}{2}

The y-intercept is (0, 3).

Look at the equation of this line.

\displaystyle y = \textcolor{myred1}{\frac{1}{2}}x + \textcolor{mypurple1}{3}

 Look at the slope and y-intercept.

slope \displaystyle m = \textcolor{myred1}{\frac{1}{2}} and y-intercept \dispalystyle (0, \textcolor{mypurple1}{3}).

When a linear equation is solved for y, the coefficient of the x term is the slope and the constant term is the y-coordinate of the y-intercept. We say that the equation y = \displaystyle\frac{1}{2}x + 3 is in slope–intercept form. Sometimes the slope–intercept form is called the “y-form.”

\displaystyle m = \textcolor{myred1}{\frac{1}{2}}; y-intercept \dispalystyle (0, \textcolor{mypurple1}{3})

\displaystyle y = \textcolor{myred1}{\frac{1}{2}}x + \textcolor{mypurple1}{3}

\displaystyle y = \textcolor{myred1}{m}x + \textcolor{mypurple1}{b}

Slope-Intercept Form of an Equation of a Line
The slope–intercept form of an equation of a line with slope m and y-intercept, (0, b) is y = mx + b.

Let’s practice finding the values of the slope and y-intercept from the equation of a line.

Try It!

Identify the slope and y-intercept of the line from the equation:

a.  y = −\displaystyle\frac{4}{7}x − 2  b.  x + 3y = 9


Solution A (click to reveal)

a. We compare our equation to the slope–intercept form of the equation.

Steps Algebraic
Write the slope–intercept form of the equation of the line. \displaystyle y = \textcolor{myred1}{m}x + \textcolor{mypurple1}{b}
Write the equation of the line. \displaystyle y = -\textcolor{myred1}{\frac{4}{7}}x  \textcolor{mypurple1}{-2}
Identify the slope. \displaystyle y = -\textcolor{myred1}{\frac{4}{7}}
Identify the y-intercept. \dispalystyle \text{y-intercept is } (0, \textcolor{mypurple1}{3})

 

Solution B (click to reveal)

b. When an equation of a line is not given in slope–intercept form, our first step will be to solve the equation for y.

Steps Algebraic
Solve for y.   \displaystyle x + 3y = 9
Subtract x from each side. \displaystyle 3y = -x + 9
Divide both sides by 3. \displaystyle \frac{3y}{3} = \frac{-x + 9}{3}
Simplify. \displaystyle -\frac{1}{3}x + 3
Write the slope–intercept form of the equation of the line. \displaystyle y = \textcolor{myred1}{m}x + \textcolor{mypurple1}{b}
Write the equation of the line. \displaystyle y = \textcolor{myred1}{-\frac{1}{3}}x + \textcolor{mypurple1}{3}
Identify the slope. \displaystyle m = \textcolor{myred1}{-\frac{1}{3}}
Identify the y-intercept. \dispalystyle \text{y-intercept is } (0, \textcolor{mypurple1}{3})

Identify the slope and y-intercept from the equation of the line.

a. y = −\displaystyle\frac{4}{3}x + 1

b. 3x + 2y = 12


Solution (click to reveal)

a. m =\displaystyle\frac{4}{3}; (0, 1)


b. m = −\displaystyle\frac{3}{2}; (0, 6)

We have graphed a line using the slope and a point. Now that we know how to find the slope and y-intercept of a line from its equation, we can use the y-intercept as the point, and then count out the slope from there.

Graph the line of the equation y = −x + 4 using its slope and y-intercept.


Solution (click to reveal)
Steps Algebraic
Formula y = mx + b
The equation is in slope–intercept form. y = −x + 4
Identify the slope and y-intercept. m = −1

y-intercept is (0, 4)
Plot the y-intercept. See the graph.
Identify the rise over the run. m = \displaystyle\frac{-1}{1}
Count out the rise and run to mark the second point. Draw the line as shown in the graph. rise −1, run 1
Graph showing a line running from quadrant 2 down through 1 on a left to right slant. Points (0,4) (1,3) are marked.

 Graph the line of the equation y = −x − 3 using its slope and y-intercept.


Solution (click to reveal)

 

This figure shows the graph of a straight line on the x y-coordinate plane. The x-axis runs from negative 10 to 10. The y-axis runs from negative 10 to 10. The line goes through the points (0, negative 3) and (1, negative 4).

Now that we have graphed lines by using the slope and y-intercept, let’s summarize all the methods we have used to graph lines.
Point-Plotting Slope-Intercept Intercepts Recognize Vertical and Horizontal Lines
Create a  blank table with two columns and four rows. The first row is labeled “x” and “y”. Find three points. Plot the points, make sure they line up, them draw the line. y = mx + b

Find the slope and y-intercept, Start at the y-intercept, then count the slope to get a second point.

Create a  blank table with two columns and four rows. The first row is labeled “x” and “y”.  Plug a zero in the first row in the x column. In the second row there is a 0 in the y column.

Find the intercepts and a 3rd point. Plot the points, make sure they line up, then draw the line.

 

The equation has only one variable.

x = a vertical.

y = b horizontal.

Vertical and Horizontal Lines[2]

Some linear equations have only one variable. They may have just x and no y, or just y without an x. This changes how we make a table of values to get the points to plot.

Let’s consider the equation x = −3. This equation has only one variable, x. The equation says that x is always equal to −3, so its value does not depend on y. No matter what is the value of y, the value of x is always −3.

So to make a table of values, write −3 in for all the x-values. Then choose any values for y. Since x does not depend on y, you can choose any numbers you like. But to fit the points on our coordinate graph, we’ll use 1, 2, and 3 for the y-coordinates.

x y (x, y)
−3 1 (−3, 1)
−3 2 (−3, 2)
−3 3 (−3, 3)

Plot the points from the table and connect them with a straight line. Notice that we have graphed a vertical line.

The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (negative 3, 1), (negative 3, 2), and (negative 3, 3) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled x plus negative 3.

What if the equation has y but no x? Let’s graph the equation y=4. This time the y-value is a constant, so in this equation, y does not depend on x. Fill in 4 for all the y’s and then choose any values for x. We’ll use 0, 2, and 4 for the x-coordinates.

x y (x, y) 
0 4 (0, 4)
2 4 (2, 4)
4 4 (4, 4)

In this figure, we have graphed a horizontal line passing through the y-axis at 4.

The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (0, 4), (2, 4), and (4, 4) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled y plus 4.

Vertical and Horizontal Lines

A vertical line is the graph of an equation of the form x = a. The line passes through the x-axis at (a, 0).

A horizontal line is the graph of an equation of the form y = b. The line passes through the y-axis at (0, b).

 

Try it!

Graph: a. x = 2 b. y = −1.


Solution (click to reveal)

a. The equation has only one variable, x, and x is always equal to 2. We create a table where x is always 2 and then put in any values for y. The graph is a vertical line passing through the x-axis at 2.

x y (x, y)
2 1 (2, 1)
2 2 (2, 2)
2 3 (2, 3)

 

The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (2, 1), (2, 2), and (2, 3) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled x plus 2.

 

Solution (click to reveal)

b. Similarly, the equation y = −1 has only one variable, y. The value of y is constant. All the ordered pairs in the next table have the same y-coordinate. The graph is a horizontal line passing through the y-axis at −1.

x y (x, y)
0 −1 (0, −1)
3 −1 (3, −1)
−3 −1 (−3, −1)

The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (negative 3, negative 1), (0, negative 1), and (3, negative 1) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled y plus negative 1.

 Graph the equations: a. x = −2 b. y = 3.


Solution A (click to reveal)

a.

The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 2, negative 3), (negative 2, negative 2), (negative 2, negative 1), (negative 2, 0), (negative 2, 1), (negative 2, 2), and (negative 2, 3).

 

Solution B (click to reveal)

b.


The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 3, 3), (negative 2, 3), (negative 1, 3), (0, 3), (1, 3), (2, 3), and (3, 3).

What is the difference between the equations y = 4x and y = 4?

The equation y = 4x has both x and y. The value of y depends on the value of x, so the y -coordinate changes according to the value of x. The equation y = 4 has only one variable. The value of y is constant, it does not depend on the value of x, so the y-coordinate is always 4.

y = 4x
x y (x, y)
0 0 (0, 0)
1 4 (1, 4)
2 8 (2, 8)
y = 4
x y (x, y)
0 4 (0, 4)
1 4 (1, 4)
2 4 (2, 4)


The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 7 to 7. The horizontal line goes through the points (0, 4), (1, 4), and (2,4) and is labeled y plus 4. The slanted line goes through the points (0, 0), (1, 4), and (2, 8) and is labeled y plus 4 x.
Notice, in the graph, the equation y = 4x gives a slanted line, while y = 4 gives a horizontal line.

Try it!

Graph y = −3x and y = −3 in the same rectangular coordinate system.


Solution (click to reveal)

We notice that the first equation has the variable x, while the second does not. We make a table of points for each equation and then graph the lines. The two graphs are shown.

y = -3x

x y (x, y)
0 0 (0, 0)
1 -3 (1, -3)
2 -6 (2, -6)

y = -3

x y (x, y)
0 -3 (0, -3)
1 -3 (1, -3)
2 -3 (2, -3)


The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 7 to 7. The horizontal line goes through the points (0, negative 3), (1, negative 3), and (2, negative 3) and is labeled y equals negative 3. The slanted line goes through the points (0, 0), (1, negative 3), and (2, negative 6) and is labeled y equals negative 3 x.

Graph the equations in the same rectangular coordinate system: y = 3 and y = 3x.


Solution (click to reveal)

The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 12 to 12. The horizontal line goes through the points (0, 3), (1, 3), and (2, 3). The slanted line goes through the points (0, 0), (1, 3), and (2, 6).

Key Concepts

  • Slope of a Line
    • The slope of a line is m = \displaystyle\frac{\text{rise}}{\text{run}} .
    • The rise measures the vertical change and the run measures the horizontal change.

  • How to find the slope of a line from its graph using m = \displaystyle\frac{\text{rise}}{\text{run}}.
    1. Locate two points on the line whose coordinates are integers.
    2. Starting with one point, sketch a right triangle, going from the first point to the second point.
    3. Count the rise and the run on the legs of the triangle.
    4. Take the ratio of rise to run to find the slope: m = \displaystyle\frac{\text{rise}}{\text{run}}.
  • Slope of a line between two points.
    • The slope of the line between two points (x1, y1) and (x2, y2) is:

      m = \displaystyle\frac{y_2 - y_1}{x_2 - x_1}
  • How to graph a line given a point and the slope.
    1. Plot the given point.
    2. Use the slope formula m = \displaystyle\frac{\text{rise}}{\text{run}} to identify the rise and the run.
    3. Starting at the given point, count out the rise and run to mark the second point.
    4. Connect the points with a line.
  • Slope Intercept Form of an Equation of a Line
      • The slope–intercept form of an equation of a line with slope m and y-intercept, (0, b) is y = mx + b
    Point-Plotting Slope-Intercept Intercepts Recognize Vertical and Horizontal Lines
    Create a  blank table with two columns and four rows. The first row is labeled “x” and “y”. Find three points. Plot the points, make sure they line up, them draw the line. y = mx + b

    Find the slope and y-intercept, Start at the y-intercept, then count the slope to get a second point.

    Create a  blank table with two columns and four rows. The first row is labeled “x” and “y”.  Plug a zero in the first row in the x column. In the second row there is a 0 in the y column.

    Find the intercepts and a 3rd point. Plot the points, make sure they line up, then draw the line.

     

    The equation has only one variable.

    x = a vertical.

    y = b horizontal.

    We have seen that we can use either the slope-intercept form or the point-slope form to find an equation of a line. Which form we use will depend on the information we are given.

    To Write an Equation of a Line
    If given: Use: Form:
    Slope and y-intercept slope-intercept y = mx + b
    Slope and a point point-slope y − y1 = m(x − x1)
    Two points point-slope y − y1 = m(x − x1)

  1. Derived from Intermediate Algebra, Access for free at https://openstax.org/books/intermediate-algebra-2e/pages/1-introduction
  2. Derived from Intermediate Algebra, graph vertical and horizontal lines
definition

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

NCB 0572 Corequisite Support Copyright © by Elizabeth Pople is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.