Skip to main content
Mathematics LibreTexts

2.4: Slope of a Line

  • Page ID
    51449
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Learning Objectives

    • Find the Slope from a Graph
      • Identify rise and run from a graph
      • Distinguish between graphs of lines with negative and positive slopes
    • Find the Slope from Two Points
      • Use the formula for slope to define the slope of a line through two points
    • Find the Slope of Horizontal and Vertical Lines
      • Find the slope of the lines \(y=b\)
      • Recognize that horizontal lines have slope = 0
      • Recognize that vertical lines have slopes that are undefined
    • Identify slopes of parallel and perpendicular lines
      • Given a line, identify the slope of another line that is parallel to it
      • Given a line, identify the slope of another line that is perpendicular to it
    • Interpret slope in equations and graphs
      • Verify the slope of a linear equation given a dataset
      • Interpret the slope of a linear equation as it applies to a real situation

    Identify slope from a graph

    The mathematical definition of slope is very similar to our everyday one. In math, slope is used to describe the steepness and direction of lines. By just looking at the graph of a line, you can learn some things about its slope, especially relative to other lines graphed on the same coordinate plane. Consider the graphs of the three lines shown below:

    Three different lines on a graph. Line A is tilted upward. Line B is sharply titled upward. Line C is sharply tilted downward.

    First, let’s look at lines A and B. If you imagined these lines to be hills, you would say that line B is steeper than line A. Line B has a greater slope than line A.

    Next, notice that lines A and B slant up as you move from left to right. We say these two lines have a positive slope. Line C slants down from left to right. Line C has a negative slope. Using two of the points on the line, you can find the slope of the line by finding the rise and the run. The vertical change between two points is called the rise, and the horizontal change is called the run. The slope equals the rise divided by the run: \(\displaystyle \text{Slope }=\frac{\text{rise}}{\text{run}}\).

    A line that crosses the points (2,1) and (6,3). A blue line labeled Rise goes up two units from the point (2,1). A red line labeled Run goes left from the point (6,3) so that it forms a triangle with the main line and the Rise line. A formula says slope equals rise over run.

    You can determine the slope of a line from its graph by looking at the rise and run. One characteristic of a line is that its slope is constant all the way along it. So, you can choose any 2 points along the graph of the line to figure out the slope. Let’s look at an example.

    Example

    Use the graph to find the slope of the line.

    A line that crosses the points (2,1) and (6,3). A blue line labeled Rise goes up two units from the point (2,1). A red line labeled Run goes left from the point (6,3) so that it forms a triangle with the main line and the Rise line. A formula says slope equals rise over run.

    [reveal-answer q=”606472″]Show Solution[/reveal-answer]
    [hidden-answer a=”606472″]Start from a point on the line, such as \((6,3)\). The rise is 2 units. It is positive as you moved up.

    \((2,1)\) and move vertically until in line with another point on the line, such as \(\text{run}=4\) Next, move horizontally to the point \(\displaystyle \text{Slope}=\frac{2}{4}=\frac{1}{2}\) \(\displaystyle \text{Slope }=\frac{\text{rise}}{\text{run}}\)

    Answer

    \(\frac{1}{2}\)[/hidden-answer]

    This line will have a slope of \((0,0)\), to the point \(\text{rise}=3\) and the \(\displaystyle \frac{\text{rise}}{\text{run}}=\frac{3}{6}=\frac{1}{2}\). It is the same!

    Let’s look at another example.

    Example

    Use the graph to find the slope of the two lines.

    A graph showing two lines with their rise and run. The first line is drawn through the points (-2,1) and (-1,5). The rise goes up from the point (-2,1) to join with the run line that goes right to the point (-1,5). The second line is drawn through the points (-1,-2) and (3,-1). The rise goes up from the point (-1,-2) to join with the run to go right to the point (3,-1).

    [reveal-answer q=”860733″]Show Solution[/reveal-answer]
    [hidden-answer a=”860733″]Notice that both of these lines have positive slopes, so you expect your answers to be positive.

    Blue line
    \((-2,1)\) to point \(\text{run}=1\) Run is 1 unit to the right, so it is positive.
    \(\displaystyle \text{Slope }\frac{\text{rise}}{\text{run}}\).
    Red line
    \((-1,-2)\) to point \(\text{run}=4\) The red line has a run of 4 units.
    \(\displaystyle \text{Slope }\frac{\text{rise}}{\text{run}}\).

    Answer

    The slope of the blue line is 4 and the slope of the red line is \(\frac{1}{4}\).[/hidden-answer]

    When you look at the two lines, you can see that the blue line is steeper than the red line. It makes sense the value of the slope of the blue line, 4, is greater than the value of the slope of the red line, \(\displaystyle \frac{1}{4}\). The greater the slope, the steeper the line.

    Finding the Slope of a Line From a Graph

    Thumbnail for the embedded element "Determine the Slope of a Line From a Graph (No Formula)"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    Distinguish between graphs of lines with negative and positive slopes

    Direction is important when it comes to determining slope. It’s important to pay attention to whether you are moving up, down, left, or right; that is, if you are moving in a positive or negative direction. If you go up to get to your second point, the rise is positive. If you go down to get to your second point, the rise is negative. If you go right to get to your second point, the run is positive. If you go left to get to your second point, the run is negative.

    In the following two examples, you will see a slope that is positive and one that is negative.

    Example (Advanced)

    Find the slope of the line graphed below.

    Line drawn through the point (-3,-0.25) and (3,4.25).

    [reveal-answer q=”82644″]Show Solution[/reveal-answer]
    [hidden-answer a=”82644″]

    \((-3,-0.25)\) and rise 4.5. This means moving 4.5 units in a positive direction.
    \((3,4.25)\).
    \(\displaystyle \text{Slope}=\frac{\text{rise}}{\text{run}}\)

    Answer

    The slope of the line is 0.75.[/hidden-answer]

    The next example shows a line with a negative slope.

    Example

    Find the slope of the line graphed below.

    A downward-sloping line that goes through points A and B. Point A is (0,4) and point B is (2,1). The rise goes down three units, and the run goes right 2 units.

    [reveal-answer q=”924393″]Show Solution[/reveal-answer]
    [hidden-answer a=”924393″]

    \((0,4)\) and rise \(\text{run}=2\) From there, run 2 units in a positive direction to Point B \(\displaystyle \text{Slope}=\frac{\text{rise}}{\text{run}}\) \(\displaystyle \text{Slope}=\frac{\text{rise}}{\text{run}}\)

    Answer

    The slope of the line is \(-\frac{3}{2}\).[/hidden-answer]

    In the example above, you could have found the slope by starting at point B, running \(+3\) to arrive at point A. The result is still a slope of \(\displaystyle\frac{\text{rise}}{\text{run}}=\frac{+3}{-2}=-\frac{3}{2}\).

    Finding the Slope from Two Points on the Line

    You’ve seen that you can find the slope of a line on a graph by measuring the rise and the run. You can also find the slope of a straight line without its graph if you know the coordinates of any two points on that line. Every point has a set of coordinates: an x-value and a y-value, written as an ordered pair (x, y). The x value tells you where a point is horizontally. The y value tells you where the point is vertically.

    Consider two points on a line—Point 1 and Point 2. Point 1 has coordinates \(\left(x_{2},y_{2}\right)\).

    A line with its rise and run. The first point on the line is labeled Point 1, or (x1, y1). The second point on the line is labeled Point 2, or (x2,y2). The rise is (y2 minus y1). The run is (x2 minus X1).

    The rise is the vertical distance between the two points, which is the difference between their y-coordinates. That makes the rise \(\left(x_{2}-x_{1}\right)\).

    So, \(\displaystyle m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/p[4]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/p[4]/span[2], line 1, column 3
    
    \)

    In the example below, you’ll see that the line has two points each indicated as an ordered pair. The point \((−2,6)\) as Point 2. So you are going to move from Point 1 to Point 2. A triangle is drawn in above the line to help illustrate the rise and run.

    A line going through Point 1, or (0,2), and Point 2, or (-2,6). The rise is 4 and the run is -2.

    You can see from the graph that the rise going from Point 1 to Point 2 is 4, because you are moving 4 units in a positive direction (up). The run is \(−2\), because you are then moving in a negative direction (left) 2 units. Using the slope formula,

    \(\displaystyle \text{Slope}=\frac{\text{rise}}{\text{run}}=\frac{4}{-2}=-2\).

    You do not need the graph to find the slope. You can just use the coordinates, keeping careful track of which is Point 1 and which is Point 2. Let’s organize the information about the two points:

    Name Ordered Pair Coordinates
    Point 1 \(\begin{array}{l}x_{1}=0\\y_{1}=2\end{array}\)
    Point 2 \(\begin{array}{l}x_{2}=-2\\y_{2}=6\end{array}\)

    The slope, \(−2\).

    It doesn’t matter which point is designated as Point 1 and which is Point 2. You could have called \((0,2)\) Point 2. In that case, putting the coordinates into the slope formula produces the equation \(m=-2\). That’s the same slope as before. The important thing is to be consistent when you subtract: you must always subtract in the same order \(\left(x_{2},x_{1}\right)\).

    Example

    What is the slope of the line that contains the points \((4,2)\)?

    [reveal-answer q=”666697″]Show Solution[/reveal-answer]
    [hidden-answer a=”666697″]

    \(\left(4,2\right)=\text{Point }1,\left(x_{1},y_{1}\right)\)
    \(\left(5,5\right)=\text{Point }2,\left(x_{2},y_{2}\right)\)
    \(\begin{array}{l}m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{5-2}{5-4}=\frac{3}{1}\\\\m=3\end{array}\) Substitute the values into the slope formula and simplify.

    Answer

    The slope is 3.[/hidden-answer]

    The example below shows the solution when you reverse the order of the points, calling \((4,2)\) Point 2.

    Example

    What is the slope of the line that contains the points \((4,2)\)?

    [reveal-answer q=”76013″]Show Solution[/reveal-answer]
    [hidden-answer a=”76013″]

    \((5,5)=\text{Point }1\), \(\begin{array}{l}x_{2}=4\\y_{2}=2\end{array}\) \(\left(x_{2},y_{2}\right)\)
    \(\begin{array}{l}m=\frac{y_{2}-y_{1}}
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[4]/table/tbody/tr[2]/td[1]/span, line 1, column 4
    
    \\\\m=\frac{2-5}{4-5}=\frac{-3}{-1}=3\\\\m=3\end{array}\)
    Substitute the values into the slope formula and simplify.

    Answer

    The slope is 3.[/hidden-answer]

    Notice that regardless of which ordered pair is named Point 1 and which is named Point 2, the slope is still 3.

    Example (Advanced)

    What is the slope of the line that contains the points \((-1,8.5)\)?

    [reveal-answer q=”291649″]Show Solution[/reveal-answer]
    [hidden-answer a=”291649″]

    \((3,-6.25)=\text{Point }1\), \(\displaystyle \begin{array}{l}
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[1]/td[1]/span[1], line 1, column 2
    
    =-1\\
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[1]/td[1]/span[2], line 1, column 2
    
    =8.5\end{array}\)
    \(\displaystyle (
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[1]/td[2]/span[1], line 1, column 2
    
    ,
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[1]/td[2]/span[2], line 1, column 2
    
    )\)
    \(\displaystyle \begin{array}{l}m=\frac
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[2]/td[1]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[5]/div[5]/table/tbody/tr[2]/td[1]/span[2], line 1, column 3
    
    \\\\m=\frac{8.5-(-6.25)}{-1-3}\\\\m=\frac{14.75}{-4}\\\\m=-3.6875\end{array}\)
    Substitute the values into the slope formula and simplify.

    Answer

    The slope is \(-3.6875\).[/hidden-answer]

    Let’s consider a horizontal line on a graph. No matter which two points you choose on the line, they will always have the same y-coordinate. The equation for this line is \(y=\left(0\right)x+3\).

    Video: Finding the Slope of a Line Given Two Points on the Line

    Thumbnail for the embedded element "Ex 1: Determine the Slope a Line Given Two Points on a Line"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    Finding the Slopes of Horizontal and Vertical Lines

    So far you’ve considered lines that run “uphill” or “downhill.” Their slopes may be steep or gradual, but they are always positive or negative numbers. But there are two other kinds of lines, horizontal and vertical. What is the slope of a flat line or level ground? Of a wall or a vertical line?

    The line y=3 crosses through the point (-3,3); the point (0,3); the point (2,3); and the point (5,3).

    Using the form \((−3,3)\) as Point 1 and (2, 3) as Point 2, you get:

    \(\displaystyle \begin{array}{l}m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/p[3]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/p[3]/span[2], line 1, column 3
    
    \\\\m=\frac{3-3}{2-\left(-3\right)}=\frac{0}{5}=0\end{array}\)

    The slope of this horizontal line is 0.

    Let’s consider any horizontal line. No matter which two points you choose on the line, they will always have the same y-coordinate. So, when you apply the slope formula, the numerator will always be 0. Zero divided by any non-zero number is 0, so the slope of any horizontal line is always 0.

    The equation for the horizontal line \(y=3\) is telling you that no matter which two points you choose on this line, the y-coordinate will always be 3.

    How about vertical lines? In their case, no matter which two points you choose, they will always have the same x-coordinate. The equation for this line is \(x=2\).

    The line x=2 runs through the point (2,-2), the point (2,1), the point (2,3), and the point (2,4).

    There is no way that this equation can be put in the slope-point form, as the coefficient of y is \(0\left(x=0y+2\right)\).

    So, what happens when you use the slope formula with two points on this vertical line to calculate the slope? Using \((2,3)\) as Point 2, you get:

    \(\displaystyle \begin{array}{l}m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/p[10]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/p[10]/span[2], line 1, column 3
    
    \\\\m=\frac{3-1}{2-2}=\frac{2}{0}\end{array}\)

    But division by zero has no meaning for the set of real numbers. Because of this fact, it is said that the slope of this vertical line is undefined. This is true for all vertical lines—they all have a slope that is undefined.

    Example

    What is the slope of the line that contains the points \((−8,2)\)?

    [reveal-answer q=”111566″]Show Solution[/reveal-answer]
    [hidden-answer a=”111566″]

    \((3,2)=\text{Point }1\), \(\displaystyle \begin{array}{l}
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[1]/td[1]/span[1], line 1, column 2
    
    =-8\\\\
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[1]/td[1]/span[2], line 1, column 2
    
    =2\end{array}\)
    \(\displaystyle (
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[1]/td[2]/span[1], line 1, column 2
    
    ,
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[1]/td[2]/span[2], line 1, column 2
    
    )\)
    \(\displaystyle \begin{array}{l}\frac
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[2]/td[1]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[7]/div[3]/table/tbody/tr[2]/td[1]/span[2], line 1, column 3
    
    \\\\\frac{(2)-(2)}{(-8)-(3)}=\frac{0}{-11}=0\\\\m=0\end{array}\)
    Substitute the values into the slope formula and simplify.

    Answer

    The slope is 0, so the line is horizontal.[/hidden-answer]

    Finding Slopes of Horizontal and Vertical Lines

    Thumbnail for the embedded element "Ex: Determine the Slope a Line Given Two Points on a Horizontal and Vertical Line"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    Characterize the slopes of parallel and perpendicular lines

    When you graph two or more linear equations in a coordinate plane, they generally cross at a point. However, when two lines in a coordinate plane never cross, they are called parallel lines. You will also look at the case where two lines in a coordinate plane cross at a right angle. These are called perpendicular lines. The slopes of the graphs in each of these cases have a special relationship to each other.

    Parallel lines are two or more lines in a plane that never intersect. Examples of parallel lines are all around us, such as the opposite sides of a rectangular picture frame and the shelves of a bookcase.

    Line y=2x+3 and line y=2x-3. Caption says Equations of parallel lines will have the same slopes and different intercepts.

    Perpendicular lines are two or more lines that intersect at a 90-degree angle, like the two lines drawn on this graph. These 90-degree angles are also known as right angles.

    Two lines that cross to form a 90 degree angle.

    Perpendicular lines are also everywhere, not just on graph paper but also in the world around us, from the crossing pattern of roads at an intersection to the colored lines of a plaid shirt.

    Parallel Lines

    Two non-vertical lines in a plane are parallel if they have both:

    • the same slope
    • different y-intercepts

    Any two vertical lines in a plane are parallel.

    Example

    Find the slope of a line parallel to the line \(y=−3x+4\).

    [reveal-answer q=”350329″]Show Solution[/reveal-answer]
    [hidden-answer a=”350329″]

    Identify the slope of the given line.

    The given line is written in \(m=−3\) and \(−3\).

    A line parallel to the given line has the same slope.

    Answer

    The slope of the parallel line is \(−3\).[/hidden-answer]

    Example

    Determine whether the lines \(y=6x–1\) are parallel.

    [reveal-answer q=”619259″]Show Solution[/reveal-answer]
    [hidden-answer a=”619259″]

    Identify the slopes of the given lines.

    The given lines are written in \(m=6\) for the first line and \(m=6\) for the second line. The slope of both lines is 6.

    Look at b, the y-value of the y-intercept, to see if the lines are perhaps exactly the same line, in which case we don’t say they are parallel.

    The first line has a y-intercept at \((0,−1)\). They are not the same line.

    The slopes of the lines are the same and they have different y-intercepts, so they are not the same line and they are parallel.

    Answer

    The lines are parallel.[/hidden-answer]

    Perpendicular Lines

    Two non-vertical lines are perpendicular if the slope of one is the negative reciprocal of the slope of the other. If the slope of the first equation is 4, then the slope of the second equation will need to be \(-\frac{1}{4}\) for the lines to be perpendicular.

    You can also check the two slopes to see if the lines are perpendicular by multiplying the two slopes together. If they are perpendicular, the product of the slopes will be \(4\cdot-\frac{1}{4}=\frac{4}{1}\cdot-\frac{1}{4}=-1\).

    Example

    Find the slope of a line perpendicular to the line \(y=2x–6\).

    [reveal-answer q=”331107″]Show Solution[/reveal-answer]
    [hidden-answer a=”331107″]The given line is written in \(m=2\) and \(b=-6\). The slope is 2.

    Identify the slope of the given line.

    Answer

    The slope of the perpendicular line is \(-\tfrac{1}{2}\).[/hidden-answer]

    To find the slope of a perpendicular line, find the reciprocal, \(\displaystyle -\tfrac{1}{2}\).

    Note that the product \(2\left(-\frac{1}{2}\right)=\frac{2}{1}\left(-\frac{1}{2}\right)=-1\), so this means the slopes are perpendicular.

    In the case where one of the lines is vertical, the slope of that line is undefined and it is not possible to calculate the product with an undefined number. When one line is vertical, the line perpendicular to it will be horizontal, having a slope of zero (\(m=0\)).

    Example

    Determine whether the lines \(\displaystyle y\,\text{=}\,\,\frac{1}{8}x-1\) are parallel, perpendicular, or neither.

    [reveal-answer q=”981152″]Show Solution[/reveal-answer]
    [hidden-answer a=”981152″]

    Identify the slopes of the given lines.

    The given lines are written in \(m=−8\) for the first line and \(m=\frac{1}{8}\) for the second line.

    Determine if the slopes are the same or if they are opposite reciprocals.

    \(-8\ne\frac{1}{8}\), so the lines are not parallel.

    The opposite reciprocal of \(\displaystyle \frac{1}{8}\), so the lines are perpendicular.

    The slopes of the lines are opposite reciprocals, so the lines are perpendicular.

    Answer

    The lines are perpendicular.[/hidden-answer]

    The Slope of Parallel and Perpendicular Lines

    Thumbnail for the embedded element "The Slopes of Parallel and Perpendicular Lines"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    Verify Slope From a Dataset

    Massive amounts of data is being collected every day by a wide range of institutions and groups. This data is used for many purposes including business decisions about location and marketing, government decisions about allocation of resources and infrastructure, and personal decisions about where to live or where to buy food.

    In the following example, you will see how a dataset can be used to define the slope of a linear equation.

    Example

    Given the dataset, verify the values of the slopes of each equation.

    Linear equations describing the change in median home values between 1950 and 2000 in Mississippi and Hawaii are as follows:

    Hawaii: \(y=3966x+74,400\)

    Mississippi: \(y=924x+25,200\)

    The equations are based on the following dataset.

    x = the number of years since 1950, and y = the median value of a house in the given state.

    Year (x) Mississippi House Value (y) Hawaii House Value (y)
    0 $25,200 $74,400
    50 $71,400 $272,700

    The slopes of each equation can be calculated with the formula you learned in the section on slope.

    \(\displaystyle m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[9]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[9]/span[2], line 1, column 3
    
    \)

    Mississippi:

    Name Ordered Pair Coordinates
    Point 1 (0, 25,200) \(\begin{array}{l}x_{2}=50\\y_{2}=71,400\end{array}\)

    \(\displaystyle m=\frac

    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[11]/span[1], line 1, column 3
    
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[11]/span[2], line 1, column 3
    
    =\frac
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[11]/span[3], line 1, column 3
    
    50 = 924\)

    We have verified that the slope \(\displaystyle m = 924\) matches the dataset provided.

    Hawaii:

    Name Ordered Pair Coordinates
    Point 1 (0, 74,400) \(\begin{array}{l}x_{2}=2000\\y_{2}=272,700\end{array}\)

    \(\displaystyle m=\frac

    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[14]/span[1], line 1, column 4
    
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[14]/span[2], line 1, column 3
    
    =\frac
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[1]/p[14]/span[3], line 1, column 4
    
    50 = 3966\)

    We have verified that the slope \(\displaystyle m = 3966\) matches the dataset provided.

    Example

    Given the dataset, verify the values of the slopes of the equation.

    A linear equation describing the change in the number of high school students who smoke, in a group of 100, between 2011 and 2015 is given as:

    \(y = -1.75x+16\)

    And is based on the data from this table, provided by the Centers for Disease Control.

    x = the number of years since 2011, and y = the number of high school smokers per 100 students.

    Year Number of High School Students Smoking Cigarettes (per 100)
    0 16
    4 9
    Name Ordered Pair Coordinates
    Point 1 (0, 16) \(\begin{array}{l}x_{2}=4\\y_{2}=9\end{array}\)

    \(\displaystyle m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[2]/p[7]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[13]/div[2]/p[7]/span[2], line 1, column 3
    
    =\frac-74 =\frac-74=-1.75\)

    We have verified that the slope \(\displaystyle{m=-1.75}\) matches the dataset provided.

    Interpret the Slope of Linear Equation

    Okay, now we have verified that data can provide us with the slope of a linear equation. So what? We can use this information to describe how something changes using words.

    First, let’s review the different kinds of slopes possible in a linear equation.

    Uphill line with positive slope has a line that starts at the bottom-left and goes into the top-right of the graph. Downhill line with negative slope starts in the top-left and ends in the bottom-right part of the graph. Horizontal lines have a slope of 0. Vertical lines have an undefined slope.

    We often use specific words to describe the different types of slopes when we are using lines and equations to represent “real” situations. The following table pairs the type of slope with the common language used to describe it both verbally and visually.

    Type of Slope Visual Description Verbal Description
    positive uphill increasing
    negative downhill decreasing
    0 horizontal constant
    undefined vertical N/A

    Example

    Interpret the slope of each equation for house values using words.

    Hawaii: \(y = 3966x+74,400\)

    Mississippi: \(y = 924x+25,200\)

    [reveal-answer q=”871726″]Show Solution[/reveal-answer]
    [hidden-answer a=”871726″]It helps to apply the units to the points that we used to define slope. The x-values represent years, and the y-values represent dollar amounts.

    For Mississippi:

    \(\displaystyle m=\frac

    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[14]/div[2]/p[7]/span[1], line 1, column 3
    
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[14]/div[2]/p[7]/span[2], line 1, column 2
    
    =\frac
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[14]/div[2]/p[7]/span[3], line 1, column 3
    
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[14]/div[2]/p[7]/span[4], line 1, column 3
    
    = 924\frac{\text{dollars}}{\text{year}}\)

    Answer

    The slope for the Mississippi home prices equation is positive, so each year the price of a home in Mississippi increases by 924 dollars.

    We can apply the same thinking for Hawaii home prices. The slope for the Hawaii home prices equation tells us that each year, the price of a home increases by 3966 dollars.

    [/hidden-answer]

    Interpret the Meaning of the Slope Given a Linear Equation—Median Home Values

    Thumbnail for the embedded element "Interpret the Meaning of the Slope Given a Linear Equation - Median Home Values"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    Example

    Interpret the slope of the line describing the change in the number of high school smokers using words.

    Apply units to the formula for slope. The x values represent years, and the y values represent the number of smokers. Remember that this dataset is per 100 high school students.

    \(\displaystyle m=\frac-74 =\frac

    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[15]/div[2]/p[4]/span[3], line 1, column 4
    
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[15]/div[2]/p[4]/span[4], line 1, column 2
    
    =-1.75\frac{\text{ smokers}}{\text{ year}}\)

    The slope of this linear equation is negative, so this tells us that there is a decrease in the number of high school age smokers each year.

    The number of high schoolers that smoke decreases by 1.75 per 100 each year.

    Interpret the Meaning of the Slope of a Linear Equation—Smokers

    Thumbnail for the embedded element "Interpret the Meaning of the Slope of a Linear Equation - Smokers"

    A YouTube element has been excluded from this version of the text. You can view it online here: pb.libretexts.org/ba/?p=66

    On the next page, we will see how to interpret the y-intercept of a linear equation, and make a prediction based on a linear equation.

    Summary

    Slope describes the steepness of a line. The slope of any line remains constant along the line. The slope can also tell you information about the direction of the line on the coordinate plane. Slope can be calculated either by looking at the graph of a line or by using the coordinates of any two points on a line. There are two common formulas for slope: \(\displaystyle m=\frac

    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[1], line 1, column 3
    
    ParseError: colon expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[2], line 1, column 3
    
    \) where \(\displaystyle (
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[3], line 1, column 2
    
    ,
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[4], line 1, column 2
    
    )\) and \(\displaystyle (
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[5], line 1, column 2
    
    ,
    ParseError: EOF expected (click for details)
    Callstack:
        at (Courses/Lumen_Learning/Beginning_Algebra_(Lumen)/02:_Graphing/2.04:_Slope_of_a_Line), /content/body/div[17]/p[1]/span[6], line 1, column 2
    
    )\) are two points on the line.

    The images below summarize the slopes of different types of lines.

    Uphill line with positive slope has a line that starts at the bottom-left and goes into the top-right of the graph. Downhill line with negative slope starts in the top-left and ends in the bottom-right part of the graph. Horizontal lines have a slope of 0. Vertical lines have an undefined slope.
    CC licensed content, Original
    CC licensed content, Shared previously
    Public domain content

    2.4: Slope of a Line is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?