topic badge
AustraliaNSW
Stage 5.1-3

3.04 Graphs of straight lines

Lesson

Sketch a graph using a table of values

A table of values, created using an equation, forms a set of points that can be plotted on a number plane. A line, drawn through the points, becomes the graph of the equation.

We'll begin by creating a table of values for the following equation:

y=3x-5

x1234
y

The first row of the table will contain values for the independent variable (in this case, x). The choice of x-value is often determined by the context, but in many cases they will be given.

To find the corresponding y-value, we substitute each x-value into the equation y=3x-5.

Substituting x=1:

\begin{aligned} y&=3\times1-5\\ &=3-5\\ &=-2 \end{aligned}

Substituting the remaining values of x, allows us to complete the table:

x1234
y-2147

The x and y value in each column of the table can be grouped together to form the coordinates of a single point, (x,y).

Table of x and y values forming ordered pairs. Ask your teacher for more information.

The x and y value in each column of the table can be grouped together to form the coordinates of a single point, (x,y).

Each point can then be plotted on a xy-plane.

To plot a point, (a, b), on a number plane, we first identify where x=a lies along the x-axis, and where y=b lies along the y-axis.

-2
-1
1
2
3
4
5
6
x
-3
-2
-1
1
2
3
4
5
6
7
8
y

For example, to plot the point (3, 4), we identify x=3 on the x-axis and construct a vertical line through this point. Then we identify y=4 on the y-axis and construct a horizontal line through this point. The point where the two lines meet has the coordinates (3, 4).

-2
-1
1
2
3
4
5
6
x
-3
-2
-1
1
2
3
4
5
6
7
8
y

If we sketch a straight line through the points, we get the graph of y=3x-5.

Notice that when sketching a straight line through a set of points, the line should not start and end at the points, but continue beyond them, across the entire coordinate plane.

To sketch a straight line graph we actually only need to identify two points.

  • When checking if a set of points forms a linear relationship, we can choose any two of the points and draw a straight line through them. If the points form a linear relationship then any two points will result in a straight line passing through all the points.

Examples

Example 1

Consider the equation y=2x-4.

a

Complete the table of values.

x0123
y
Worked Solution
Create a strategy

Substitute each x-value into the given equation.

Apply the idea
\displaystyle y\displaystyle =\displaystyle 2\times0-4Substitute x=0
\displaystyle =\displaystyle -4Evaluate
\displaystyle y\displaystyle =\displaystyle 2\times 1 -4Substitute x=1
\displaystyle =\displaystyle -2Evaluate
\displaystyle y\displaystyle =\displaystyle 2\times 2 -4Substitute x=2
\displaystyle =\displaystyle 0Evaluate
\displaystyle y\displaystyle =\displaystyle 2\times 3 -4Substitute x=3
\displaystyle =\displaystyle 2Evaluate
x0123
y-4-202
b

Using the table of values, plot the points that correspond to when x=0 and y=0:

Worked Solution
Apply the idea
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Reflect and check

Notice that both points lie on the axes.

c

Using the points plotted above, sketch the line that passes through the two points.

Worked Solution
Create a strategy

Connect the plotted points.

Apply the idea
-2
-1
1
2
3
4
5
6
x
-4
-3
-2
-1
1
2
3
4
y
Idea summary

To plot a point, (a, b), on a number plane, we first identify where x=a lies along the x-axis, and where y=b lies along the y-axis.

Sketch a graph using its intercepts

The word intercept in mathematics refers to a point where a line or curve crosses or intersects with the axes.

  • We can have x-intercepts: where the line or curve crosses the x-axis.

  • We can have y-intercepts: where the line or curve crosses the y-axis.

Consider what happens as a point moves up or down along the y-axis. It will eventually reach the origin (0,0) where y=0. Now, if the point moves along the x-axis in either direction, the y-value is still 0.

Similarly, consider what happens as a point moves along the x-axis. It will eventually reach the origin where x=0. Now, if the point moves along the y-axis in either direction, the x-value is still 0.

Exploration

This interactive demonstrates the idea behind the coordinates of x and y-intercepts.

Move the points and notice the coordinates of the points of intercepts.

Loading interactive...

The x-intercept occurs at the point where y=0.

The y-intercept occurs at the point where x=0.

x-intercepts occur when the y-value is 0. So let y=0 and then solve for x to find the x-intercept.

y-intercepts occur when the x-value is 0. So let x=0 and then solve for y to find the y-intercept.

Alternatively we can read the y-intercept value from the equation when it is in the form y=mx+c. The value of c is the value of the y-intercept.

Examples

Example 2

Consider the linear equation y=2x-2.

a

What are the coordinates of the y-intercept?

Worked Solution
Create a strategy

Substitute x=0 into the given equation.

Apply the idea
\displaystyle y\displaystyle =\displaystyle 2\times0-2Substitute x=0
\displaystyle =\displaystyle -2Evaluate

The coordinates are (0,-2).

b

What are the coordinates of the x-intercept?

Worked Solution
Create a strategy

Substitute y=0 into the given equation.

Apply the idea
\displaystyle 0\displaystyle =\displaystyle 2x-2Substitute y=0
\displaystyle 2x-2\displaystyle =\displaystyle 0Swap the sides
\displaystyle 2x-2+2\displaystyle =\displaystyle 0+2Add 2 to both sides
\displaystyle 2x\displaystyle =\displaystyle 2Evaluate
\displaystyle \dfrac{2x}{2}\displaystyle =\displaystyle \dfrac{2}{2}Divide both sides by 2
\displaystyle x\displaystyle =\displaystyle 1Evaluate

The coordinates are (1,0).

c

Now, sketch the line y=2x−2.

Worked Solution
Create a strategy

Plot the points found and draw a line through them.

Apply the idea
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Idea summary

The x-intercept occurs at the point where y=0.

The y-intercept occurs at the point where x=0.

We can use the points of x and y-intercepts to sketch a line.

Sketch a graph using its gradient and one point

We can also graph a line by identifying the gradient and the y-intercept from the equation when it is in the form y=mx+c.

We know that the y-intercept occurs at (0,c), and the gradient is equal to m. Using this information we can plot the point at the y-intercept (or any other point by substituting in a value for x and solving for y) and then move right by 1, and up (or down if m is negative) by m.

As as an example, if we have the equation y=2x+3, then we know the y-intercept is at (0,3) and as the gradient is 2, another point will be at \left(1,\,3+2\right)=\left(1,5\right).

Examples

Example 3

Sketch the line that has a gradient of -3 and an x-intercept of -5.

Worked Solution
Create a strategy

Use the gradient to find another point from the x-intercept.

Apply the idea
-5
-4
-3
-2
-1
1
2
x
-4
-3
-2
-1
1
2
3
4
y

The x-intercept ihas coordinates of (-5,0).

The gradient is -3=\dfrac{-3}{1} so the rise is -3 and the run is 1. We can use this to find another point on the line.

By moving right 1 unit and down 3 units we get to the point (-4,-3).

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

So now we can draw our line through these two points.

Example 4

Sketch the line y=-x-5 using the y-intercept and any other point on the line.

Worked Solution
Create a strategy

Use the gradient to find another point from the y-intercept.

Apply the idea
-4
-3
-2
-1
1
2
3
4
x
-6
-5
-4
-3
-2
-1
1
y

The y-intercept is at (0,-5).

Since m=-1=\dfrac{-1}{1}, we need to move 1 unit right then 1 unit down from the y-intercept leading us to the point (1,-6).

Now we can connect the points to form the line y=-x-5.

Idea summary

To graph a line in the form of y=mx+c:

  1. Plot the point of y-intercept which is (0,c).

  2. From the y-intercept, move 1 unit to the right and move m units up if positive or down if negative to plot another point.

  3. Connect the plotted points.

Outcomes

MA5.1-6NA

determines the midpoint, gradient and length of an interval, and graphs linear relationships

What is Mathspace

About Mathspace