# 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!

#### Solutions Collecting From Web of "Vector path length of a hypotenuse"

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$…

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).

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}$.