VOOZH about

URL: https://www.geeksforgeeks.org/dsa/area-circumscribed-circle-square/

⇱ Area of a Circumscribed Circle of a Square - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Area of a Circumscribed Circle of a Square

Last Updated : 2 Sep, 2024

Given the side of a square then find the area of a Circumscribed circle around it.
Examples: 

Input : a = 6
Output : Area of a circumscribed circle is : 56.55

Input : a = 4
Output : Area of a circumscribed circle is : 25.13



All four sides of a square are of equal length and all four angles are 90 degree. The circle is circumscribed on a given square shown by a shaded region in the below diagram. 

👁 circle-square


Properties of Circumscribed circle are as follows:

  • The center of the circumcircle is the point where the two diagonals of a square meet.
  • Circumscribed circle of a square is made through the four vertices of a square.
  • The radius of a circumcircle of a square is equal to the radius of a square.


Formula used to calculate the area of inscribed circle is: 
(PI * a * a)/2
where, a is the side of a square in which a circle is circumscribed.
How does this formula work?
We know area of circle =
We also know radius of circle = (square diagonal)/2 
Length of diagonal = (2*a*a) 
Radius = (2*a*a)/2 = ((a*a)/2) 
Area = PI*r*r = (PI*a*a)/2



Output
 Area of an circumscribed circle is : 56.55 

Time Complexity: O(1)
Auxiliary Space: O(1)

Comment