Academy
Formulas/maths/Circles/Position of a Point Relative to a Circle

Position of a Point Relative to a Circle

For circle S = 0 and point P(x₁, y₁): S₁ > 0 ⟹ P outside; S₁ = 0 ⟹ P on the circle; S₁ < 0 ⟹ P inside.
Derivation

Let the circle be Sx2+y2+2gx+2fy+c=0S \equiv x^2 + y^2 + 2gx + 2fy + c = 0, with centre C(g,f)C(-g, -f) and radius r=g2+f2cr = \sqrt{g^2 + f^2 - c}.

For point P(x1,y1)P(x_1, y_1), define:

S1=x12+y12+2gx1+2fy1+cS_1 = x_1^2 + y_1^2 + 2gx_1 + 2fy_1 + c

The distance from CC to PP is d=(x1+g)2+(y1+f)2d = \sqrt{(x_1+g)^2 + (y_1+f)^2}.

Expanding d2d^2:

d2=x12+2gx1+g2+y12+2fy1+f2=S1+(g2+f2c)=S1+r2d^2 = x_1^2 + 2gx_1 + g^2 + y_1^2 + 2fy_1 + f^2 = S_1 + (g^2 + f^2 - c) = S_1 + r^2

Therefore d2r2=S1d^2 - r^2 = S_1.

  • S1>0d>rPS_1 > 0 \Rightarrow d > r \Rightarrow P is outside the circle
  • S1=0d=rPS_1 = 0 \Rightarrow d = r \Rightarrow P is on the circle
  • S1<0d<rPS_1 < 0 \Rightarrow d < r \Rightarrow P is inside the circle

This is the standard test. It avoids computing dd explicitly — only the sign of S1S_1 matters.