# Pi — The Diameter That Wraps Around
<video src="https://askrobots.com/files/public/396fe289-0fac-4015-bb62-fb05ee3bce33/" controls width="100%" style="border-radius:8px;margin:1rem 0"></video>
## Plain English first
Take any circle. Pull the diameter out — the straight line through the center, edge to edge.
Now lay that diameter along the edge of the circle and mark where it ends. Pick it up and start again from that mark. Do it again. After three full lengths, you haven't quite made it around — a short arc is left over.
That leftover arc is 0.14159... of a diameter long.
So the circumference is always 3.14159... diameters. That number — 3.14159... — is **pi**. It never changes for any circle, any size. Pi is the ratio of the circumference to the diameter. Always.
---
## Standard math notation
```
π = C / d (definition: circumference ÷ diameter)
Rearranged:
C = πd (circumference from diameter)
C = 2πr (circumference from radius, since d = 2r)
π ≈ 3.14159265358979... (irrational — decimal never repeats or ends)
```
---
## Verbose Python with descriptive names
```python
PI = 3.141592653589793
def compute_number_of_diameters_in_circumference(
circumference_measured_by_string,
diameter_measured_by_ruler
):
"""
This is what Archimedes and every ancient mathematician measured.
Wrap a string around a circle. Lay it next to the diameter.
The ratio is always pi, no matter the circle size.
"""
ratio_of_circumference_to_diameter = circumference_measured_by_string / diameter_measured_by_ruler
return ratio_of_circumference_to_diameter # always ~3.14159...
def compute_circumference_from_diameter(diameter_of_circle):
"""
The diameter rolls around the circumference pi times.
So circumference = pi × diameter.
"""
number_of_diameters_that_fit = PI
circumference = number_of_diameters_that_fit * diameter_of_circle
return circumference
def compute_circumference_from_radius(radius_of_circle):
diameter = 2 * radius_of_circle
return compute_circumference_from_diameter(diameter)
# Pi estimated by polygon (Archimedes' method — no math library needed)
def estimate_pi_by_inscribed_polygon(number_of_sides):
"""
A polygon with more sides gets closer to a circle.
The perimeter of an inscribed polygon, divided by the diameter (=2),
gives a lower bound for pi.
As sides → infinity, this estimate → pi.
"""
import math
angle_per_side_in_radians = (2 * math.pi) / number_of_sides
side_length = 2 * math.sin(angle_per_side_in_radians / 2)
perimeter_of_polygon = number_of_sides * side_length
diameter_of_circle = 2
estimated_pi = perimeter_of_polygon / diameter_of_circle
return estimated_pi
for number_of_polygon_sides in [6, 12, 24, 96, 1000]:
estimate = estimate_pi_by_inscribed_polygon(number_of_polygon_sides)
print(f"{number_of_polygon_sides:5} sides: π ≈ {estimate:.8f}")
```
---
## Why pi is the same for every circle
Every circle is a scaled version of every other circle. A circle of radius 2 is the unit circle scaled by 2 — its circumference scales by 2, its diameter scales by 2, so their ratio stays constant. Pi is a shape property, not a size property.
---
## Builds on
- [What Is a Number?](/articles/8510b9a8-a3ad-4790-a928-b2360ac8679e)
- [The Number Line](/articles/257eeafa-74c5-43e0-b09b-af90a9cd0d3c)
## See also
- [Pi from Randomness — Monte Carlo](/articles/42c405ab-b891-42c0-bb36-cc8ed87628f4)
- [Circle Area — Why πr²?](/articles/6156ae8e-6c73-4c17-8916-8259a21cad23)
- [Visual Pi Dependencies](/articles/ec3ebdf4-f6cc-47bf-b597-56fc7b53d130)
- [Visual Radians Without Math Libraries](/articles/7090a8d6-5f02-456e-82ec-31741bd1fe38)
- [Math Foundations — Visual Table of Contents](/articles/d404884f-54fc-4289-b3f1-baaad2bec6b2)