MathematicsCore20 min read

Introduction to Analytic Geometry

Lines as equations, and the standard distances worth memorising

This topic appears in:

01

The five forms of a straight line

A straight line has one equation but five costumes, and the exam expects you to change between them freely. The right choice depends entirely on what you have been given, and picking well can turn a five-line answer into a one-line one.

You are givenUse
gradient and y-intercepty = mx + c
gradient and any pointy − y₁ = m(x − x₁)
two pointsfind m first, then point-slope
both interceptsx/a + y/b = 1
a line to compare with anothergeneral form ax + by + c = 0
y = mx + c(gradient and y-intercept)y − y₁ = m(x − x₁)(gradient and one point)(y − y₁)/(y₂ − y₁) = (x − x₁)/(x₂ − x₁)(two points)x/a + y/b = 1(intercepts a and b)ax + by + c = 0(general form)in the general form the gradient is −a/b, and the line is vertical when b = 0
m
the gradientundefined for a vertical line
c
the y-interceptthe value of y when x = 0
a, b in the intercept form
the x- and y-interceptsneither may be zero
02

Angle between two lines

Two intersecting lines make two angles, supplementary to each other. The formula gives the acute one when you take the modulus, which is what "the angle between" normally means.

The two familiar special cases fall straight out of it. If the gradients are equal the numerator is zero, so the angle is zero and the lines are parallel. If m₁m₂ = −1 the denominator is zero, tan θ is undefined, and the angle is 90°.

tan θ = |(m₂ − m₁) / (1 + m₁m₂)|parallel: m₁ = m₂perpendicular: m₁m₂ = −1the modulus gives the acute angle; drop it and you get the signed angle from line 1 to line 2

Every formula in this chapter comes from the dashed right-angled triangle. Switch to Gradient and drag B until the run is zero — the gradient becomes undefined, and no formula involving m can be used on a vertical line.

03

Distance from a point to a line

This is the one genuinely new formula of the chapter, and it is worth memorising exactly. It gives the perpendicular distance — the shortest route from the point to the line.

Write the line in general form first, substitute the point into the left-hand side, and divide by the square root of the sum of the squares of the coefficients. The modulus makes the answer positive, as a distance must be.

d = |ax₁ + by₁ + c| / √(a² + b²)distance between parallel lines ax+by+c₁=0 and ax+by+c₂=0: |c₁ − c₂| / √(a² + b²)the line must be in the form ax + by + c = 0 before substituting — this is the step most often skipped
Worked example

Find the distance from the point (3, −2) to the line 4x − 3y + 5 = 0, and the equation of the line through that point perpendicular to it.

  1. The line is already in general form with a = 4, b = −3, c = 5.If it had been written y = ..., rearranging first is compulsory.
  2. Substitute: |4(3) − 3(−2) + 5| = |12 + 6 + 5| = 23.Careful with the double negative — −3 × −2 is +6.
  3. √(16 + 9) = 5, so d = 23/5 = 4.6 units.A 3–4–5 coefficient pair is a common examiner choice because the square root is exact.
  4. Gradient of the given line: −a/b = −4/(−3) = 4/3. The perpendicular gradient is −3/4.Negative reciprocal — flip and change sign.
  5. Through (3, −2): y + 2 = −(3/4)(x − 3), so 3x + 4y − 1 = 0.Multiply out and clear the fraction to reach general form.

Distance 4.6 units; perpendicular line 3x + 4y − 1 = 0

04

Dividing a segment, and the centroid

The section formula generalises the midpoint. A point dividing AB internally in the ratio m : n — meaning it is m parts of the way along out of m + n — has coordinates given by a weighted average. The midpoint is the case m = n = 1.

Applying it to a triangle gives the centroid, the point where the three medians meet. It divides each median in the ratio 2 : 1 from the vertex, and its coordinates are simply the averages of the three vertices.

internal division m:n = ( (m x₂ + n x₁)/(m + n) , (m y₂ + n y₁)/(m + n) )external division m:n = ( (m x₂ − n x₁)/(m − n) , (m y₂ − n y₁)/(m − n) )centroid of a triangle = ( (x₁+x₂+x₃)/3 , (y₁+y₂+y₃)/3 )note the cross-over: the m goes with the second point, not the first

The weights cross over

For the ratio m : n the numerator is m x₂ + n x₁ — the larger weight attaches to the further point. Sanity-check with a 3 : 1 division of the segment from (0,0) to (8,0): the answer should be (6, 0), close to the far end. Writing the weights the other way round gives (2, 0) and the wrong end of the line.

Before you leave this chapter

  1. Choose the form of the line equation that matches what you are given.
  2. In ax + by + c = 0 the gradient is −a/b.
  3. tan θ = |(m₂ − m₁)/(1 + m₁m₂)|; zero numerator means parallel, zero denominator means perpendicular.
  4. Perpendicular distance = |ax₁ + by₁ + c| / √(a² + b²), with the line in general form first.
  5. Section formula weights cross over; the centroid is the average of the three vertices.
06

Families of lines, and testing for concurrency

Given two lines L₁: a₁x + b₁y + c₁ = 0 and L₂: a₂x + b₂y + c₂ = 0 that intersect, the expression L₁ + kL₂ = 0 represents, for every value of k, a line through their point of intersection. That is useful because it lets you write down such a line without first finding the intersection.

Three lines are concurrent when they all pass through one common point. The direct test is to find where two of them meet and check that the third passes through it; the determinant form does the same thing in one calculation.

family through the intersection of L₁ and L₂: L₁ + k L₂ = 0concurrent when | a₁ b₁ c₁ ; a₂ b₂ c₂ ; a₃ b₃ c₃ | = 0the family misses L₂ itself, which corresponds to k → ∞
Worked example

Find the line through the intersection of x + y − 4 = 0 and 2x − y − 2 = 0 that also passes through (3, 5).

  1. Write the family: (x + y − 4) + k(2x − y − 2) = 0.Any member of this family passes through the intersection, whatever k is.
  2. Substitute the extra point (3, 5): (3 + 5 − 4) + k(6 − 5 − 2) = 0.The condition of passing through one more point fixes k.
  3. 4 + k(−1) = 0, so k = 4.
  4. The line is (x + y − 4) + 4(2x − y − 2) = 0, that is 9x − 3y − 12 = 0, or 3x − y − 4 = 0.Check: 3(3) − 5 − 4 = 0 ✓, and the intersection (2, 2) also satisfies it ✓

3x − y − 4 = 0

07

The equation of a circle

A circle is the set of points a fixed distance from a fixed point. Writing that sentence with the distance formula produces the equation directly: if the centre is (a, b) and the radius is r, then every point (x, y) on the circle satisfies √((x−a)² + (y−b)²) = r. Squaring both sides removes the root and gives the standard form.

Read the other way, the standard form hands you the centre and radius by inspection — which is why getting an equation into that shape is almost always the first move.

(x − a)² + (y − b)² = r²centre (a, b), radius rexpanded: x² + y² + 2gx + 2fy + c = 0centre (−g, −f), radius √(g² + f² − c)the signs flip: (x − 3)² means the centre is at +3
(a, b)
the centrethe signs flip: (x − 3)² means a centre at +3
r
the radiusthe right-hand side is r², not r
g, f, c
expanded-form constantsa circle needs equal x² and y² terms and no xy term
Worked example

Find the centre and radius of the circle x² + y² − 6x + 4y − 12 = 0.

  1. Group the x terms and the y terms: (x² − 6x) + (y² + 4y) = 12.Completing the square is done on each variable separately.
  2. Complete the square: (x − 3)² − 9 + (y + 2)² − 4 = 12.Half the coefficient, then squared: half of −6 is −3, and (x−3)² overshoots by 9, so subtract it back.
  3. Tidy: (x − 3)² + (y + 2)² = 25.Moving the −9 and −4 across gives 12 + 9 + 4 = 25.
  4. Centre (3, −2), radius 5.Read straight off the standard form, remembering both signs flip. The radius is √25, not 25.

Centre (3, −2), radius 5

Two things that are not radii

The right-hand side of the standard form is , not r — so a circle ending = 16 has radius 4. And if completing the square leaves a negative number on the right, no circle exists at all, since no real point can be a negative distance from the centre.

08

Where a line meets a curve

To find where a line meets a circle — or any curve — substitute the line into the curve. The result is a quadratic in one variable, and the number of intersections is decided entirely by its discriminant.

This turns a geometric question into an algebraic one. "Show that the line is a tangent" does not require any geometry: it requires showing that the resulting quadratic has a repeated root.

DiscriminantRootsGeometry
b² − 4ac > 0two distinctthe line cuts the circle twice
b² − 4ac = 0one repeatedthe line is a tangent
b² − 4ac < 0none realthe line misses the circle entirely

Circle facts that shortcut the algebra

  1. A tangent is perpendicular to the radius at the point of contact — so gradient of radius × gradient of tangent = −1.
  2. The perpendicular from the centre to a chord bisects that chord.
  3. The angle in a semicircle is a right angle, so if a question gives a diameter, look for 90°.
  4. The distance from the centre to a tangent line is exactly r — often faster than a discriminant.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Find the gradient of the line 5x − 2y + 7 = 0.
Model answer

Using m = −a/b = −5/(−2) = 5/2. Rearranging confirms it: 2y = 5x + 7, so y = (5/2)x + 3.5.

Examiner tip. The shortcut −a/b is fast but easy to mis-sign. If you have any doubt, rearrange to y = mx + c — it takes one extra line.

SQ2[2 marks]
Write the equation of the line with x-intercept 4 and y-intercept −3.
Model answer

Intercept form: x/4 + y/(−3) = 1, which rearranges to 3x − 4y = 12.

Examiner tip. The intercept form saves finding the gradient first. Remember to give the answer in a tidy form with integer coefficients.

SQ3[2 marks]
State the condition for two lines to be perpendicular, and give an example.
Model answer

Their gradients multiply to −1, so each is the negative reciprocal of the other. Example: y = 2x and y = −x/2, since 2 × (−1/2) = −1.

Examiner tip. A vertical and a horizontal line are also perpendicular, and they are the one case the formula cannot express because one gradient is undefined.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Find the perpendicular distance from (−1, 4) to the line 3x + 4y − 10 = 0.
Full working
  1. Identifies a = 3, b = 4, c = −10, with the line already in general form[1]
  2. Substitutes the point: 3(−1) + 4(4) − 10 = −3 + 16 − 10 = 3[1]
  3. √(9 + 16) = 5[1]
  4. d = |3|/5 = 0.6 unitsthe modulus makes the distance positive[1]

0.6 units

Examiner tip. Take the modulus of the numerator only, after substituting. Taking it too early loses the sign information you may still need in a "which side of the line" question.

N2[4 marks]
Find the acute angle between the lines y = 3x + 1 and y = −2x + 5.
Full working
  1. m₁ = 3 and m₂ = −2[1]
  2. tan θ = |(−2 − 3)/(1 + (3)(−2))| = |−5/−5|both numerator and denominator are negative[1]
  3. = 1[1]
  4. θ = 45°[1]

45°

Examiner tip. The modulus is what guarantees the acute angle. Without it you might get −45°, which is the same pair of lines described from the other side.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
The triangle ABC has vertices A(1, 2), B(7, 4) and C(3, 8).
  1. Find the equation of the median from A.
  2. Find the coordinates of the centroid.
  3. Find the perpendicular distance from C to the line AB.
Mark scheme
  1. Midpoint of BC = ((7+3)/2, (4+8)/2) = (5, 6)a median joins a vertex to the midpoint of the opposite side[1]
  2. Gradient of the median = (6 − 2)/(5 − 1) = 1, so y − 2 = 1(x − 1), giving y = x + 1[1]
  3. Centroid = ((1+7+3)/3, (2+4+8)/3) = (11/3, 14/3)average of the three vertices[1]
  4. Gradient of AB = (4 − 2)/(7 − 1) = 1/3, so AB is x − 3y + 5 = 0from y − 2 = (1/3)(x − 1), cleared of fractions[1]
  5. Substituting C(3, 8): |3 − 24 + 5| = 16[1]
  6. d = 16/√(1 + 9) = 16/√10 = 5.06 unitsaccept 16√10/10[1]

(a) y = x + 1 (b) (11/3, 14/3) (c) 16/√10 ≈ 5.06 units

Examiner tip. The centroid must lie on every median. Check that (11/3, 14/3) satisfies y = x + 1: 11/3 + 1 = 14/3 ✓ — a free verification of both parts at once.