StatGardenREF. DESK
Calculators/Maths/Intersection of a circle and a line
Maths

Intersection of a circle and a line calculator

Where a line y = mx + c crosses a circle centred at (h, k).

What this calculator does

Intersection of a circle and a line works out where a line y = mx + c crosses a circle centred at (h, k). Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

FormulaSubstitute the line into (x−h)²+(y−k)²=r² to get a quadratic Ax²+Bx+C=0 with A=1+m², B=2(m(c−k)−h), C=h²+(c−k)²−r²

The inputs explained

FieldWhat to enter
Circle centre hA number. Starts at 0.
Circle centre kA number. Starts at 0.
Radius rA number. Starts at 5.
Line slope mA number. Starts at 1.
Line y-intercept cA number. Starts at 0.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with circle centre h

Every other input is held at the calculator’s starting values while circle centre h varies. Select any row to load that scenario into the calculator.

How the answer changes with circle centre h
Circle centre hPoint 1Point 2Discriminant
1(4.000, 4.000)(-3.000, -3.000)196.000
2(4.391, 4.391)(-2.391, -2.391)184.000
5(5.000, 5.000)(0, 0)100.000
10No intersection: the line misses the circle-200.000N/A
20No intersection: the line misses the circle-1,400.00N/A
50No intersection: the line misses the circle-9,800.00N/A