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

• I think it is because $P_\infty$ isn't REALLY the limit of the $P_n$'s, it is calculated separately. The reason the value seems to drop is because $P_n$ is calculated for a path which only travels parallel to the sides of the triangle, while $P_\infty$ is calculated with the hypotenuse, so there is a fundamental distinction between these values. I don't think there is any contradiction here. – William Feb 28 '12 at 18:16
• This question is highly relevant. – Sasha Feb 28 '12 at 18:17
• A close related question, with some nice pictures, was discussed here. – André Nicolas Feb 28 '12 at 18:24
• The length of the red path is the sum of all the vertical and horizontal lengths. Each "step" has length $2w$ (a vertical side and a horizontal side). If there are $n$ steps, the total length is $n\cdot2w=2$ (since $w=1/n$). In the limit, as the number of steps becomes infinite, the red path length is 2. But you shouldn't expect this to be the same as the length of the hypotenuse of the big triangle, because the sum of the lengths of the sides of one step differs from the length of the hypotenuse of the step by a factor of $\sqrt2$. – David Mitra Feb 28 '12 at 18:49
• As $n$ increases, the steps approximate the area of the triangle, not the perimeter. – u8y7541 Jul 4 '17 at 2:10

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

• Are you suggesting that each point of discontinuity has a path length associated with it or it takes time to turn 90 degrees? – joshlk Feb 28 '12 at 18:48

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

• I am trying to consider the path length of each step, not its vector length. Each step is made up of 2 times length $w$, while the vector length is $2\sqrt{2}/n$. – joshlk Feb 28 '12 at 18:50

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.

1. For any points $$(x, y)$$ and $$(z, w)$$ in $$\mathbb{R}^2$$, $$d((0, 0), (z, w)) = d((x, y), (x + z, y + w))$$
2. For any point $$(x, y)$$ in $$\mathbb{R}^2$$, $$d((0, 0), (x, y))$$ is nonnegative
3. For any nonnegative real number $$x$$, $$d((0, 0), (x, 0)) = x$$
4. For any point $$(x, y)$$ in $$\mathbb{R}^2$$, $$d((0, 0), (x, -y)) = d((0, 0), (x, y))$$
5. 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))$$
6. The area of any square in $$\mathbb{R}^2$$ is the square of the length of its edges
7. $$\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.

• Thanks that's really interesting - you obviously have some deep insight. But can you please relate your answer to the original question more. What is the relevance of speed and velocity regarding the limit of shrinking the zig-zags? You prove Pythagoras but is the zigzag also a valid distance in the limit due to the infinite points of discontinuity? Is it fundamentally different to move along perpendicular steps along the zig-zag compared to moving along the hypotenuse? – joshlk Jan 23 at 11:15
• @joshlk I don't know how to explain it in such a way that you will understand. Length of a path topologically equivalent to a line segment does not mean the distance from one end point to the other. I actually just defined length for certain paths topologally equivalent to a line segment. According to that definition, when it's possible to travel along that path from one end to the other continuously without turning around with a speed of 1 at all but finitely many points in time while you're going from one end to the other, the amount of time it takes to go from one end to the other is called – Timothy Jan 23 at 19:23
• the length of the path. Once you get to the path that's the limit of all those stair case paths, the way to travel along it continuously at a speed of 1 according to the definition of speed, it takes a length of time equal to square root of 2 times the length of its edges. I guess I didn't give an absolute complete description of how things are defined but doing so would probably make the answer way longer. – Timothy Jan 23 at 19:26