✖

Position of a line relative to a circle

A line and a circle can meet in the plane in only three ways. Either the line cuts the circle at two points, and then we call it a secant. Or it just touches the circle at a single point, and that is a tangent. Or it passes by the circle completely, so they have no point in common, and it is an exterior line. There are no other possibilities: a line cannot have three points in common with a circle. A nice example of a tangent is a bicycle wheel standing on the road: it touches the road at a single point.

A circle with centre S, a secant p, a tangent t and an exterior line q

In the picture, the blue line p is a secant, the red line t is a tangent and the green line q is an exterior line. The common points are highlighted in orange. All three lines are parallel and differ only in their distance from the centre S. And that distance is exactly what matters.

Using the distance from the centre

The distance from the centre to a line is the length of the shortest path from the centre to the line. That path always runs at a right angle: we drop a perpendicular from the centre to the line and measure the segment from the centre to the point where the perpendicular meets the line. Any other point of the line is further from the centre, because the segment to it is the hypotenuse of a right-angled triangle, and the hypotenuse is longer than either leg. In the picture these perpendiculars are grey and dashed, and the right angle at each line is marked with an arc and a dot.

Let d be the distance from the centre to the line, and compare it with the radius r:

  • d < r — the line is closer to the centre than the radius, so it goes into the circle and out again. It is a secant.
  • d = r — the line just touches the circle. It is a tangent.
  • d > r — the line is further from the centre than the circle reaches. It is an exterior line.

For a tangent, the perpendicular passes exactly through the point of tangency, which is why a tangent is always perpendicular to the radius drawn to the point of tangency.

We find the distance from the centre to the line using the formula for the distance from a point to a line. For the point S(m, n) and the line ax + by + c = 0:

d=|a⋅m+b⋅n+c|a2+b2

The formula needs the line in general form. If it is given as, say, y = x + 1, we must first rearrange it to x − y + 1 = 0, otherwise we substitute the wrong numbers.

Let’s try the formula on the circle x2 + y2 = 25 and the line 3x − 4y − 25 = 0. By the equation of a circle, the circle has its centre at the origin S(0, 0) and radius r=25=5. From the equation of the line we read a = 3, b = −4 and c = −25 and substitute:

d=|3⋅0−4⋅0−25|32+(−4)2=|−25|9+16

And finish the calculation:

d=2525=255=5

We got 5, which is exactly the radius, so the line is a tangent to the circle.

The circle x^2+y^2=25, the line 3x-4y-25=0 and its distance d from the centre S

The distance d is shown in red. The perpendicular from the centre is exactly as long as the radius, so it ends right on the circle, at the point T where the line touches the circle.

This method is quick and is useful when all we need to know is how the line lies relative to the circle. But it does not tell us exactly where the line crosses or touches the circle. For that we have to calculate.

Working out the common points

A common point of the line and the circle has to satisfy both equations at the same time, so we solve a pair of simultaneous equations, just as with the relative position of two lines: we rearrange the equation of the line to make one unknown the subject and substitute it into the equation of the circle. We get a quadratic equation, and the line has as many points in common with the circle as the equation has solutions. The number of solutions is given by the discriminant:

  • D > 0 — two solutions, the line is a secant,
  • D = 0 — one (repeated) solution, the line is a tangent,
  • D < 0 — no solutions, it is an exterior line.

The circle x^2+y^2=25, a secant p through the points P and Q, and a tangent t with the point of tangency T

First example: We have the circle x2 + y2 = 25 and the line y = x + 1. We substitute x + 1 for y in the equation of the circle:

x2+(x+1)2=25

Expand the bracket:

x2+x2+2x+1=25

Collect terms and move everything to the left-hand side:

2x2+2x−24=0

Divide the whole equation by two:

x2+x−12=0

Work out the discriminant:

D=12−4⋅1⋅(−12)=1+48=49

The discriminant is positive, so the line is a secant. The roots are

x1,2=−1±492=−1±72,

so x1 = 3 and x2 = −4. We are not finished yet: we are looking for whole points, not just their first coordinates. The second coordinates come from the equation of the line y = x + 1: for x = 3 we get y = 4 and for x = −4 we get y = −3. The line therefore cuts the circle at the points P(3, 4) and Q(−4, −3).

Check for the point P: 32 + 42 = 9 + 16 = 25. It works, the point lies on the circle.

Second example: Let’s take the line 3x − 4y = 25 from the previous section again. We already know it is a tangent, so what remains is to find the point of tangency. First we make y the subject:

y=3x−254

Substitute into the equation of the circle:

x2+(3x−254)2=25

Square the fraction, numerator and denominator separately:

x2+9x2−150x+62516=25

To get rid of the fraction, multiply the whole equation by sixteen:

16x2+9x2−150x+625=400

Collect like terms and move them to the left-hand side:

25x2−150x+225=0

Divide by twenty-five:

x2−6x+9=0

Discriminant:

D=(−6)2−4⋅1⋅9=36−36=0

Zero, so the line is a tangent. We already knew that, but it is good to see that both methods reach the same result. The single (repeated) root is x=62=3, and substituting into y=3x−254 gives y=9−254=−4. The point of tangency is T(3, −4).

Third example: Let’s try the line y = x + 10. Substituting into x2 + y2 = 25 gives the equation 2x2 + 20x + 75 = 0 and the discriminant D = 202 − 4 · 2 · 75 = 400 − 600 = −200. A negative discriminant means the equation has no solutions, and so it is an exterior line.

Chapters: Equation of a circle, Position of a line relative to a circle