The staircase paradox, or why $\pi\ne4$ What is wrong with this proof?

Is $\pi=4?$
 A: Hilarious! Of course, the circumference is not approximated by the sum of lengths of the lines constructed as shown, but by the sum of the hypotenuses of each of the right-angle triangles formed around the edge of the circle (forming a polygon with vertices on the circle).
A: 
What is wrong with this?

Fundamentally, that you have jumped in without a definition of the length of an arc.  
A: This is simply another example of why the "limit of the sum" is not the "sum of the limit."
(Length of curves are a subset of Sums/Integrals which are really the same thing in my mind.  If you like, in this case "the limit of the lengths of the curves " is not the "length of the limit curve")
A: Simple Geometrical Explanation
Consider the approximation to the circumference (to Pi) that is suggested by the question. Call that a step-wise approach.
Consider the approximation of using an inscribed or circumscribed regular polygon to approximate the circumference. Call that a polygon approach.
Let's note the following.
1: A step approach relies entirely on 90 degree angles.
2: Meanwhile a regular polygon approach has the angles obtuse and actually approach 180 degrees as the number of sides increases.
3: If we zoom in, we can no longer discern a tiny segment of the circle from a straight line.
In the step construction, when we are at a very high iteration count, each step starts at one end of a tiny segment and ends at the other end. In some cases as we go around the circle, the vertical step component will be very short and then a long horizontal component. In these cases, the step construction will approach the circle's "nearly straight" tiny segment in length. But in many other cases, the up step will be longer. In the extreme case, the up vertical part is exactly as long as the horizontal part. In this extreme case, we are approximating the length of the "flat" hypotenuse of an isosceles right triangle to be equal to the sum of the 2 legs. Clearly that is a bad approximation. These cases with many fairly bad approximation occur regularly.
Contrast with the polygon approach. Here we approximate the length of the longest side of an isosceles triangle to be the sum of the lengths of the 2 equal sides. In all cases, this is a good approximation, since the polygon must necessarily be almost 180 degrees to achieve "continuity" in slope to the next segment. (It's a convex polygon).
Summary: The step approach must use 90 deg pseudo-triangles where the short 2 legs are use to approximate the long "nearly straight" leg. This is clearly insufficient in many cases, particularly when the triangle is near isosceles. In contrast, in the polygon approach, the triangle always has one angle approaching 180 degrees so that sum of the 2 short legs is necessarily about the same (in terms of relative percentages) as the length of the "nearly straight" leg.
A: Many of the answers above have covered this in a rigorous way, so I'll try to put some intuition behind it.
Let $ C_n $ be your parameterization's circumference. You assume that $ \pi = \lim_{n \to \infty} C_n $. The problem lies in that $ \pi $ isn't defined as such limit. In fact, the argument is fundamentally flawed by assuming $ [\forall n \in \mathbb N, \,\,P(S_n)] \implies P(\lim_{n \to \infty} S_n) $, that is, the if every item of a sequence satisfy some property $ P $, the limit of the sequence itself satisfy $ P $.
Applying a similar argument, you can show that $ \mathbb R = \mathbb Q $. Let $ r \in \mathbb R $. Let $ c_n $ be the Cauchy sequence of $ r $. Since $ c_n \in \mathbb Q $, $ r \in \mathbb Q $. Since $ \mathbb Q \subseteq \mathbb R $, we have $ \mathbb R = \mathbb Q $.
A: This question is usually posed as the length of the diagonal of a unit square.  You start going from one corner to the opposite one following the perimeter and observe the length is $2$, then take shorter and shorter stair-steps and the length is $2$ but your path approaches the diagonal. So $\sqrt{2}=2$.
In both cases, you are approaching the area but not the path length. You can make this more rigorous by breaking into increments and following the proof of the Riemann sum. The difference in area between the two curves goes nicely to zero, but the difference in arc length stays constant.
Edit: making the square more explicit.  Imagine dividing the diagonal into $n$ segments and a stairstep approximation.  Each triangle is $(\frac{1}{n},\frac{1}{n},\frac{\sqrt{2}}{n})$.  So the area between the stairsteps and the diagonal is $n \frac{1}{2n^2}$ which converges to $0$.  The path length is $n \frac{2}{n}$, which converges even more nicely to $2$.
A: Correct answer: Nothing is wrong with this, as long as your space is defined using a Manhattan metric.  Normal Euclidean space is defined using a Euclidean metric. 
A: The fundamental concept here is discontinuity. The arclength of a curve is a discontinuous function of its path, in the sense that two paths can be arbitrarily close (in the visual or point-by-point sense) but have dramatically different arclengths.
You can take any discontinuous function and build a dumb apparant-paradox in the same style.


*

*The sign of a number is discontinuous. Here's a dumb apparent paradox:


1 is positive. 0.1 is positive 0.01 is positive. Repeat to infinity and you conclude that 0 is positive! OMG!


*

*The "is rational" mapping is discontinuous. Here's a dumb apparent paradox:


3.14 is rational. 3.141 is rational. 3.1415 is rational. Repeat to infinity and you conclude that pi is rational! OMG!


*

*The "is equal" mapping is discontinuous. Here's a dumb apparent paradox:


When I'm 50% of the way to my destination, I'm not there yet. When I'm 75% of the way there, I'm not there yet. When I'm 87.5% of the way there, I'm not there yet. Repeat to infinity and you conclude that I'll never get there! OMG!
(Isn't that Zeno's paradox or something?)
With this template, you can build as many dumb apparant-paradoxes as you want. Get creative! Impress your friends! :-)
A: Although there are many answers I would like to add the following simple non-rigorous explanation, if this could be called an explanation at all, which uses only the notions of countability and uncountability.
Let us denote the curve at which we arrive after the $n$ "removal steps" as $A_n$ and let us denote the circle which we are approximating as $C$. For every $n \in \mathbb N$ we have that the set $A_n \cap C$ is finite because there is finite number of points which lie both on the curve and the circle.
In the limit $\lim_{n \to \infty} A_n \cap C=A \cap C$ we have that the limiting curve $A$ and the circle $C$ have an infinite number of points that are both on the curve $A$ and on the circle $C$ but the set of all such points is countable and the circle has an uncountable number of points.
So with this simple and elementary analysis we see that the limiting curve $A$ and the circle $C$ do not coincide, in fact, almost all points of the curve $A$ will not be on the circle $C$ so it is not such a big surprise that their lengths will be different.
A: If I were asked this question by a first-year calculus student, then the first thing I would do is write the following on the chalkboard:
$$ \sqrt{dx^2 + dy^2} \ne |dx| + |dy| $$
(This is still a common enough mistake among high school math students, but by the time anyone learns calculus, I hope that they would be aware that it is wrong.)
If you consider any infinitesimal element of the circle, the length is
$$d\ell = \sqrt{dx^2 + dy^2}$$
The only relationship between the circle and the "approximating" curve is that they have the same value of $|dx| + |dy|$, which is not a meaningful quantity when talking about length (at least, as has been pointed out, when you are using a Euclidean metric).  The value of $d\ell$ is not equal for any corresponding infinitesimal elements of the two curves, so there is no reason to believe it will be the same for the whole polygon.
A: The picture shows a sequence of curves $\gamma_n$ which approach (in what is called "uniform distance") the circumference of a circle $\gamma$. Then the picture says that the length of these curves is always the same: $\ell (\gamma_n) = 4$. If the function $\ell$ were a continuous function you would get the stated result:
$$
4 = \lim_{n\to \infty} \ell(\gamma_n) = \ell(\gamma) = \pi.
$$
Unfortunately $\ell$ is not a continuous function, and this example is a proof of this fact.
(added) As suggested by @knedlsepp in the comments: the functional $\ell$ is continuous with respect to $C^1$ convergence (i.e. whenever both $\gamma_k$ and $\gamma'_k$ converge to $\gamma$ and $\gamma'$). In this case it is easy to see that the curves $\gamma_k$ do not converge in $C^1$ because the derivatives $\gamma'_k$ are always either horizontal or vertical vectors, while the limit curve $\gamma$ can have any intermediate slope.
A: (non rigorous) If you repeat the process a million times it "seems" (visually) that the perimeter approaches in length to the circumference, but if you magnify the picture of a single "tooth" to full screen, you will notice a big difference from the orthogonal segments and the arc of the circumference. No matter how many times you repeat the process that difference will never fade.
ADDED: A visual example of what I meant is folding of a rope. If you imagine the rope not having thickness, you can fold it so many times that you can tend to a point (zero length?). If you unfold it, it will return to its original shape. In the example the perimeter will always be of total length = 4, but it only appears to blend with the circumference.
A: This problem illustrates the fact that two functions can be very close: $|f(x)-g(x)|<\epsilon$
for all $x\in [0,1]$, but their derivatives can still be far apart, $|f'(x)-g'(x)|>c$ for some
constant $c>0$. 
In our case, let $x=a(t),y=b(t),0\le t\le 1$ and $x=c(t),y=d(t), 0\le t\le 1$ be the 
parametrizations of the two curves. By smoothing the corners, we may assume that both
are smooth. $$ \|(a(t),b(t))\|\approx \|(c(t),d(t))\|$$ does not imply
$$  \|(a'(t),b'(t))\|\approx \|(c'(t),d'(t))\|$$
Therefore $\int_0^1 \|(a'(t),b'(t))\| dt$ need not be close to $\int_0^1 \|(c'(t),d'(t))\| dt.$
Here $\|(x,y)\|$ denotes $\sqrt{x^2+y^2}$.
A: $\newcommand{\Reals}{\mathbf{R}}$There are a number of good answers to this primordial question, but none mentions the usual definition of arc length: If $\gamma:[a, b] \to \Reals^{n}$ is a continuous path, the arc length of $\gamma$ is the supremum, taken over all partitions $(t_{i})_{i=0}^{n}$ of $[a, b]$, of
$$
\sum_{i=1}^{n} \|\gamma(t_{i}) - \gamma(t_{i-1})\|.
\tag{1}
$$
This supremum always exists as a positive extended real number. If $\gamma$ is piecewise continuously-differentiable, the arc length is finite, and given by
$$
\int_{a}^{b} \|\gamma'(t)\|\, dt.
$$
(The integral is computed by partitioning $[a, b]$ into finitely many intervals on which $\gamma'$ is continuous and summing the contributions.)
Here, the circle can be (smoothly) parametrized by
$$
\gamma(t) = (\tfrac{1}{2}\cos t, \tfrac{1}{2}\sin t),\qquad 0 \leq t \leq 2\pi.
$$
The point is, the troll's approximation by "Manhattan" polygons does not give the supremum of (1), nor is there any reason to expect it should since none of the vertices lie on the circle.

On the subject, there is a genuinely vexing issue for surfaces in $\Reals^{3}$: The analog of (1) (form a triangular approximation whose vertices lie on the surface, sum the areas of the triangles, and take the supremum) is infinite even for a bounded portion of a right circular cylinder, a surface as smooth as one could hope. Spivak's Comprehensive Introduction to Differential Geometry has a nice diagram illustrating what goes wrong. Intuitively, crush a paper cylinder so it looks like an accordion bellows, and imagine this is done in such a way that the vertices of the crushed cylinder lie on another cylinder whose area we wish to approximate. The area of the bellows can be made as large as we like.
A: Summary: The construction at the top (pi=4) merely shows an upper bound. It's an upper bound but it is very easy to come up with a lower but still upper bound to the circumference. The =?4 construction doesn't prove or disprove very much more about the length of the circle besides providing an upper bound pi<4. It certainly doesn't prove =4. Finally, we always should rely on physical "experimentation" to support the meaningfulness of any construction.
If we use a hexagon circumscribed around the circle, we can find a different upper bound rather easily that would be lower than 4; hence proving that the construction above is merely an upper bound (of which there are an infinite number.. including pi=?10000, by using a path that weaves all over a small area between a square and circle) but certainly not the lowest upper bound.
To get closer to discovering pi, we can then also use a mirrored complementary approach of increasing lower bounds via inscribed polygons of an increasing number of sides. However, arguably we could "weave" as well with the incribing to create such a "lower" bound approaching say 4 from below! [Ie, by weaving, we can inscribe a weaved path that ends up being arbitrarily large in measurement despite nicely fitting inside the tightening space between the circle and polygons.]
Ultimately, one key to getting sanity is to postulate/believe that the shortest distance between 2 points is a line (Euclid did this a long time ago). We observe, for example, that the accepted height of a person involves a procedure of using a taught measuring stick or, generally, measuring curves by tightening a flexible measuring device as far as it can be tightened while still hugging (remaining within a certain area of) the curvy item being measured. This procedure is very easy to do for a circle made of an iron ring, for example, and would give a very close approximation to pi. This exercise also shows that math is not reality. Math is built upon postulates and definitions (something must be accepted as being true), but these postulates need not match our physical world in order to remain logically consistent. To say meaningful things about the physical world, we must judge the reasonableness of mathematical postulates and definitions [phv3773 noted in an answer how definitions were missing, while others have also noted collectively many of these points]; we must determine just what is a reasonable set of postulates to start with in order to reach a reasonable meaning of length of a circle (ie, of the value of pi). We might conclude for example, that the usual inscribed/circumscribed approach relies upon a framework closer to reality because in fact it approaches the tape measure "experimental" results arbitrarily close.
I googled an excellent essay that goes into detail on Archimedes' essay http://www.ams.org/samplings/feature-column/fc-2012-02. It appears to have been written for the American Mathematical Society but maybe its author (Bill Casselman) can be persuaded to make a contribution here.
[Below is my old response]

What if the measurement we use, patterning it after a string wrapped around this circle, weaves back and forth? Essentially, we can find a series of connected line segments with length that total $1000000000$ and yet "hug" the circle very closely. A string analogy follows closely though line segments have width $0$ so we can fit arbitrarily many.
This is why not just any reasoning about infinity will do. Mathematicians have developed well reasoned arguments and axioms that correlate well in many cases with reality (see also this argument).
So the question of why doesn't $\pi = 4$ is best answered by asking, "Why should it?" We can just as well have used the ridiculous construction above to suggest $\pi =$ any number $> 3.15$.
The approach we take to argue convincingly that the sum of the line segments approaches the "length of the curve" is to find sequences (from series partial sums) that match to functions (note the question example and the weaving example do not constitute a function because of its multiple values at a given "$x$") which have certain characteristics. For example we might use a lower and upper bounding pair of sequences that correspond to function values of line segment endpoints for such created polygons where one remains on one side of the curve and the other on the other side at all times and where these two sequences approach the same limiting value. We might use the Mean Value Theorem or related results to help prove our final answer. In any case, mathematicians leverage a convincing set of arguments and assumptions and don't just ad hoc throw a bunch of twisted string at a problem and claim the amount of string used proves the unprovable.
A: Proof by contradiction
What's the perimeter of a regular polygon with an inscribed circle of unit diameter?
It has apothem equal to radius (distance between a side and the center): $\frac{1}{2}$
The central angle in front of a side is $\frac{360^\circ}{n}$.

Next to 180 it says "deg"
So a whole side is of length $2\cdot \left(\frac{1}{2}\tan{\frac{180^\circ}{n}}\right)$
There are $n$ sides, so it has perimeter ${n\tan{\frac{180^\circ}{n}}}$
The folding method (details at the end of the answer) preserves perimeter. So the polygon's perimeter equals the circle's circumference
Dividing by the diameter (the definitions of $\pi$), which is $1$, we get $\pi = n\tan{\frac{180^\circ}n}$
(which is actually only correct when $\lim_{n\to \infty}$! Think of how different choices of $n$ can change the calculated value of $\pi$!)
The contradiction
Replace the square with a triangle, and apply the same steps and you'll see that $\pi = 3\tan{\frac{180^\circ}{3}} \approx 5.196$
Replace the square with a hexagon, and apply the same steps and you'll see that $\pi = 6\tan{\frac{180^\circ}{6}} \approx 3.464$
Replace the square with a enneadecagon (19-gon), and apply the same steps and you'll see that $\pi = 19\tan{\frac{180^\circ}{19}} \approx 3.171$
Conclusion
This way to calculate $\pi$ by assuming $\text{circumference} = \text{perimeter}$ is invalid, as it contradicts with itself.
Further description

The green line bisects the distance between the angle and the arc. It represents folding. If we repeat this multiple times (applying to newly formed vertices in each step), we'll find that the circle's circumference is equal to the polygon's perimeter, because, after every step:


*

*all vertices become closer to the circle

*the number of vertices doubles

*the perimeter stays constant
The polygon-part in the image is from a pentagon. No matter what the angle is or how many sides the polygon has, we can fold each vertex infinite times and find "circumference = perimeter", but since every polygon would have a different perimeter, we have self-contradiction.
A: The pithy expression for this "paradox" is as follows: let $x_n(t)$ be a sequence of parameterized curves which converges uniformly to a limit curve $x(t)$.  Then it need not be the case that the arclengths of $x_n(t)$ approach the arclength of $x(t)$.
[Added after seeing TCL's answer: it is also true that uniform convergence of a sequence of functions does not imply convergence of their derivatives.  See Section 3 here for some discussion of this.  As TCL points out, since arclength elements are computed using derivatives, the observation about derivatives may be in some sense more fundamental.  In other words, I think I like TCL's answer better than mine.]
As Ross Millikan points out, this is more familiarly shown by approximating the hypotenuse of a right triangle by a staircase pattern of horizontal and vertical line segments.  I still remember being a senior in high school and having a friend (whom I had had no prior mathematical interactions with) show this to me.  I definitely remember thinking that it was not paradoxical but certainly surprising.  (And I have mathematically respected this person ever since, even though I haven't seen her since I was a teenager.)
Added much later: if you think about the phenomenon physically rather than geometrically, it seems to me that the surprise disappears.  For instance, suppose I'm running and you're riding a motorcycle.  It is possible for your speed at every instant to be 25 times (say) faster than mine while maintaining a very small distance from me, e.g. by making very small, very fast circles around me.
A: Ah, the old engineer vs mathematician thought process.
Place an engineer and a mathematician at one end of a room. At the other end is a beautiful woman. At each "step", they can each move half of the remaining distance between their current position and the woman. The mathematician will say you'll never reach her. The engineer will say you can get close enough.
This problem is similar. A unit square's outermost corners are being "bent" inward to touch a 1/2-unit circle until there are so many corners that the square is, at this zoom level, indistinguishable from the circle itself (similar to using rectangular pixels). Repeated "to infinity" the two shapes would have the same area. However, this process will never yield a mathematical circle; only an engineer's approximation ("close enough") This will always produce the same perimeter measurement even as the areas of the two shapes converge. If instead you were to measure around the hypotenuses as you iterated this shape definition, the perimeter WOULD begin to approach that of the circumference of the half-unit circle, $\pi$.
The fallacy of the proof is illustrated if you consider the shape made by any two line segments that intersect at a point other than on the circle. These two lines will inscribe an arc length as they each intersect a different point on the circle. For simplicity, you can think of the resulting shape as a right triangle. The proof is basically claiming that the sum of the length of the two legs of that triangle is equal to the hypotenuse. This is never true, because the Pythagorean Theorem of $a^2+b^2=c^2$ never holds for any $a,b,c > 0$ where $a+b=c$. 
The only way it can work is for an $a$ or $b$ that is zero and thus the area of the shape is zero; this never happens in the construction being generated, at any interval, because by the definition of the construction we have two points that lie on the circle and one point lying outside the circle, and from geometry, any three non-colinear points will always inscribe a shape within a plane of non-zero area.
A: I am probably going a little off-topic with these comments, so feel free to downvote :)
In my opinion this type of proof emphasizes why it is wrong to teach/take “Calculus” instead of Analysis.
For most of the nice applications of integration, we always use the following approach: take some quantity/expression, break it in many pieces, identify the sum of many pieces as a Riemann sum, and thus our quantity is the limit of the Riemann sums, thus the corresponding integral…
Unfortunately, except in serious Analysis courses, not even once do we go into the subtle details: why is the Riemann sum a good approximation for our quantity, namely why does the error in our approximation go to zero…
Most students who take Calculus end up “understanding” lots of false results, which we don’t have the time to disprove in general: any derivative is continuous, any approximation that looks good is good, …
To come back to this problem, not all approximations that look good are good. We always MUST prove that the errors in our approximations go to zero. And for all the formulas we “prove” in calculus, there is an actual mathematical proof, which is pretty technical (and most non-mathematicians would say boring and stupid, but then without such proofs one cannot really understand why the “proof” from the above picture is wrong). But without going through the formal proofs, one cannot truly understand why that particular approximation works in that case, and more importantly why a different approximation won’t work.
Coming back to the above picture, one way to understand it is the following: we approximate the circle by a sequence of polygons. Let $c_n$ be the length of the $n$th polygon and $c$ be the length of the circle. At each step the error in our approximation is $4-\pi$, which doesn’t go to zero. This means that the arclength of the circle might not be the limit of arclengths of the polygons. The only thing we can conclude is that, if all the quantities and limits that appear in the picture exist, then the limit approximates the arclength of the circle with an error of at most the limsup of the errors. In other words, $4 \approx \pi$ with an error less than or equal to $4-\pi$. Hmm, what is wrong with this?
A: We can say that the process depicted actually demonstrates that $$\frac{\sqrt{2}}{2} 4 < \pi < 4$$
A: I am not satisfied with any of the answers so far, so here is mine:
Let $S(n)$ be the shape we have after $n$ "foldings". (For example $S(0)$ is the square at the beginning. )
The construction of the "paradox" could claim one of the following:


*

*Since the area of $S(n)$ is decreasing, the perimeter of $S(n)$
approaches the area of $C$.


Or,



*Since the area of $S(n)$ is decreasing, the area of $S(n)$ approaches the
area of $C$.


The first one does not even make sense, since the area of a shape is not the same with the perimeter. There is no reason to connect the area with the perimeter.
The second one is correct. After one million repetitions, the area of the polygon we obtain from "folding" $S$ will be approximately equal to $\pi$. But this has nothing to do with the number $4$, since this was the perimeter of $S$.
A: Actually, the answer to this question depends on compactification chosen.
There can be compactification in which the limit of your perimeter is neither $\pi$, nor $4$. It is a non-real number, which has modulus $4$ but regularized (real) part $\pi$.
You can imagine another such number if you consider $(-1)^\infty$. It has limit of the modulus $1$ but (Cesaro- or Abel-) regularized value is $0$.
The regularized values do not necessarily need to be smaller than modulus, there are opposite examples as well.
