topic badge

4.06 Graph lines

Introduction

We have learned how to make tables of values of proportional relationships and functions. We can also write the slope intercept form of the equation of a line. It's now time for us to graph lines using the slope-intercept form of the equation of the line and using tables of values.

Graph from tables and equations

Linear functions have graphs that are straight lines. These functions can also be represented by tables of values or equations.

A table of values can be graphed on the coordinate plane by plotting the ordered pair (x,y) from the table.

A linear equation in slope-intercept form, expressed as y=mx+b can be plotted on the coordinate plane. The slope m and the y-intercept, b can be used to graph any line. When we are given an equation in slope-intercept form, we are given one point (the y-intercept) and the ability to find a second point (using the slope), so we are all set.

  1. Start by plotting the y-intercept from the equation
  2. Identify the rise and run from m in the equation. If the slope is given as an integer, remember that we can write \dfrac{\text{rise}}{\text{run}}=\dfrac{m}{1}.
  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.

x
y

For a slope of 4 move 1 unit across and 4 units up.

x
y

For a slope of -\dfrac{1}{2} move 2 units across and 1 unit down.

Examples

Example 1

Consider the equation y = \dfrac{x}{2} + 5

A table of values is shown below:

x-4-202
y3456
a

Plot the points in the table of values on the coordinate plane.

Worked Solution
Create a strategy

Use the order pair (x,y) from the table of values, and plot on the coordinate plane.

Apply the idea
-6
-4
-2
2
4
6
x
-6
-4
-2
2
4
6
y
b

Is the graph of y = \dfrac{x}{2} + 5 linear?

Worked Solution
Create a strategy

A graph is linear if it forms a straight line on the coordinate plane.

Does it look like the points in the table of values form a straight line?

Apply the idea
-6
-4
-2
2
4
6
x
-6
-4
-2
2
4
6
y

The graph of y = \dfrac{x}{2} + 5 is linear.

Example 2

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

Worked Solution
Create a strategy

Determine the slope, y-intercept, and a starting point using the slope-intercept form of the line.

Apply the idea

The slope is 3, and the y-intercept is 2.

This means that one of the points on y=3x+2 is (0,2). We can plot this point and move across 1 and up 3 to get the next point:

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y

Then we can draw a line through these two points:

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
Idea summary

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

\displaystyle y=mx+b
\bm{m}
is the slope.
\bm{b}
is the y-intercept.

To graph any line we only need two points that are on the line. When we are given an equation in slope-intercept form, we can use the y-intercept as the first point. Using the slope, we can find the second point by counting up and accross the y-intercept.

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.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

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

Shown is the horizontal line y=2.

What happens to the equation y=mx+b if you substitute 0 for m? We get y=b.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

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

Shown is the vertical line x=1.

Examples

Example 3

Plot the line x=-8 on the coordinate plane.

Worked Solution
Create a strategy

We can use the fact that vertical lines have equations of the form x=a.

Apply the idea

This will be a vertical line that crosses the x-axis at 4.

-8
-6
-4
-2
2
4
6
8
x
-4
-2
2
4
y
Idea summary

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

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

Non-linear graphs

Not all relationships between two quantities form a linear graph on the coordinate plane.

The following are examples of non-linear graphs and their corresponding equations.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
y=x^2+1
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
y=2x^3 -1

What can we notice about the equations of non-linear graphs?

Linear functions are functions that appear as straight lines when they are graphed. The equation for a linear function can be represented by y=mx+b. Non-linear functions as the name suggests, is a function whose graph is NOT a straight line. Its graph can be any curve other than a straight line. Non-linear functions are represented by equations that cannot be represented by y=mx+b or y=mx.

Examples

Example 4

Which of the following graphs are non-linear graphs?

A
-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
B
-6
-4
-2
2
4
6
x
-6
-4
-2
2
4
6
y
C
-8
-6
-4
-2
2
4
6
8
x
-8
-6
-4
-2
2
4
6
8
y
D
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

Non-linear graphs are graphs that are curved.

Apply the idea

Non-linear graphs are shown in options B, C, and D.

Example 5

Identify two equations representing non-linear functions.

A
y=4x
B
y=-\dfrac{2x}{3}+4
C
y=2x^2+5
D
y=x^3-6
Worked Solution
Create a strategy

Non-linear functions are represented by equations NOT in the form of y=mx or y=mx+b

Apply the idea

Option A is in the form y=mx.

Option B is in the form y=mx+b.

Option C and D are not in in the form y=mx or y=mx+b.

Options C and D are two equations representing non-linear functions.

Idea summary

Non-linear functions have graphs that are NOT straight lines.

Non-linear functions have equations NOT in the form of y=mx or y=mx+b.

Outcomes

8.F.A.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