1.03a, 1.03b - Straight lines, distances and gradients

1.03a, 1.03b - Straight lines, distances and gradients

Turn a line's direction and position into an equation you can use. You will connect gradients, distances and midpoints, construct parallel and perpendicular lines, and find exactly where lines meet.

Gradient and direction

Can you find the line through (1,4)(1,4) that meets 3x+2y=73x+2y=7 at a right angle, without relying on a drawing? Start with what a line does: from A(−2,1)A(-2,1) to B(4,4)B(4,4), moving 66 units right moves 33 units up.

You already know

Coordinates give horizontal position first and vertical position second. Subtract coordinates in matching orders, and use Pythagoras for a right-angled triangle.

The rise–run triangle turns direction into a number.

[DIAGRAM: asset_name: Rise and run on a straight line; caption: A rise of 3 over a run of 6 gives gradient one half; asset_slug: h240-gradient-line; description: Equal-scale axes show y equals one half x plus 2 through A minus 2 comma 1 and B 4 comma 4. A dashed right triangle has horizontal run 6 and vertical rise 3. The y-intercept is 2.]
A rise of 3 over a run of 6 gives gradient one half

Gradient

The gradient of a non-vertical straight line is its change in yy per unit increase in xx. A positive gradient rises to the right; a negative gradient falls to the right.

Using two distinct points gives the same ratio wherever they lie on the line.

Gradient between two points

For A(x1,y1)A(x_1,y_1), B(x2,y2)B(x_2,y_2), with x1≠x2x_1\ne x_2,

m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}

Not in the formula sheet: learn it.

Keep both subtraction orders consistent: reversing both changes neither the ratio nor the direction.

Worked example 1: a rising line

Question. Find the gradient through A(−2,1)A(-2,1) and B(4,4)B(4,4).

Plan. Divide the vertical change by the corresponding horizontal change.

Δy=4−1=3vertical changeΔx=4−(−2)=6horizontal changem=36=12rise divided by run\begin{aligned} \Delta y&=4-1=3 && \text{vertical change} \\ \Delta x&=4-(-2)=6 && \text{horizontal change} \\ m&=\frac36=\frac12 && \text{rise divided by run} \end{aligned}

Why this order? Both changes describe the same journey from AA to BB.

Answer. The gradient is 12\frac12: each unit right gives half a unit up.

Check. Reversing the journey gives (−3)/(−6)=12(-3)/(-6)=\frac12.

Now change only the sign of the vertical change: keep the horizontal run but put BB below AA.

Worked example 2: a falling line

Question. Find the gradient through A(−2,1)A(-2,1) and B(4,−2)B(4,-2).

Plan. Use the same ordered differences, retaining the negative rise.

Δy=−2−1=−3vertical changeΔx=4−(−2)=6horizontal changem=−36=−12divide the changes\begin{aligned} \Delta y&=-2-1=-3 && \text{vertical change} \\ \Delta x&=4-(-2)=6 && \text{horizontal change} \\ m&=\frac{-3}{6}=-\frac12 && \text{divide the changes} \end{aligned}

Why keep the sign? It records that yy decreases as xx increases.

Answer. The gradient is −12-\frac12.

Check. Moving 66 units right changes yy by 6(−12)=−36(-\frac12)=-3, reaching −2-2.

A horizontal line has gradient 00. A vertical line, such as x=3x=3, has undefined gradient: its horizontal change is zero, so division is impossible. On equal-scale axes, a line's anticlockwise inclination θ\theta from the positive xx-axis satisfies m=tan⁡θm=\tan\theta; this is the same right-triangle ratio, not a formula supplied in the sheet. Thus inclinations 45∘45^\circ and 135∘135^\circ give gradients 11 and −1-1.

Watch out

Wrong: m=(4−(−2))/(4−1)=2m=(4-(-2))/(4-1)=2 in Worked example 1. That is run divided by rise. Right: m=(4−1)/(4−(−2))=12m=(4-1)/(4-(-2))=\frac12.

Your turn changes the size of the fall as well as the coordinates; keep its sign visible.

Equations and drawing a line

An equation describes every point on a line. In y=mx+cy=mx+c, setting x=0x=0 gives y=cy=c, so cc is the vertical intercept. The diagram above therefore represents y=12x+2y=\frac12x+2.

Equations of a straight line

Through (x1,y1)(x_1,y_1) with finite gradient mm,

y−y1=m(x−x1)y-y_1=m(x-x_1)

Equivalent forms are y=mx+cy=mx+c and ax+by+c=0ax+by+c=0, where a,ba,b are not both zero. If b≠0b\ne0, the latter has gradient −a/b-a/b. If b=0b=0, it is a vertical line.

Not in the formula sheet: learn it.

Point–gradient form is the gradient quotient rearranged. It saves you guessing the intercept.

Worked example 3: from a point and gradient

Question. Find the line of gradient 33 through (2,−1)(2,-1), in general form.

Plan. Substitute into point–gradient form, then collect all terms on one side.

y+1=3(x−2)substitute point and gradienty=3x−7expand and simplify3x−y−7=0collect terms\begin{aligned} y+1&=3(x-2) && \text{substitute point and gradient} \\ y&=3x-7 && \text{expand and simplify} \\ 3x-y-7&=0 && \text{collect terms} \end{aligned}

Why start with y+1y+1? Subtracting the point's vertical coordinate means y−(−1)y-(-1).

Answer. 3x−y−7=03x-y-7=0.

Check. At (2,−1)(2,-1), 6+1−7=06+1-7=0; rearranging gives gradient 33.

Change only the gradient's sign. The line still passes through the same point, but its intercept changes too.

Worked example 4: a negative gradient

Question. Find the line of gradient −3-3 through (2,−1)(2,-1), in general form.

Plan. Use the same point–gradient construction with the new gradient.

y+1=−3(x−2)substitutey=−3x+5expand3x+y−5=0collect terms\begin{aligned} y+1&=-3(x-2) && \text{substitute} \\ y&=-3x+5 && \text{expand} \\ 3x+y-5&=0 && \text{collect terms} \end{aligned}

Why retain the brackets? The gradient multiplies the entire horizontal change.

Answer. 3x+y−5=03x+y-5=0.

Check. 3(2)+(−1)−5=03(2)+(-1)-5=0, and the coefficient of xx in y=−3x+5y=-3x+5 is −3-3.

If given two points, calculate the gradient first: (1,2)(1,2) and (5,10)(5,10) give m=8/4=2m=8/4=2, then y−2=2(x−1)y-2=2(x-1), so y=2xy=2x. Equal horizontal coordinates instead give a vertical line directly.

To draw 6x+3y−12=06x+3y-12=0, set y=0y=0 to get (2,0)(2,0) and set x=0x=0 to get (0,4)(0,4). Mark these distinct points on labelled axes and extend the line through them. Alternatively rearrange to y=−2x+4y=-2x+4, start at (0,4)(0,4) and move one unit right, two down. For x=3x=3, mark two points with horizontal coordinate 33 and join vertically. A graph supplies the reverse information: read a point and calculate rise over run, then construct the equation.

Watch out

Wrong: identify the gradient of 3x+2y=73x+2y=7 as 33. Right: rearrange to y=−32x+72y=-\frac32x+\frac72; the gradient is −32-\frac32.

Find a new line and use its intercepts to check how you would draw it.

Parallel and perpendicular lines

Direction, rather than position, decides whether lines are parallel or perpendicular. Distinct parallel lines have the same gradient; equal gradients and equal intercepts describe the same line.

Gradient conditions

For non-vertical lines,

m1=m2parallel directionsm1m2=−1perpendicular directions\begin{aligned} m_1&=m_2 && \text{parallel directions} \\ m_1m_2&=-1 && \text{perpendicular directions} \end{aligned}

The perpendicular product requires both gradients to be finite. Horizontal and vertical lines are perpendicular to each other.

Not in the formula sheet: learn it.

Why the negative reciprocal? A direction (u,v)(u,v) rotates through a right angle to (−v,u)(-v,u). Their gradients are v/uv/u and −u/v-u/v, whose product is −1-1 when neither denominator is zero. A useful surprise follows: multiplying both changes by the same positive factor changes the distance travelled but leaves the gradient untouched.

Worked example 5: a parallel line

Question. Find the line through (1,4)(1,4) parallel to 3x+2y=73x+2y=7.

Plan. Read the given gradient, then use it through the new point.

y=−32x+72rearrange the given liney−4=−32(x−1)same gradient3x+2y−11=0clear fractions and collect\begin{aligned} y&=-\frac32x+\frac72 && \text{rearrange the given line} \\ y-4&=-\frac32(x-1) && \text{same gradient} \\ 3x+2y-11&=0 && \text{clear fractions and collect} \end{aligned}

Why use the same gradient? Parallel lines make the same vertical change for each horizontal step.

Answer. 3x+2y−11=03x+2y-11=0.

Check. 3(1)+2(4)−11=03(1)+2(4)-11=0, and both gradients are −32-\frac32.

Now change only the requested relationship: perpendicular instead of parallel.

Worked example 6: a perpendicular line

Question. Find the line through (1,4)(1,4) perpendicular to 3x+2y=73x+2y=7.

Plan. Take the negative reciprocal of −32-\frac32, then use point–gradient form.

m=23negative reciprocaly−4=23(x−1)use the point2x−3y+10=0clear fractions\begin{aligned} m&=\frac23 && \text{negative reciprocal} \\ y-4&=\frac23(x-1) && \text{use the point} \\ 2x-3y+10&=0 && \text{clear fractions} \end{aligned}

Why change both sign and reciprocal? Their product must be −1-1, not 11.

Answer. 2x−3y+10=02x-3y+10=0, the line asked for at the start.

Check. 2−12+10=02-12+10=0, and (−32)(23)=−1(-\frac32)(\frac23)=-1.

For a line perpendicular to y=4y=4, write x=kx=k through the required point; no finite gradient is needed.

Watch out

Wrong: the perpendicular gradient to 22 is 12\frac12. Right: it is −12-\frac12, since 2(−12)=−12(-\frac12)=-1.

Check the new point and the perpendicular relationship separately.

Midpoints and distances

A midpoint splits each coordinate change in half. A distance combines those changes by Pythagoras, so a negative vertical change does not give a negative length.

Midpoint and distance

For points A(x1,y1)A(x_1,y_1) and B(x2,y2)B(x_2,y_2),

M=(x1+x22,y1+y22)AB=(x2−x1)2+(y2−y1)2\begin{aligned} M&=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right) \\ AB&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2} \end{aligned}

These work for horizontal and vertical segments too.

Not in the formula sheet: learn it.

Average like coordinates; never average a horizontal coordinate with a vertical one.

Worked example 7: a segment falling to the right

Question. Find the midpoint and length of the segment from A(−3,2)A(-3,2) to B(5,−4)B(5,-4).

Plan. Average corresponding coordinates and use the two changes as perpendicular sides.

M=(−3+52,2−42)=(1,−1)coordinate averagesAB2=82+(−6)2=100PythagorasAB=10positive square root\begin{aligned} M&=\left(\frac{-3+5}{2},\frac{2-4}{2}\right)=(1,-1) && \text{coordinate averages} \\ AB^2&=8^2+(-6)^2=100 && \text{Pythagoras} \\ AB&=10 && \text{positive square root} \end{aligned}

Why square the signed changes? Pythagoras uses side lengths; squaring removes their directional signs.

Answer. Midpoint (1,−1)(1,-1), length 1010.

Check. Both steps AA to MM and MM to BB are (4,−3)(4,-3), each of length 55.

Change only the vertical direction: the endpoint is now (5,8)(5,8), so the vertical change is 66 instead of −6-6.

Worked example 8: same length, different midpoint

Question. Find the midpoint and length from A(−3,2)A(-3,2) to B(5,8)B(5,8).

Plan. Repeat the two coordinate calculations with the new endpoint.

M=(−3+52,2+82)=(1,5)coordinate averagesAB2=82+62=100PythagorasAB=10positive length\begin{aligned} M&=\left(\frac{-3+5}{2},\frac{2+8}{2}\right)=(1,5) && \text{coordinate averages} \\ AB^2&=8^2+6^2=100 && \text{Pythagoras} \\ AB&=10 && \text{positive length} \end{aligned}

Why is the length unchanged? Changing the sign of one coordinate change leaves its square unchanged.

Answer. Midpoint (1,5)(1,5), length 1010.

Check. From the midpoint to either endpoint, the squared distance is 42+32=254^2+3^2=25.

You can reverse an average too. If M=(2,3)M=(2,3) and A=(−1,5)A=(-1,5), then (−1+xB)/2=2(-1+x_B)/2=2 and (5+yB)/2=3(5+y_B)/2=3, giving B=(5,1)B=(5,1).

Watch out

Wrong: AB=82−62AB=\sqrt{8^2-6^2} for a falling segment. Right: add the squared changes, AB=82+(−6)2AB=\sqrt{8^2+(-6)^2}.

The next segment uses different changes; check that the midpoint is halfway in both coordinates.

Intersections and exceptional cases

An intersection is one coordinate pair satisfying both equations. Solving simultaneously finds it exactly; a drawing is a check, not a replacement for exact coordinates.

Worked example 9: two sloping lines

Question. Find the intersection of 2x+y=72x+y=7 and x−y=2x-y=2.

Plan. Add to eliminate yy, then substitute for its value.

3x=9add the equationsx=3divide by 3y=7−2(3)=1substitute into the first\begin{aligned} 3x&=9 && \text{add the equations} \\ x&=3 && \text{divide by }3 \\ y&=7-2(3)=1 && \text{substitute into the first} \end{aligned}

Why eliminate yy? Its coefficients are opposites already, so no scaling is needed.

Answer. (3,1)(3,1).

Check. 2(3)+1=72(3)+1=7 and 3−1=23-1=2.

Replace only the second line by a vertical one. The intersection can still be found without a gradient for that line.

Worked example 10: one line is vertical

Question. Find the intersection of 2x+y=72x+y=7 and x=4x=4.

Plan. Use the given horizontal coordinate directly in the other equation.

2(4)+y=7substitute x=4y=−1solve for y\begin{aligned} 2(4)+y&=7 && \text{substitute }x=4 \\ y&=-1 && \text{solve for }y \end{aligned}

Why substitute rather than find two gradients? The vertical line already supplies one coordinate exactly.

Answer. (4,−1)(4,-1).

Check. 2(4)−1=72(4)-1=7, and the horizontal coordinate is 44.

There are two exceptions to “one intersection”. Combining y=2x+1y=2x+1 with y=2x−3y=2x-3 gives 1=−31=-3: distinct parallel lines, no intersection. Combining y=2x+1y=2x+1 with 4x−2y+2=04x-2y+2=0 gives 0=00=0: the same line, infinitely many common points. Equal gradients alone do not distinguish these cases.

Exam tip

Give an intersection as a coordinate pair and check it in both equations. An identity means coincident lines; a contradiction means no common point. Neither calls for dividing by zero to produce a coordinate.

All these routes use the same principle: the required line or point must satisfy every stated condition.

Quick Recap

  • Gradient is vertical change divided by matching horizontal change; vertical lines have undefined gradient.
  • Use point–gradient form to construct a line and two distinct points to draw it.
  • Parallel directions have equal gradients; finite perpendicular gradients multiply to −1-1.
  • Average coordinates for a midpoint and use Pythagoras for distance.
  • Solve line equations simultaneously, recognising contradictory and identical equations.

The opening perpendicular line is 2x−3y+10=02x-3y+10=0: it passes through (1,4)(1,4) and has gradient 23\frac23, the negative reciprocal of −32-\frac32.