Linear Function Equation

The x and y coordinates of points on a straight line are related through a calculation.

Remember that the first number is the x coordinate, the second is the y coordinate, that is: (x,y).

Notice in the picture above:

  • The points are plotted such that the x coordinates are going up in ones;
  • The y coordinates are going up in 4s;
  • The y coordinate is equal to the x, times 4, plus 1.

Take the point (2,9). Notice, 2 \times 4 +1=9.

Take the point (5,21). Notice, 5 \times 4 +1 = 21.

This calculation works for all the coordinate pairs on the line.

We can capture this calculation with an equation y = x \,\times 4 +1, which is written as:

    \[y=4x+1\]

Calculating y=mx+b

To calculate an equation there are two steps:

Calculate m

We use the letter m to represent the number that multiplies x. We call it the slope because the multiplier determines how steep the line is.

In the example above, the y-coordinates increase by 4, just like the four times table. That is the value m.

We can also calculate m with:

    \[m=\frac{\text{rise}}{\text{run}}\]

or the formula

    \[m=\frac{y_2-y_1}{x_2-x_1}\]

Once we know the slope, we know that the equation of the line begins

    \[y=mx + \dots\]

2. Calculate the constant b

We complete the equation with a constant. There are different ways to calculate the constant. One way is to use the point that has (0,?). This is the y-intercept. In the example above, the y intercept is (0,1) and so the equation above finishes with +1.

Example: Determine the equation of the line that goes through the points (0,7),(1,10),(2,13),(5,22),(10,37)

Use any two points to calculate m. Let’s use (0,7) and (10,37).

    \[m=\frac{y_2-y_1}{x_2-x_1}=\frac{37-7}{10-0}=\frac{30}{10}=3\]

That tells us that m=3 and so our equation begins y=3x + \dots.

The y intercept has coordinates (0,7) and so our equation finishes with +7

    \[y=3x+7\]

Check the equation with some other coordinate pairs:

Use point (3,16): y=3(3)+7=9+7=16 \checkmark

Use point (5,22): y=3(5)+7=15+7=22 \checkmark.

Practice:

In this practice applet, the point (0,?) is provided, along with one other point.

GeoGebra applet link

Test out on Slope y intercept


Any Two Points

To find the equation of a line using any two points, we begin by calculating the slope with the formula

    \[m=\frac{y_2-y_1}{x_2-x_1}\]

To calculate the constant b, substitute the x and y coordinates of one known point (x_1,y_1) and the slope m into the equation

    \[y_1=m\,x_1+b\]

Example: Find the equation of the line that goes through the points (-1,20), (4,10), and (7,4).

Use any two points: (-1,20) and (7,4).

First, calculate slope:

    \[m=\frac{y_2-y_1}{x_2-x_1}=\frac{4-20}{7-(-1)}=\frac{-16}{8}=-2\]

Second, calculate b using slope m=-2, and any point. Let’s use (7,4).

    \begin{align*}y_1&=m\,x_1+b\\[10 pt]4&=-2(7)+b\\[10 pt]4&=-14+b\\[10 pt]18&=b\end{align}

We now have m=-2 and b=18, therefore the equation of the line is

    \[y=-2x+18\]

which could also be written as

    \[y=18-2x\]

just by changing the order of the terms.

Practice:

GeoGebra applet link


A more efficient formula

If we streamline the process of calculating b, we arrive at the formula

    \[y-y_1=m(x-x_1)\]

This is sometimes known as the ‘point/slope’ formula.

Using the same example as before, calculate the equation of the line that goes through the points (-1,20) and (7,4)

We need to calculate the slope m in the same way:

    \[m=\frac{y_2-y_1}{x_2-x_1}=\frac{4-20}{7-(-1)}=\frac{-16}{8}=-2\]

However, to calculate the equation we substitute m=-2 and choose any known point for the (x_1,y_1). Let’s use (7,4) again:

    \begin{align*}y-y_1&=m(x-x_1)\\[10 pt]y-4&=-2(x-7)\\[10 pt]y-4&=-2x+14\\[10 pt]y&=-2x+18\end{align}

Why it works

This formula y-y_1=m(x-x_1) is derived as follows:

    \begin{align*}y_1&=m\,x_1+b\\[10pt]y_1-m\,x_1&=b\end{align}

Now substitute y_1-mx_1 in place of b in the formula y=mx+b and rearrange:

    \begin{align*}y&=mx+b\\[10 pt]y&=mx+y_1-m\,x_1\\[10 pt]y-y_1&=mx-mx_1\\[10 pt]y-y_1&=m(x-x_1)\quad\text{as required.}\end{align}


Use any method to calculate the equation given the coordinates of one point and the slope:

Printed practice:Grade 10 Point Slope

GeoGebra applet link