Intersection of a circle and a line

We look at how many times a line meets the circle x2+y2=25x^2 + y^2 = 25, which has its centre at the origin and radius 55.

Two ways to tell the cases apart

  • Substitute the line into the circle equation and count the real solutions
  • Compare the distance dd from the centre to the line with the radius rr

Both give the same answer, and the second needs no algebra at all.

DistanceSolutionsThe line and the circle
d<rd < rtwocut at two points
d=rd = rone repeatedare tangent
d>rd > rnonedo not meet

Three horizontal lines

LineEquation in xxddResult
y=3y = 3x2=16x^2 = 1633cuts at (±4,3)(\pm 4, 3)
y=5y = 5x2=0x^2 = 055tangent at (0,5)(0, 5)
y=7y = 7x2=24x^2 = -2477no intersection

For y=5y = 5 the two intersection points have merged into one, which is what tangency means. For y=7y = 7 no real number squares to a negative value, so there is no real solution.

Sliding the line

If you slide a horizontal line upward, these three cases appear in turn: while the line passes through the inside of the circle there are two crossings, as it moves up the two crossings come closer, at the edge of the circle they merge into a single point, and higher still the line leaves the circle. You can also see it as the distance from the centre growing until, past the radius, the crossings disappear.

The number of real solutions found by substitution matches the three cases exactly. The large dots on the graph mark the points of intersection and tangency.

  1. Circle, Wikipedia