Vector path length of a hypotenuse 
Consider the red path from A that zigzags to B, which takes $n$ even steps of length $w$. The path length of the route $P_n$ will be equal to:
$ P_n = P_x + P_y = \frac{n}{2}\times w + \frac{n}{2}\times w = n \times w $
But $\frac{n}{2}\times w = 1$ beacuse it is the length of one of the sides of the triangle so:
$P_n = 2$
Which will be true no matter how many steps you take. However in the limit $n \to \infty, w \to 0$ the parth length $P_\infty$ suddenly becomes:
$P_\infty = \sqrt{1^2 + 1^2} =  \sqrt{2}$
Due to Pythagoras. Why is this the case? It seems the path length suddenly decreases by 0.59! 
 A: I was just about to ask the exact same question (although phrased differently), but in the process of asking it, I figured it out:
Basically the point is no matter how small each of the smaller zigzag steps' edges get, you can draw a line across it that represents its hypotenuse. If you sum all of those together, you'll always get the original length ($\sqrt{2}$).
It is very counterintuitive, though. The question came to me while driving a grid—am I better off wiggling left and right repeatedly to stay closest to the diagonal (apparently the shortest distance between two points), or driving down the outside edges of the grid? Some mental arithmetic showed that the distance travelled (presuming all corners are perpendicular) should be identical no matter how many times I turn (provided I don't double-back on myself):
 A                  B                  C
┌──────────────────┬──────────────────┐
│                  │                  │
│                  │                  │
│                  │                  │
│                  │                  │
│                  │                  │
│D                 │E                 │F
├──────────────────┼──────────────────┤
│                  │                  │
│                  │                  │
│                  │                  │
│                  │                  │
│                  │                  │
│G                 │H                 │I
└──────────────────┴──────────────────┘

To travel from point $A$ to $I$, the distance of driving $AG + GI$ is the same as $AD + DE + EH + HI$ (since $AD + EH = AG$ and $DE + HI = GI$).
All that's not so hard to grasp, but when you do this same task recursively on each grid square (as you describe), you quickly end up producing something that closely approximates half the box, but somehow has the same perimeter as the starting square:

This went beyond counterintuitive to me and became downright unacceptable to my brain. If you treat the square as a unit square (as you have), both of these shapes have a perimeter of 4, but the real triangle formed by joining the two diagonal corners has a perimeter of $2 + \sqrt{2}$ (less than 3.5!). At some amount of resolution, those zig zags are going to become visually indistinguishable from a straight diagonal line, but somehow there's more than half an edge length extra hiding somewhere.
The solution though, as described above is simple: no matter how large $n$ gets, you can always imagine zooming right in to that "triangle", and you do indeed end up with a series of zigzags, never a diagonal line. And if you calculate the sum of all those little zigzags' hypotenuses (that is, $\frac{n}{2} \times w\sqrt{2}$), you'll end up with the hypotenuse of the larger triangle ($\sqrt{2}$, since $\frac{n}{2} \times w = 1$ as you stated).
A: The length of the $n$ path is define by : $ \int_{(a,b)} \gamma_n'(t)dt $ where $\gamma_n$ is your path. But you can't pass at the infinity because "you have too much point of discontinuity". For instance you have no simple convergence for $\gamma'_n$...
A: There are some misconceptions here regarding magnitude of a vector versus its direction+magnitude.
First,  label the bottom left corner of the triangle as $O$ and declare the length of $OB=OA=1$ (you seem to imply this given your statement).  Each one of these $n$ mini-paths (assuming we go up and over by equal amounts of $1/n$) tracing up hypotenuse $AB$ of the triangle has position vector given by $(-1/n,1/n)$. The magnitude of this position vector is given by the Pythagorean theorem, namely:  $||(-1/n,1/n)||=\sqrt{2}/n$.  Recall that there are $n$ such paths and so the total path $AB=\underbrace{\sqrt{2}/n+\cdots+\sqrt{2}/n}_n=\sqrt{2}$.
A: Length of a path is defined in a very complicated way using Calculus. To define that, we first have to define distance in $\mathbb{R}^2$. We seek a definition of distance from any point in $\mathbb{R}^2$ to $\mathbb{R}^2$, a function from $(\mathbb{R}^2)^2$ to $\mathbb{R}$ that satisfies the following properties.


*

*For any points $(x, y)$ and $(z, w)$ in $\mathbb{R}^2$, $d((0, 0), (z, w)) = d((x, y), (x + z, y + w))$

*For any point $(x, y)$ in $\mathbb{R}^2$, $d((0, 0), (x, y))$ is nonnegative

*For any nonnegative real number $x$, $d((0, 0), (x, 0)) = x$

*For any point $(x, y)$ in $\mathbb{R}^2$, $d((0, 0), (x, -y)) = d((0, 0), (x, y))$

*For any points $(x, y)$ and $(z, w)$ in $\mathbb{R}^2$, $d((0, 0), (xz - yw, xw + yz)) = d((0, 0), (x, y))d((0, 0), (z, w))$

*The area of any square in $\mathbb{R}^2$ is the square of the length of its edges

*$\forall x \in \mathbb{R}d((0, 0), (\cos(x) ,\sin(x))) = 1$
In this answer, I will give a different simpler definition of length in property 6 than the actual real definition so that I can use it to give the real definition of length later. However, you will see later that it turns out that the 2 definitions of length are equivalent. In property 6 in this answer, after I define distance, I will define the length of an edge of a square just simply as the distance from one end point to the other. According to this answer, $d((x, y), (z, w)) = \sqrt{(z - x)^2 + (w - y)^2}$ is the unique binary function from $\mathbb{R}^2$ to $\mathbb{R}$ satisfying the first 5 properties and it also satisfies properties 6 and 7. As a result of that, I will define that function to be the distance formula.
Calculus defines the derivative of any function from a subset of $\mathbb{R}$ to $\mathbb{R}^2$. For some such functions, the derivative is undefined even where the original function is defined. The derivative of the function at any real number where it's defined can be called the velocity of that function at that real number. Speed is defined to be the square root of the sum of the squares of the components of the velocity. For any line, a subset of $\mathbb{R}^2$ that's topologically equivalent to a line segment that includes its end points, when there exists a function from a closed interval on $\mathbb{R}$ to the set of all points in that line that assings to one end of the interval one end point of the line and to the other end point of the interval the other end point of the line; is continusuous; is injective; and has a speed of 1 at all but finitely many points, the length of the line is defined to be the length of the closed interval. Just because the sequence of staircase paths approaches the diagonal line doesn't mean the sequence of their lengths approaches the length of the diagonal line.
