P1.3.1 - Equation of a straight line

P1.3.1 - Equation of a straight line

A straight-line equation is a compact way of describing every point on one line. In this lesson you will connect the graph, the gradient, the intercept, and the algebraic forms Edexcel expects. You will also use straight-line equations in geometry problems and simple modelling contexts, where the gradient and intercept have meanings.

Gradient, intercept and equation forms

A non-vertical straight line has a constant gradient. If two points on the line are (x_1, y_1) and (x_2, y_2), then

Gradient between two points

m=y2y1x2x1m=\frac{y_2-y_1}{x_2-x_1}

The gradient m measures the change in y for each increase of 1 in x. A positive gradient slopes upwards from left to right, a negative gradient slopes downwards, and a zero gradient is horizontal.

The form

y=mx+cy=mx+c

shows two features immediately: m is the gradient and c is the y-intercept, the value of y when x=0.

[DIAGRAM: asset_name: Lesson p1.3.1: Equations of straight lines in the (x,y) plane - diagram 01; asset_slug: p1_3_1_understand_and_use_the_equation_of_a_straight_line_in_the_x_y_plane__diagram_01; recommended_method: drawn_math; description: Draw a clean coordinate graph of the line y = 1/2 x + 1. Mark the y-intercept at (0, 1). Mark two points such as (2, 2) and (6, 4), with dashed horizontal and vertical construction guides showing run 4 and rise 2. Label the gradient calculation m = rise/run = 2/4 = 1/2 and the equation y = 1/2 x + 1.]
Diagram

Edexcel also expects the general form

ax+by+c=0,ax+by+c=0,

where a, b and c are constants. In this form, the letter c is just a constant in the equation; it is not usually the same number as the y-intercept in y=mx+c. General form is useful when a final answer is requested without fractions in the equation. To read the gradient from general form, rearrange it into y=mx+c.

Worked example: find the gradient and y-intercept of

4x2y+6=0.4x-2y+6=0.

Make y the subject:

2y=4x6.-2y=-4x-6.

Divide by -2:

y=2x+3.y=2x+3.

So the gradient is 2 and the y-intercept is 3.

Finding a line through points

If you know one point on a line and the gradient, the cleanest form is often point-gradient form:

Point-gradient form

yy1=m(xx1)y-y_1=m(x-x_1)

Here (x_1, y_1) is a known point on the line and m is the gradient. This form comes directly from the gradient formula: for any point (x,y) on the same line,

m=yy1xx1.m=\frac{y-y_1}{x-x_1}.

Multiplying by x-x_1 gives y-y_1=m(x-x_1).

Worked example: find the equation of the line through A(2,-1) and B(8,3), giving your answer in the form ax+by+c=0.

First find the gradient:

m=3(1)82=46=23.m=\frac{3-(-1)}{8-2}=\frac{4}{6}=\frac{2}{3}.

Use point-gradient form with A(2,-1):

y(1)=23(x2).y-(-1)=\frac{2}{3}(x-2).

So

y+1=23(x2).y+1=\frac{2}{3}(x-2).

Multiply by 3 to remove the fraction:

3y+3=2x4.3y+3=2x-4.

Rearrange into general form:

2x3y7=0.2x-3y-7=0.

You would get the same line if you used point B instead. A different-looking equation, such as 3y=2x-7, is equivalent; the requested form controls how you finish.

Parallel and perpendicular lines

Parallel lines have the same gradient. If a line has gradient m, any parallel line has

m=m.m'=m.

Perpendicular lines meet at a right angle. For non-vertical lines, their gradients multiply to -1, so if one line has gradient m, a perpendicular line has

m=1m.m'=-\frac{1}{m}.

[DIAGRAM: asset_name: Lesson p1.3.1: Equations of straight lines in the (x,y) plane - diagram 02; asset_slug: p1_3_1_understand_and_use_the_equation_of_a_straight_line_in_the_x_y_plane__diagram_02; recommended_method: drawn_math; description: Draw two spacious panels. Left panel: two parallel straight lines with the same gradient 3/4, labelled m = 3/4 and m' = 3/4 with the rule m' = m. Right panel: a line with gradient 3/4 and a perpendicular line with gradient -4/3, labelled with the rule m' = -1/m and product -1. Use direct labels and no crowded arrows.]
Diagram

The main exam habit is to identify the original gradient before choosing the new one. If the original line is not already in y=mx+c, rearrange it first.

Worked example: find the equation of the line perpendicular to

4x+3y6=04x+3y-6=0

which passes through (6,-2). Give your answer in the form ax+by+c=0.

First rearrange the given line:

3y=4x+6,3y=-4x+6,

so

y=43x+2.y=-\frac{4}{3}x+2.

The original gradient is -4/3. A perpendicular gradient is the negative reciprocal:

m=14/3=34.m'=-\frac{1}{-4/3}=\frac{3}{4}.

Now use point-gradient form with (6,-2):

y(2)=34(x6).y-(-2)=\frac{3}{4}(x-6).

So

y+2=34(x6).y+2=\frac{3}{4}(x-6).

Multiply by 4:

4y+8=3x18.4y+8=3x-18.

Rearrange:

3x4y26=0.3x-4y-26=0.

Parallel and perpendicular lines Continued

There is one special case to remember. A vertical line such as x=4 has no finite gradient, so the formula -1/m is not the right tool. A vertical line is perpendicular to a horizontal line, such as y=-1. Most A-level questions using m'=-1/m involve non-vertical lines.

Straight-line models

A straight-line model has the form

y=mx+c,y=mx+c,

but the letters usually represent quantities in context. The gradient is a rate of change and the intercept is an initial value or fixed offset.

[DIAGRAM: asset_name: Lesson p1.3.1: Equations of straight lines in the (x,y) plane - diagram 03; asset_slug: p1_3_1_understand_and_use_the_equation_of_a_straight_line_in_the_x_y_plane__diagram_03; recommended_method: drawn_math; description: Draw two panels of straight-line models. Left: Celsius-Fahrenheit graph F = 9/5 C + 32, marking (0,32) and (100,212), with labels showing intercept 32 and gradient 9/5. Right: distance-time graph s = 8t + 2, marking initial distance 2 m and a dashed rise/run from (2,18) to (6,50) to show constant speed 8 m s^-1. Axes must include units.]
Diagram

For Celsius and Fahrenheit,

F=95C+32.F=\frac{9}{5}C+32.

The gradient 9/5 means an increase of 1 degree Celsius corresponds to an increase of 9/5 degrees Fahrenheit. The intercept 32 means 0°C corresponds to 32°F.

For a distance-time graph with constant speed, the gradient is speed. If s is distance in metres and t is time in seconds, the model

s=8t+2s=8t+2

means the object starts 2 m from the reference point and moves at a constant speed of 8 m s^{-1}.

Worked example: a sensor's output voltage V is modelled as a straight-line function of temperature T. The model passes through (10,1.2) and (30,2.0), where T is in degrees Celsius and V is in volts. Find the model in the form V=aT+b and interpret a.

The gradient is

a=2.01.23010=0.820=0.04.a=\frac{2.0-1.2}{30-10}=\frac{0.8}{20}=0.04.

Use V=aT+b with (10,1.2):

1.2=0.04(10)+b.1.2=0.04(10)+b.

So

1.2=0.4+b,1.2=0.4+b,

and therefore

b=0.8.b=0.8.

The model is

V=0.04T+0.8.V=0.04T+0.8.

The value a=0.04 means the voltage increases by 0.04 V for each 1°C increase in temperature, according to the model.

Straight-line models Continued

A model is not automatically true outside the data range. In the runner model, c=-1 would suggest the runner was -1 m from the start at t=0; that may just mean the straight-line model is only intended after the timed interval begins.

Choosing the method

Most straight-line questions become short once you choose the right starting point:

  • If you are given a gradient and a point, use y-y_1=m(x-x_1).
  • If you are given two points, first find the gradient, then use one point.
  • If you are comparing parallel or perpendicular lines, first identify the given gradient.
  • If the final answer is requested as ax+by+c=0, clear fractions and collect all terms on one side.

Worked example: the line L passes through A(0,4) and B(6,1). Find the equation of the line through B that is perpendicular to L.

Find the gradient of L:

mL=1460=36=12.m_L=\frac{1-4}{6-0}=-\frac{3}{6}=-\frac{1}{2}.

The perpendicular gradient is

m=11/2=2.m_{\perp}=-\frac{1}{-1/2}=2.

The new line passes through B(6,1), so

y1=2(x6).y-1=2(x-6).

Therefore

y=2x11.y=2x-11.

In general form,

2xy11=0.2x-y-11=0.

Explain It Back

Use this as a self-explanation check after the section above. It is for diagnosing what you can already explain, not for learning new material from scratch.

Before leaving this lesson, check that your method is not just a memorised formula. A good explanation should say where the required gradient came from, why it is the right gradient, and how a point pins down the exact position of the line.