topic badge

2.01 Straight line graphs

Lesson

A linear relationship is any formula or equation whose graph is a straight line. 

For example, the equation $y=3x-5$y=3x5 describes the linear relationship between two variables $x$x and $y$y. We call $y$y the dependent variable, because its value 'depends' on the value of $x$x, which is the independent variable. In the example below, we will see that the graph of $y=3x-5$y=3x5 is a straight line.

Most of the linear relationships we encounter will have two variables. While a linear relationship can have just one variable (i.e. $y=4$y=4), it can never have more than two variables. 

The equation $y=3x-5$y=3x5 is also known as a linear function, where $x$x is the input to the function and $y$y is the output. There is more information about mathematical functions in the information panel below.

Linear relationships and their graphs can be used to describe or model many different real world situations. For example:

  • The cost of filling a car with fuel
  • Converting between currencies
  • Income and expense analysis
  • Distance-time relationships

To graph a linear relationship, we start with a table of values.

 

Creating a table of values

table of values displays a set of numerical values for two variables, often represented by $x$x and $y$y. Each $x$x-value is related in some way to the $y$y-value immediately below it in the table. As an example, a table of values might look like the following:

 

$x$x $3$3 $6$6 $9$9 $12$12
$y$y $10$10 $19$19 $28$28 $37$37

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

Exploration

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

$y=3x-5$y=3x5

The first row of the table will contain values for the independent variable (in this case, $x$x). The choice of $x$x-values is often determined by the context, but in many cases they will be given. To find the corresponding $y$y-value, we substitute each $x$x-value into the equation $y=3x-5$y=3x5.

$x$x $1$1 $2$2 $3$3 $4$4
$y$y        

Substituting $x=1$x=1:

$y$y $=$= $3\left(1\right)-5$3(1)5
  $=$= $3-5$35
  $=$= $-2$2

So $-2$2 is the first entry in the row of $y$y-values, and corresponds with $x=1$x=1.

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

Substituting $x=2$x=2:

$y$y $=$= $3\left(2\right)-5$3(2)5
  $=$= $6-5$65
  $=$= $1$1

So $1$1 is the second entry in the row of $y$y-values, and corresponds with $x=2$x=2.

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

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

$x$x $1$1 $2$2 $3$3 $4$4
$y$y $-2$2 $1$1 $4$4 $7$7

 

Plotting points from a table of values

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

Each point can then be plotted on a coordinate plane.

 

Plotting points on a coordinate plane

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

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

 
 

 

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

Notice that when drawing 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. 

 

What is a function?

In Mathematics, a function describes how each element in one set of values (i.e. a set of $x$x values) relates to one and only one element in another set of values (i.e. a set of $y$y values). There are many different types of function, but a linear function always produces a straight line graph. 

It may be helpful to think of a function as a kind of machine. It takes a set of inputs ($x$x values), processes them, and produces a set of outputs ($y$y values). 

Note that all linear relationships, except for those that produce vertical straight line graphs, are linear functions.  For example, the equation $x=4$x=4 is a linear relationship because its graph is a vertical line, but it is not a linear function. The is because there are multiple, in fact an infinite number of $y$y values corresponding to a single $x$x value.

 

Practice Questions

Question 1

Consider the equation $y=4x$y=4x. A table of values is given below.

$x$x $-2$2 $-1$1 $0$0 $1$1
$y$y $-8$8 $-4$4 $0$0 $4$4
  1. Plot the points in the table of values.

    Loading Graph...

  2. Is the graph of $y=4x$y=4x linear?

    Yes

    A

    No

    B

QUESTION 2

Consider the equation $y=x+3$y=x+3.

  1. Complete the table of values below:

    $x$x $-2$2 $-1$1 $0$0 $1$1
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Plot the points in the table of values.

    Loading Graph...

  3. Draw the graph of $y=x+3$y=x+3.

    Loading Graph...

Question 3

Consider the equation $y=-\frac{x}{7}$y=x7.

  1. Complete the table of values below:

    $x$x $-7$7 $-4$4 $-3$3 $0$0
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Draw the graph of $y=-\frac{x}{7}$y=x7.

    Loading Graph...

Outcomes

MS11-2

represents information in symbolic, graphical and tabular form

What is Mathspace

About Mathspace