# Straight line graphs

Straight line graphs are plotted against horizontal (x) and vertical (y) axes.

The relationship between the x value and the y value along any point on the straight line is expressed in the equation of a straight line where

• m = gradient - the direction and size of the slope of the straight line
• c = intercept - the point at which the straight line crosses the y axis

## Let's consider some examples of straight line graphs

To work out the gradient (m), count the number of units increase or decrease in the value of y for each unit increase in the value of x.

• An increase in the value of y results in a positive gradient or upward sloping straight line
• A decrease in the value of y results in a negative gradient or downward sloping straight line For the above graph, the value of y increases by 2 units for each unit increase in the value of x.

So the gradient (m) is 2.

The point at which the straight line crosses the y axis is y = 1.

So the intercept (c) is 1.

Therefore, the straight line graph equation y = mx + c becomes

y   =   2x  +  1

To check this equation is correct

• Choose any value of x and work out the value of y. For instance, if x = 1, then y = 2x + 1 = (2 x 1) + 1 = 2 + 1 = 3.
• Next draw a vertical on the graph from the x axis where x = 1 until you reach the straight line of the graph.
• Now draw a horizontal from this point on the straight line of the graph to the y axis.
• If the equation and your calculation are correct, the horizontal should meet the y axis at y = 3. This is shown on the graph above.

## Another example In this case, for each unit increase in the value of x, the value of y decreases by 3 units.

So the gradient (m) is -3.

The straight line crosses the y axis at y = 2.

So the intercept (c) is 2.

Hence, the straight line graph equation y = mx + c becomes

y   =   -3x  +  2

To check this equation is correct

• Choose any value of x and work out the value of y. For instance, if x = 2, then y = -3x + 2 = (-3 x 2) + 2 = -6 + 2 = -4.
• Next draw a vertical on the graph from the x axis where x = 1 until you reach the straight line of the graph.
• Now draw a horizontal from this point on the straight line of the graph to the y axis.
• If the equation and your calculation are correct, the horizontal should meet the y axis at y = -4. This is shown on the graph above.