Everything to learn better...

Home

Maths

Graphs

Drawing straight line graphs

Tutor: Toby

# Drawing straight line graphs

## ​​In a nutshell

There are three types of straight lines: diagonal, horizontal and vertical. Generally, straight lines can be described using two quantities: the gradient and the $y$-intercept. The exception is vertical lines which are solely defined by their $x$-intercept.​

## Equations of the straight line graphs

The general equation of a straight line is

$y=mx+c$

where $m$​ is the gradient of the line and $c$ is the $y$-intercept. If $m$​ is not zero, then the line is diagonal. If $m$ is zero, then the line is horizontal:

$y=c$​​

A vertical line does not have this equation. Instead it has equation

$x=d$

where $d$ is the $x$-intercept.​

## Using the equation to draw the line

One way to draw a straight line graph is to find two points that the line passes through, before joining up those points and extending the line beyond them. Follow this procedure to draw a diagonal line:

#### PROCEDURE

 1 Start with the $y$-intercept, given by $c$, since this is on the $y$-axis. Hence you have that the point $(0,c)$ is on the line. Mark this on the coordinate grid.​ 2 Pick an $x$-value (other than zero, since this will just give you the point you already have) and insert it into the equation of the line to find the corresponding $y$-coordinate. Mark on this second point. 3 Join it up the two points and extend the line beyond them.

For horizontal lines ($y=c$) or vertical lines ($x=d$) it is much more straightforward. The value of $c$ or $d$ gives the $y$-intercept and $x$-intercept respectively, so whichever type of line you have, draw that straight line through that intercept.

##### Example 1

A line has equation $y=3x-4$. Find the coordinates of any two points on the line and hence draw the line given by the equation.

Firstly, use the $y$-intercept​ to find the first point: $c=-4$. Hence when $x=0$$y=-4$.

Point 1: $\underline{(0,-4)}$

Next, pick a non-zero $x$-value. For example, $x=1$. Insert this into the equation of the line:

$y=3x-4$​​

$y=3(1)-4$​​

$y=3-4$​​

$y=-1$​​

So when $x=1$$y=-1$.

Point 2: $\underline{(1, -1)}$

Plot the two points found ($(0,-4)$ and $(1,-1)$) then join them up, extending beyond those points.

## ​​Using a table and plotting points

An alternative to the method outlined above is to use a table of points and to plot them. Joining up the points gives the line. Doing this requires being able to insert one coordinate into the equation of the line to identify the corresponding coordinate.

#### procedure

 1 Take the value of a coordinate given in the table and insert it into the equation of the line. 2 Add the corresponding coordinate found from the equation to the table. 3 Mark the point given by the corresponding coordinates to the graph. 4 Do this for all of the entries in the table. 5 Join up the points marked to give the line.

##### Example 2

Consider the table below, which gives a some of the coordinates on the line

$y=x-4$​​

 ​$x$​​ ​$-1$​​ ​$0$​​ ​$1$​​ ​$2$​​ ​$3$​​ ​$y$​​ ​$-6$​​ ​​​ ​$-2$​​ ​​​ ​​​

Complete the table, plot the points on a graph and hence draw the line $y=x-4$​.

The first missing value is the $y$-coordinate when $x=0$. Hence insert this $x$-value into the equation of the line:

$y=x-4=0-4={\underline {-4}}$​​

So the corresponding $y$-coordinate is $-4$ and thus the point $\underline{(0,-4)}$ is on the line.

Repeating this procedure for the other missing values ($x=2$ and $x=3$) gives the following complete table:

 ​$x$​​ ​$-1$​​ ​$0$​​ ​$1$​​ ​$2$​​ ​$3$​​ ​$y$​​ ​$-6$​​ ​$\underline{-4}$​​ ​$-2$​​ ​​​$\underline0$​​ ​​​$\underline2$​​

The points you have are $(-1,-6)$$(0,-4)$$(1,-2)$$(2,0)$ and $(3,2)$. Plotting these and connecting them looks like this:

## FAQs - Frequently Asked Questions

### What are the equations of straight lines?

Beta

I'm Vulpy, your AI study buddy! Let's study together.