topic badge

5.08 Graphing lines

Lesson

Slope and y-intercept

We have already learned about slope and $y$y-intercept.

Exploration

Use the applet below to refresh your memory on slope and $y$y-intercept and try to answer the following questions:

  1. How do the slope and $y$y-intercept impact the graph of a line?
  2. What part of the equation represents the slope? What about he $y$y-intercept?

 

Slope

The applet above highlights that the $m$m value affects the steepness of the line, or the slope.

  • If $m<0$m<0, the slope is negative and the line is decreasing.
  • if $m>0$m>0, the slope is positive and the line is increasing.
  • if $m=0$m=0 the slope is $0$0 and the line is horizontal.
  • Also, the farther the value of $m$m is from $0$0 the steeper the line.

Y-intercept

We also found that the $b$b value affects the $y$y-intercept, or where the line crosses the $y$y-axis.  

  • If $b$b is positive then the line crosses the $y$y-axis above the origin.
  • If $b$b is negative then the line crosses the $y$y-axis below the origin.
  • If $b$b is $0$0, or not in the equation at all, then the line crosses the $y$y-axis at the origin.

 

Did you know?

In the equation $y=mx+b$y=mx+b, the terms $m$m and $b$b are called parameters.  A parameter is a placeholder for a value that indicates certain characteristics of a function, such as its slope or $y$y-intercept. 

 

Graphing from slope-intercept form

 

The Slope-Intercept Form

A linear equation is said to be in slope-intercept form when it is expressed as

y=m*x+b

where $m$m is the slope and $b$b is the $y$y-intercept.

To graph any line you only need two points that are on the line.  When we are given an equation in slope-intercept form, we are given one point (the $y$y-intercept) and the ability to find a second point (using the slope), so we are all set!

  1. Start by plotting the $y$y-intercept from the equation
  2. Identify the rise and run from $m$m in the equation. If the slope is given as an integer, remember that we can write $\frac{\text{rise }}{\text{run }}=\frac{m}{1}$rise run =m1
  3. Put your pencil on the y-intercept and count "rise" squares up or down and then "run" squares to the right. Repeat as needed.
  4. Connect the two or more points to form a line, extending beyond the two points.

Here is a little more detail on step 2.

For a slope of $4$4, move $1$1 unit across and $4$4 units up. For a slope of $-3$3, move $1$1 unit across and $3$3 units down. For a slope of $\frac{1}{2}$12, move $1$1 unit across and $\frac{1}{2}$12 unit up.  

 

Worked example

Question 1

Graph the line with equation $y=-2x+4$y=2x+4.

Think: The slope is $-2$2 and the $y$y-intercept is $4$4. How do we put that information on the graph?

Do: 

  1. Graph the $y$y-intercept of $4$4 by plotting the point $\left(0,4\right)$(0,4)

 

  1. Use the slope to plot a second point.

$\text{slope }$slope  $=$= $\frac{\text{rise }}{\text{run }}$rise run  $=$= $\frac{-2}{1}$21

From the $y$y-intercept, move down 2 units and to the right 1 unit.

  1. Connect the points and extend the line

Our graphs may not always be in this form so we may need to rearrange the equation to isolate the variable $y$y  (that means $y$y is on one side of the equation and everything else is on the other side).

 

Equations of horizontal and vertical lines

Recall that lines can also be either horizontal or vertical.  These types of lines will not look like slope-intercept form.  However, they do follow another type of special pattern.

Horizontal lines are the set of all points with a fixed $y$y value.  They are parallel to the $x$x-axis and have equations of the form $y=a$y=a, where $a$a is a real number.  Recall that horizontal lines have a slope of zero.

The horizontal line $y=2$y=2

Reflect: What happens to the equation $y=mx+b$y=mx+b if you substitute $0$0 for $m$m?  How does this relate to the equation of a horizontal line?

 

Vertical lines are the set of all points with a fixed $x$x value.  They are parallel to the $y$y-axis and have equations of the form $x=a$x=a, where $a$a is a real number.  Recall that vertical lines have a slope that is undefined.  

The vertical line $x=1$x=1

Practice questions

Question 2

State the slope and $y$y-intercept of the equation, $y=8x-1$y=8x1

  1. Slope $\editable{}$
    $y$y - intercept $\editable{}$

Question 3

State the slope and $y$y-intercept of the equation $y=-2x$y=2x

  1. Slope $\editable{}$
    $y$y - intercept $\editable{}$

Question 4

Consider the equation $y=-8-\frac{2x}{3}$y=82x3.

  1. State the slope of the line.

  2. State the value of the $y$y at the $y$y-intercept.

Question 5

Consider the following graph of a line.

Loading Graph...

  1. What is the slope of the line shown in the graph?

  2. What is the $y$y value of the $y$y-intercept of the line shown in the graph?

  3. What is the equation of the line? Write your answer in slope-intercept form.

Question 6

Graph the line $y=3x+2$y=3x+2 using its slope and $y$y-intercept.

  1. Loading Graph...

Question 7

Plot the line $x=4$x=4 on the coordinate plane.

  1. Loading Graph...

Outcomes

8.F.3

Interpret the equation y = mx + b as defining a linear function, whose graph is a straight line; give examples of functions that are not linear.

What is Mathspace

About Mathspace