E3.3, E3.4 - Gradient, midpoint and distance

E3.3, E3.4 - Gradient, midpoint and distance

Two coordinates can tell you a line's direction, a segment's centre and its length without a drawn grid. You will calculate gradient for E3.3 and use averages and Pythagoras to find midpoint and distance for E3.4. These methods also work when points lie in different quadrants.

Gradient from two points

Can the same two points give a negative gradient when read one way and a positive gradient when read backwards? Take A=(−2,1)A=(-2,1) and B=(4,5)B=(4,5). From AA to BB, the horizontal change is 4−(−2)=64-(-2)=6 and the vertical change is 5−1=45-1=4. Reading backwards reverses both changes, so their ratio stays the same.

You already measured rise divided by run on a grid. Coordinates supply those changes exactly: subtract the starting coordinate from the finishing coordinate separately in each direction.

[DIAGRAM: asset_name: Coordinate changes give gradient; asset_slug: coordinate_gradient_changes; caption: Reversing the direction reverses both changes, leaving the gradient unchanged.; description: Two equal-scale numbered coordinate grids. The left shows A at negative two comma one and B at four comma five with run six and rise four. The right shows A at negative two comma one and C at four comma negative three with run six and rise negative four. Horizontal and vertical legs are dashed.]
Reversing the direction reverses both changes, leaving the gradient unchanged.

Gradient from two points

For distinct points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) with x2≠x1x_2\ne x_1,

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

Use the same endpoint order in the numerator and denominator. Not given in the List of formulas: learn it.

A zero numerator gives gradient zero: the line is horizontal. A zero denominator gives a vertical line with undefined gradient, not gradient zero. If both coordinate differences are zero, you have named the same point twice; one point alone does not determine a line.

Worked example 1: a rising segment

Question. Calculate the gradient of the line through A=(−2,1)A=(-2,1) and B=(4,5)B=(4,5).

Plan. Calculate both changes from AA to BB, then divide vertical by horizontal.

x2−x1=4−(−2)=6horizontal changey2−y1=5−1=4vertical changem=46=23simplify the ratio\begin{aligned} x_2-x_1&=4-(-2)=6 && \text{horizontal change}\\ y_2-y_1&=5-1=4 && \text{vertical change}\\ m&=\frac46=\frac23 && \text{simplify the ratio} \end{aligned}

Answer. The gradient is 23\frac23.

Check. A run of 66 with this gradient gives rise 6×23=46\times\frac23=4; starting at height 11 reaches height 55, as required.

Change only the second point's vertical coordinate from 55 to −3-3. The horizontal change is unchanged, but the line now falls.

Worked example 2: a falling segment

Question. Calculate the gradient of the line through A=(−2,1)A=(-2,1) and C=(4,−3)C=(4,-3).

Plan. Keep the endpoint order, including when subtracting a negative number.

x2−x1=4−(−2)=6same horizontal changey2−y1=−3−1=−4four units downm=−46=−23signed rise over run\begin{aligned} x_2-x_1&=4-(-2)=6 && \text{same horizontal change}\\ y_2-y_1&=-3-1=-4 && \text{four units down}\\ m&=\frac{-4}{6}=-\frac23 && \text{signed rise over run} \end{aligned}

Answer. The gradient is −23-\frac23.

Check. Read backwards from CC to AA: (1−(−3))/(−2−4)=4/(−6)=−2/3(1-(-3))/(-2-4)=4/(-6)=-2/3. Both changes reverse, so the result agrees.

Watch out

−3−1−2−4\frac{-3-1}{-2-4} mixes the endpoint orders and gives the wrong sign. Choose a starting point once, then use “finish minus start” for both coordinates. Bracket negative coordinates.

The opening question has a reassuring answer: direction of travel changes the signs of the rise and run together, so it cannot change the gradient.

Midpoint coordinates

The midpoint lies halfway along a segment. To get halfway from (−2,1)(-2,1) to (4,5)(4,5), move half of the horizontal change and half of the vertical change. That gives (−2+3,1+2)=(1,3)(-2+3,1+2)=(1,3).

This is the same as averaging the two horizontal coordinates and averaging the two vertical coordinates. For the first coordinate, x1+12(x2−x1)=12(x1+x2)x_1+\frac12(x_2-x_1)=\frac12(x_1+x_2). The same calculation applies vertically. Keep the coordinate pairs in their separate columns: averaging an xx-coordinate with a yy-coordinate has no halfway meaning.

[DIAGRAM: asset_name: Halfway in both directions; asset_slug: coordinate_midpoints; caption: The midpoint halves the horizontal and vertical changes together.; description: Two equal-scale numbered grids show A at negative two comma one and B at four comma five. M at one comma three is halfway along AB. In the second grid the endpoint B has moved to five comma five and the midpoint is one point five comma three. Equal segment halves are marked within each grid.]
The midpoint halves the horizontal and vertical changes together.

Midpoint

The midpoint of the segment joining (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) is

(x1+x22,y1+y22).\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right).

This also works for horizontal and vertical segments. Not given in the List of formulas: learn it.

The average lies between the two values, unless they are equal. A midpoint can have fractional coordinates even when both endpoints have integer coordinates. If the endpoints coincide, the same formula returns that point, the midpoint of a segment of length zero.

Worked example 3: an integer midpoint

Question. Find the midpoint of the segment from A=(−2,1)A=(-2,1) to B=(4,5)B=(4,5).

Plan. Average corresponding coordinates independently.

xM=−2+42=1mean of horizontal positionsyM=1+52=3mean of vertical positions\begin{aligned} x_M&=\frac{-2+4}{2}=1 && \text{mean of horizontal positions}\\ y_M&=\frac{1+5}{2}=3 && \text{mean of vertical positions} \end{aligned}

Answer. M=(1,3)M=(1,3).

Check. From AA to MM is three right and two up; from MM to BB is also three right and two up. The two halves have the same direction and length.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account