1.3 - Equations of straight lines
How can two coordinates determine a line that continues for ever? In this part of 1.3, you will connect a line's direction to its equation, then use distances, midpoints and intersections to solve geometry problems. Horizontal and vertical lines will help explain the limits of the familiar gradient formula.
Gradient and coordinates
The move from one point to another has a horizontal change and a vertical change. Those two changes form the perpendicular sides of a right-angled triangle: they describe both the direction and the length of the joining segment.
Gradient
The gradient of a non-vertical straight line is its vertical change divided by its horizontal change. It measures the change in for each unit increase in .
For points and , subtract in the same order in both coordinates. Pythagoras gives their distance. Averaging each pair of coordinates gives the point halfway along the segment.
Two-coordinate calculations
These formulae are not listed in MF19: learn them and their meanings.
The signs of the changes matter for gradient. Distance uses their squares, so reversing a direction does not change the length.
Worked example 1: a rising segment
Question. For and , find the gradient of , its length and its midpoint.
Plan. Find the two coordinate changes, then use their ratio, Pythagoras and their coordinate averages.
Answer. Gradient , length , midpoint .
Check. From to either endpoint the changes have magnitudes and , giving length : half the full segment.
The diagram shows why the same coordinate differences can give three different pieces of information.
[DIAGRAM: asset_name: Changes between two coordinates; asset_slug: straight-line-coordinate-triangle; caption: The horizontal change is 6 and the vertical change is 8, so the gradient is 8 divided by 6 and the distance is 10; description: Equal-scale coordinate axes show A at minus 2 comma 1 and B at 4 comma 9, joined by a blue segment. A dashed right triangle has horizontal side 6 and vertical side 8. The midpoint M at 1 comma 5 is marked, and AB is labelled 10.]

Now reverse the vertical change while keeping the same horizontal change.
Worked example 2: a falling segment
Question. Find the same three quantities for and .
Plan. Keep the signs when calculating the gradient; square the changes for distance.
Answer. Gradient , length , midpoint .
Check. Reversing the order gives , the same gradient.
A horizontal line has zero vertical change and gradient . A vertical line has zero horizontal change, so its gradient is undefined: division by zero gives no real gradient. The distance and midpoint formulae still work for either type of segment, including distance zero when the points coincide.
Three forms of a line
Knowing the gradient tells us a line's direction, but many lines share that direction. One point fixes its position. If is on a non-vertical line with gradient , any other point on it satisfies .
Equations of a straight line
The first gives gradient and -intercept ; the second uses a known point. The third is a general form, with and not both zero. Each equation uses its own constants. These forms are not listed in MF19.
Rearranging changes the form, not the line. When , the general form gives , so its gradient is . Multiplying every term by the same nonzero constant also leaves the line unchanged.
Worked example 3: one point and a gradient
Question. Find the line through with gradient , in point-gradient, gradient-intercept and general forms.
Plan. Put the known point into point-gradient form, then rearrange.
Answer. , and .
Check. At , the intercept form gives . Increasing to increases to , a rise of for a run of .
If two points are given, calculate the gradient before choosing an equation form.
Worked example 4: two points
Question. Find the line through and , in the same three forms.
Plan. Obtain the gradient from the coordinate changes and use either point.
Answer. , and .
Check. Both points satisfy the final equation: and .
For a horizontal line, is fixed: through its equation is . For a vertical line, is fixed: through the same point its equation is . Both fit the general form. A vertical line cannot be written as with a real gradient.
Key idea
Choose the form that matches the information. A point and gradient fit point-gradient form directly; a vertical line needs .
Use a new point and a fractional gradient.
Parallel and perpendicular lines
Parallel lines have the same direction. Perpendicular lines meet at a right angle, so turning one direction through a quarter-turn gives the other. These geometric facts let us choose a new line's gradient before finding its equation.
For a direction with horizontal and vertical changes , a quarter-turn gives changes . When both gradients are defined and nonzero, they are and , whose product is .
Related gradients
Distinct non-vertical parallel lines have equal gradients. For two non-vertical perpendicular lines,
A horizontal line and a vertical line are perpendicular; two distinct vertical lines are parallel. These relationships are not listed in MF19.
Equal gradients and equal intercepts describe the same line, rather than two distinct parallel lines. To find where two different lines meet, solve their equations simultaneously: the intersection must satisfy both.
Worked example 5: a parallel line and an intersection
Question. A line through is parallel to . Find its equation and its intersection with .
Plan. Read the reference gradient after rearranging, then equate the two expressions for .
The reference line is , so the required gradient is :
At the intersection, , so , and .
Answer. The required line is ; its intersection with is .
Check. lies on ; its gradient matches the reference line. At , both intersection equations give .
Keep the same point and reference line, but change the relationship to perpendicular.
Worked example 6: a perpendicular line and its foot
Question. A line through is perpendicular to . Find its equation and where it meets that reference line.
Plan. Use gradient , then solve together with .
so .
Answer. , meeting the reference line at .
Check. Both equations give at ; the gradients multiply to , confirming a right angle.
Subtraction or substitution will both solve a pair of linear equations. If eliminating a variable leaves a false statement such as , there is no intersection; distinct parallel lines give this outcome. If the two equations reduce to the same equation, every point of that line satisfies both.
Quick Recap
- Coordinate changes give a gradient, a distance and a midpoint in different ways.
- One point and a gradient fix a non-vertical line; a vertical line has equation .
- Parallel gradients are equal. Perpendicular finite gradients multiply to ; horizontal and vertical lines form the separate boundary case.
- An intersection satisfies both equations, so substitute the answer into both as a check.