## The Straight Line

### Introduction

We commonly use **Cartesian Coordinates**, where both x and y coordinates encompass both positive and negative values.

Stated straight off, the expression for a straight line is

y = mx + c

e.g.

y = 2x + 4

y = 5x -7

These expressions relates the values of 'x' and 'y' everywhere along the line.

Note that expressions like

2y + 3x = 7

are also straight lines because, with a bit of algebra, that can be transposed to a 'y=mx+c ' form.

### Drawing a line from a Particular Expression

Given a straight line expression such as, for example

Then we would

• Choose a value of 'x' at random

• Replace 'x' in the Right Hand Side of the equation with this value

• Calculate the numerical value of the Right Hand Side - this will be the value of 'y' corresponding to this particular value of x.

• Plot this derived (x,y) coordinate

• Repeat until you have sufficient points to connect points with a line

To proceed, using the expression given. Although I have said that 'x' values are chosen at random, we can apply a certain systematic method. For example, choosing x=0' is normally fairly simple to calculate - and then we could proceed in unit steps of 'x' either way of this point. So

When x=0, | y= 2(0) + 3 = 3 |

When x=1, | y= 2(1) + 3 = 5 |

When x=2, | y= 2(2) + 3 = 7 |

When x=3, | y= 2(3) + 3 = 9 |

When x=-1, | y= 2(-1) + 3 = 1 |

When x=-2, | y= 2(-2) + 3 = -1 |

When x=-3, | y= 2(-3) + 3 = -3 |

This shows the procedure although in practice (and with practice), you will need less points in order to construct a straight line.

### Gradient

The gradient of a line is defined as the ratio

Since we are considering a line on an 'xy' coordinate system, this becomes

where we are considering an appropriate right-angled triangle derived from the line, i.e. a right-angled triangle that gives us nice round figures of 'x' and 'y' from which to calculate the gradient.

There is one other feature which nees to be mentioned

From the straight line above, the gradient will be

**2**.

However, consider this line

So the gradient is a negative value. (*Note that when I have a minus sign in either the numerator or denominator of a fraction, then I can bring it to the front of the entire fraction*)

**All 'forward' sloping lines will have a positive gradient, and all 'backward' sloping lines will have a negative gradient.**

As a by-note, I could mention that gradients in 'real life', such as road gradients, sometimes calculate gradients in a different manner, e.g. vertical rise against actual length of road traversed. They are also often expressed as a a percentage, - Key Skills - Percentages" could be useful here if your background theory on this topic is a bit rusty. For example, if the road builders had calculated a ratio for the gradient of

Then to convert this to a percentage, you would multiply it by 100

###
Meaning of *c* in y = mx + c

In

The number corresponding to *c* in the above equation is the y-coordinate where it will cross the y-axis

__Examples__

will cross the y-axis at y = 6

will cross the y-axis at y = -6.

y = 3x

will cross the y-axis at the origin, because c = 0.

###
Meaning of *m* in y = mx + c

The *m* is the gradient, which is described above.

Note that lines of equal gradient, i.e. for which the value of *m* is identical, are parallel lines.

A line like

has a gradient of **1** - by convention we omit the '1' in the equation.
This gradient will be at 45 degrees. Following the method we have used earlier in this section, the relevant triangle we would consider would be an
isosceles triangle, both the vertical rise and horizontal displacement being identical.

A gradient of **- 1** would also be inclined at 45°, in a 'backward' direction.
An example of a line with a 'backward' slope of 45° would be