Straight lines in coordinate geometry
A straight line has a constant gradient. Its equation records two pieces of information: how steeply the line rises or falls, and where it is positioned in the coordinate plane.
Straight-line methods support later work on circles, tangents, vectors, calculus and mathematical modelling. The formulae are short, but accurate reasoning about signs, vertical lines and context matters.
Before you begin
Section titled “Before you begin”You should be able to:
- substitute signed numbers into an expression
- rearrange linear equations
- solve simultaneous linear equations
- use Pythagoras’ theorem
Gradient between two points
Section titled “Gradient between two points”For distinct points and with , the gradient is
Gradient measures change in per unit change in :
Use the same subtraction order in the numerator and denominator. Reversing both differences gives the same result; reversing only one changes the sign incorrectly.
Example 1: calculate a gradient
Section titled “Example 1: calculate a gradient”Find the gradient of the line through and .
The negative sign agrees with the geometry: as increases from to , decreases.
If , the denominator is zero and the line is vertical. Its gradient is undefined and its equation has the form
A horizontal line has gradient and equation .
Forms of a line equation
Section titled “Forms of a line equation”Different forms make different information visible.
Gradient-intercept form
Section titled “Gradient-intercept form”
Here is the gradient and is the intercept, the value of when .
Point-gradient form
Section titled “Point-gradient form”A line of gradient through is
This is usually the quickest form when a point and gradient are known. It also avoids finding as a separate step.
General form
Section titled “General form”
where and are not both zero. If , rearranging gives
so the gradient is . General form also includes vertical lines, for which .
All three forms can describe the same line. For example,
and
are equivalent.
Forming an equation
Section titled “Forming an equation”Example 2: a point and a gradient
Section titled “Example 2: a point and a gradient”Find the equation of the line through with gradient .
Substitute into point-gradient form:
Therefore
If gradient-intercept form is required,
Check the point: substituting gives .
Example 3: a line through two points
Section titled “Example 3: a line through two points”Find the equation through and .
First find the gradient:
Use either point:
Hence
Substituting both original points is a quick final check.
Parallel lines
Section titled “Parallel lines”Distinct parallel non-vertical lines have equal gradients:
Vertical lines are also parallel to one another, although their gradients are undefined.
Example 4: a parallel line
Section titled “Example 4: a parallel line”Find the line through parallel to
Rearrange the given line:
Its gradient is . The required line is
or .
Alternatively, a parallel line in general form must have matching and coefficients up to a common factor, so it can be written . Substituting gives .
Perpendicular lines
Section titled “Perpendicular lines”For two non-vertical, non-horizontal perpendicular lines,
Thus the perpendicular gradient to is
This is the negative reciprocal. Both operations matter.
Special cases must be handled geometrically:
- a horizontal line is perpendicular to a vertical line
- a vertical line is perpendicular to a horizontal line
Example 5: a perpendicular bisector
Section titled “Example 5: a perpendicular bisector”Find the perpendicular bisector of the segment joining and .
The midpoint is
The gradient of is
The perpendicular gradient is . Therefore the perpendicular bisector is
This construction is important for finding the centre of a circle through known points.
Intersections
Section titled “Intersections”At an intersection, the coordinates satisfy both line equations. Solve the equations simultaneously.
Example 6: find an intersection
Section titled “Example 6: find an intersection”Find where
and
intersect.
From the first equation,
Substitute into the second:
Then
The intersection is
Two distinct parallel lines have no intersection. Equivalent equations describe the same line and therefore have infinitely many common points.
Distance and midpoint
Section titled “Distance and midpoint”The distance between and follows from Pythagoras:
The midpoint is
Example 7: distance and midpoint
Section titled “Example 7: distance and midpoint”For and ,
=\sqrt{6^2+8^2}=10,$$ and $$M=\left(\frac{-4+2}{2},\frac{1+9}{2}\right)=(-1,5).$$ Distance is never negative. Squaring coordinate differences ensures their signs do not affect the length. ## Distance from a point to a line For the line $$Ax+By+C=0,$$ the perpendicular distance from $(x_0,y_0)$ is $$\boxed{d=\frac{|Ax_0+By_0+C|}{\sqrt{A^2+B^2}}}.$$ The absolute value is essential because distance is non-negative. The denominator accounts for the scale of the equation: multiplying the whole line equation by a constant must not change the geometric distance. ### Example 8: point-to-line distance Find the distance from $P(3,-1)$ to $$4x-3y-6=0.$$ Substitute into the formula: $$d=\frac{|4(3)-3(-1)-6|}{\sqrt{4^2+(-3)^2}} =\frac{|9|}{5} =\boxed{\frac95}.$$ This formula is particularly useful for distances from circle centres to lines and for deciding whether a line meets a circle. ## Straight-line models A model of the form $$y=mx+c$$ assumes a constant rate of change. In context: - $m$ is the predicted change in $y$ for each one-unit increase in $x$ - $c$ is the predicted value of $y$ when $x=0$ The units belong in the interpretation. If $x$ is time in hours and $y$ is volume in litres, then $m$ is measured in litres per hour. ### Example 9: interpret a model The temperature $T$ in degrees Celsius of a cooling liquid is modelled for the first ten minutes by $$T=84-3.6t,$$ where $t$ is time in minutes. The intercept $84$ predicts an initial temperature of $84^\circ\text{C}$. The gradient $-3.6$ predicts that the temperature falls by $3.6^\circ\text{C}$ per minute. At $t=7$, $$T=84-3.6(7)=58.8,$$ so the model predicts $58.8^\circ\text{C}$. Setting $T=0$ gives $t=84/3.6\approx23.3$ minutes, but this lies outside the stated ten-minute interval. It would also be physically unrealistic for a simple cooling process to continue linearly without limit. ### Limitations of a linear model Before using or extrapolating a straight-line model, ask: - Is a constant rate plausible throughout the interval? - Does the prediction remain within a physically meaningful range? - Is the input inside the range from which the model was built? - Does the intercept have a meaningful interpretation in context? - Could another variable be affecting the relationship? A good calculation can still produce a poor prediction if the model's assumptions are unsuitable. ## Common mistakes - Mixing subtraction orders in the gradient formula. - Reading $c$ as the $x$ intercept in $y=mx+c$. - Assuming two lines are parallel because their intercepts are equal. - Taking only the reciprocal, rather than the negative reciprocal, for a perpendicular gradient. - Trying to assign a finite gradient to a vertical line. - Finding the midpoint by subtracting coordinates instead of averaging them. - Dropping the absolute value in the point-to-line distance formula. - Giving a model gradient without its contextual units. - Extrapolating a model far beyond its stated domain without comment. ## Check your understanding 1. Find the equation of the line through $(-2,5)$ and $(4,-7)$. 2. Find the line through $(1,3)$ perpendicular to $3x+2y=8$. 3. Find the intersection of $y=3x-4$ and $2x+y=11$. 4. Find the perpendicular bisector of the segment joining $(2,-1)$ and $(8,3)$. 5. Find the distance from $(-2,4)$ to $5x+12y-9=0$. 6. A taxi fare is modelled by $C=3.20+1.85d$, where $C$ is cost in pounds and $d$ is distance in miles. Interpret both constants and predict the fare for $7$ miles. <details> <summary>Answers</summary> ### 1 $$m=\frac{-7-5}{4-(-2)}=-2.$$ Using $(-2,5)$, $$\boxed{y-5=-2(x+2)},$$ or $y=-2x+1$. ### 2 Rearranging the given line gives $y=-3x/2+4$, so its gradient is $-3/2$. The perpendicular gradient is $2/3$: $$\boxed{y-3=\frac23(x-1)}.$$ ### 3 Substitute $y=3x-4$ into $2x+y=11$: $$2x+3x-4=11,$$ so $x=3$ and $y=5$. The intersection is $\boxed{(3,5)}$. ### 4 The midpoint is $(5,1)$. The segment gradient is $4/6=2/3$, so the perpendicular gradient is $-3/2$: $$\boxed{y-1=-\frac32(x-5)}.$$ ### 5 $$d=\frac{|5(-2)+12(4)-9|}{\sqrt{5^2+12^2}} =\frac{29}{13}.$$ ### 6 The fixed charge is £3.20 and the cost increases by £1.85 per mile. For $d=7$, $$C=3.20+1.85(7)=\boxed{£16.15}.$$ </details> ## What to learn next Continue to [circles](/learn/coordinate-geometry/circles/) to combine line equations with radii, chords and tangents. Then study [parametric equations](/learn/coordinate-geometry/parametric-equations/) to represent curves and motion using a third variable.