Gradient (also called slope) is the steepness of a line. To determine the gradient, observe the line from left to right: if the line moves up then the gradient is positive, but if the direction is down then the gradient is negative.

The most basic formula for gradient is:

$gradient \quad = \cfrac{rise}{run}$

Try the following Geogebra to get a grasp of gradient movements.

The gradient-intercept formula is in the form of:

$y=mx+c$

where m is the gradient and c is the y-intercept.

### General Form

Sometimes, the general formula is written instead of the gradient-intercept form. Remember that:

$ax+by+c=0$

Then, the gradient is given by: $m=-\cfrac{a}{b}$

Proof:

$ax+by+c=0\\ \\ by=-ax-c\\ \\ y=-\cfrac { ax }{ b } -\cfrac { c }{ b } \\ \\ m=-\cfrac { a }{ b }$

#### Example:

Find the gradient of $3x-y=2$.

$3x-y=-2\\ \\ 3x-y-2=0\\ \\ then\quad a=3,\quad b=-1\\ \\ m=-\cfrac { a }{ b } \\ \\ m=-\cfrac { 3 }{ -1 } \\ \\ m=3\\ \\ \therefore \quad gradient\quad is\quad 3$

### Equation of a Straight Line

Point-Intercept Formula

The equation of a straight line is given by:

$y-{ y }_{ 1 }=m(x-{ x }_{ 1 })\\ \\ where\quad ({ x }_{ 1 },{ y }_{ 1 })\quad lies\quad on\quad the\quad line\quad with\quad gradient\quad m$

To find out the equation of a straight line given the gradient and a point, then use the point-intercept formula.

#### Example:

Find the equation of a line that has a gradient of 3 and passes through the point (1, 2).

${ x }_{ 1 }=1,\quad { y }_{ 1 }=2,\quad m=3\\ \\ y-2=3(x-1)\\ \\ y-2=3x-3\\ \\ y=3x-1$

To double check that the line y=3x-1 correctly passes the point (1, 2), substitute x=1 into the equation and check if y=2.

$y=3x-1\\ \\ y=3(1)-1\\ \\ y=2\\ \\ \therefore \quad The\quad equation\quad y=3x-1\quad passes\quad through\quad the\quad point\quad (1,2)$

Two-Point Formula

In the event that two points are given to find the equation of a line, the two-point formula is needed:

$\cfrac { y-{ y }_{ 1 } }{ x-{ x }_{ 1 } } =\cfrac { { y }_{ 2 }-{ y }_{ 1 } }{ { x }_{ 2 }-{ x }_{ 1 } }$

#### Example:

Find the equation of a line that passes through the points (2,3) and (4,7).

$\cfrac { y-{ y }_{ 1 } }{ x-{ x }_{ 1 } } =\cfrac { { y }_{ 2 }-{ y }_{ 1 } }{ { x }_{ 2 }-{ x }_{ 1 } } \\ \\ \cfrac { y-3 }{ x-2 } =\cfrac { 7-3 }{ 3-2 } \\ \\ \cfrac { y-3 }{ x-2 } =\cfrac { 4 }{ 1 } \\ \\ y-3=4(x-2)\\ \\ y-3=4x-8\\ \\ y=4x-5$

### Parallel and Perpendicular Lines

If two lines are parallel, then they have the same gradient.

#### Example:

Find the equation of a straight line parallel to the line 2x-y-3=0 and passes through (1, -5).

$2x-y-3=0,\quad (1,-5)\\ \\ y=2x-3\\ \\ { m }_{ 1 }=2\\ \\ Since\quad the\quad gradient\quad is\quad equal,\\ \\ \therefore \quad { m }_{ 2 }=2\\ \\ Use\quad the\quad point-intercept\quad formula:\\ \\ y-(-5)=2(x-1)\\ \\ y+5=2x-2\\ \\ \therefore \quad y=2x-7\quad (gradient-intercept\quad form)\\ \\ \therefore \quad 2x-y-7=0\quad (general\quad form)$

This means that equal gradient lines would not meet because they are on the same direction.

If two lines are perpendicular, then there is a characteristic determined by the gradients of the two lines.

${ m }_{ 1 }{ \times m }_{ 2 }=-1$

#### Example:

Show that the lines $3x+y-11=0$ and $x-3y+1=0$ are perpendicular.

$3x+y-11=0\\ y=-3x+11\\ \therefore \quad { m }_{ 1 }=-3\\ \\ x-3y+1=0\\ x+1=3y\\ y=\cfrac { 1 }{ 3 } x+\cfrac { 1 }{ 3 } \\ \therefore \quad { m }_{ 2 }=\cfrac { 1 }{ 3 } \\ \\ { m }_{ 1 }{ m }_{ 2 }=-3\times \cfrac { 1 }{ 3 } \\ { m }_{ 1 }{ m }_{ 2 }=-1$