You are on page 1of 8

4/26/23, 12:02 PM How to calculate the intersection points of two circles |

How to calculate the intersection points of


two circles

The aim of this page is to calculate the coordinates on the intersection points between two circles C1 and C2 .

Here are our hypotheses:


center of circle C1 is P 1 = (x 1 , y 1 )

center of circle C2 is P 2 = (x 2 , y 2 )

radius of circle C1 is r1

radius of circle C2 is r2

Our goal is to calculate the coordinates of the intersection points P3 and P4 as a function of P1 , P2 , r1 and r2 .
https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 1/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |

# Intermediate steps

Here are the intermediate steps for computing the intersection points:
1. Calculating the distance d between circle centers
2. Checking cases
3. Calculating the length of a and b

4. Calculation of h
5. Calculating the coordinates of P5


−→ →
6. Calculation of vectors P5 P3 and P5 P4

7. calculating the coordinates of P3 and P4

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 2/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |

# Distance between centers


Let's start by calculating the d , the distance between the centers. By applying the Pythagorean theorem we can write:

2 2
d = √ (x 2 − x 1 ) + (y 2 − y 1 ) (1)

# Checking cases
According to the values of d , we now have five cases:
if d > r1 + r2 the circles are too far apart and do not intersect;
if d < |r 1 − r 2 | one circle is inside the other and do not intersect;
if d = 0 and r1 = r2 the circles are merged and there are an infinite number of points of intersection;
if d = r1 + r2 there is a single intersection point;
if d < r1 + r2 there are two intersection points.

d > r1 + r2 d < |r 1 − r 2 |

Circles are too far apart and do not intersect One circle is inside the other and do not intersect

d = 0 and r1 = r2 d = r1 + r2

Circles are merged and there are an infinite number of points of intersection There is a single intersection point

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 3/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |

# Calculating a and b
To calculte the distance a let's start by writing h as a function of a and b . In the right triangles P1 P5 P3 the Pythagorean theorem gives:

2 2 2
r = h + a (2)
1

We can apply the theorem in the right triangle P2 P5 P3 :

2 2 2
r2 = h + b (3)

By substituting (3) to (2) we get the following equation:

2 2 2 2
r1 − r2 = a − b (4)

Since d = a + b , we can write the folowing system of two equations:

2 2 2 2
r1 − r2 = a − b
{ (5)
d = a + b

By injecting b = d − a in equation (4) , we obtain the following relation:

2 2 2 2
r − r = a − (d − a) (6)
1 2

The –a
2
terms on each side cancel out. You can then solve for a :

2 2 2 2 2
r − r = a − d − a + 2ad
1 2

2 2 2
r − r = −d + 2ad (7)
1 2

2 2 2
2ad = r − r + d
1 2

We get :

2 2 2
r − r + d
1 2
a = (8)
2d

Similarly in the triangle P2 P5 P3 :

2 2 2
r − r + d
2 1
b = (9)
2d

All of these values are known:


r1 and r2 are the radius of the circles
d has been calculated by equation (1)

# Calculation of h
Once a and b are know, it becomes easy to calculate the length h by apoplying the Pythagorean theorem in the right triangles P1 P5 P3

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 4/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |
2 2 2
r = h + a (10)
1

2 2
h = √r − a (11)
1

# Coordinates of P5
The next step is to calculate the coordinates of P5 .

Calculate the coordinates of P5


−→ →
Since the vectors P1 P5 and P1 P2 are colinear, we can write:


− → a →
P1 P5 = × P1 P2 (12)
d

We can deduce the coordinates of P5 :

a
x5 = x1 + × (x 2 − x 1 )
d
(13)
a
y5 = y1 + × (y 2 − y 1 )
d

# Vectors P5P3 and P5P4




−→ → →
The second to last step is the calculation of vectors P5 P3 and P5 P4 . Let's consider the vector P1 P2 given by the following relation:

− → x2 − x1
P1 P2 = ( ) (14)
y2 − y1

By multiplying this vector by a rotation matrix around the z-axis, we can calculate the perpendicular vectors:

Clockwise

⊥↻
− → 0 1 x2 − x1 y2 − y1
P1 P2 = ( ) × ( ) = ( ) (15)
−1 0 y2 − y1 x1 − x2

Counterclockwise

− → 0 −1 x2 − x1 y1 − y2
⊥↺
P1 P2   = ( ) × ( ) = ( ) (16)
1 0 y2 − y1 x2 − x1



−→ → →
We already calculated the norm of vector ∥P 1 P 2 ∥ = d and norm of vectors ∥P 5 P 3 ∥ = ∥P 5 P 4 ∥ = h .

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 5/8



h




−→

P5 P3


P5 P4



P1 P2

=
=

d
h

d

P5 P3


× P1 P2

P5 P4


× P1 P2

=
4/26/23, 12:02 PM

⊥↺


By applyting the ratio

=


h(y 2 − y 1 )

d
d

h(x 1 − x 2 )

h(y 1 − y 2 )

h(x 2 − x 1 )

finally get:

and

(18)
(17)

# Intersection points
Once the vectors P5 P3

We can even rewrite this answer:


to the vectors

and P5 P4

we can deduce the expressions of vectors

are known, the coordinates of

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/
P3 =

P4 =

x5 −

⎝y5 +


x5 +

⎝y5 −

x = x5   ±  

y =y 5   ±  
⊥↻

P3 and

⎜⎟
How to calculate the intersection points of two circles |

h(y 2 − y 1 )

h(x 2 − x 1 )

h(y 2 − y 1 )

h(x 2 − x 1 )

h(y 2 − y 1 )

h(x 2 − x 1 )

d
P4


d

can be deduced by translating


and

P3 from these vectors. We

(19)

(20)

(21)

6/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |

___

Job Oriented Specialisations


Get Counselling to Choose the Right Courses, Universities to get Right Career Disha

SPONSORED BY UPGRADDISHA Learn More

# Download
Here is the Matlab script used to check the results from this page:

circle_circle_intersection.m

Matlab confirmation of the calculation of the intersection points of two circles


 

# See also
Calculating the transformation between two set of points
Catmull-Rom splines
Check if a number is prime online
Check if a point belongs on a line segment
Cross product
Common derivatives rules
Common derivatives
Dot product
How to check if four points are coplanar?
Common integrals (primitive functions)
Least square approximation with a second degree polynomial
Least-squares fitting of circles
Least-squares fitting of sphere
The mathematics behind PCA
Online quadratic equation solver
Online square root simplifyer
Sines, cosines and tangeantes of common angles
Singular value decomposition (SVD) of a 2×2 matrix
Tangent line segments to circles
Understanding covariance matrices
Weighted PCA

Last update : 04/04/2023

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 7/8
4/26/23, 12:02 PM How to calculate the intersection points of two circles |

P.C Chandra Jewellers 14KT (585) BIS Hallmark Yellow


Gold Butterfly Stud Earrings For Women - 0.47 Grams
₹ 3,080 00

Soutenez le blog de Lulu sur Tipee. Support Lulu's blog on Tipeee

https://lucidar.me/en/mathematics/how-to-calculate-the-intersection-points-of-two-circles/ 8/8

You might also like