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)$, $d((x, y), (x + z, y + w)) = d((0, 0), (z, w))$
- For any point $(x, y)$, $d((0, 0), (x, y))$ is nonnegative
- For any nonnegative real number $x$, $d((0, 0), (x, 0)) = x$
- For any point $(x, y)$, $d((0, 0), (x, -y)) = d((0, 0), (x, y))$
- For any points $(x, y)$ and $(z, w)$, $d((0, 0), (xz - yw, xw + yz)) = d((0, 0), (x, y))d((0, 0), (z, w))$
Suppose a function $d$ from $(\mathbb{R}^2)^2$ to $\mathbb{R}$ satisfies those conditions, then for any point $(x, y)$, $d((0, 0), (x, y))^2 = d((0, 0), (x, y))d((0, 0), (x, y)) = d((0, 0), (x, y))d((0, 0), (x, -y)) = d((0, 0), (x^2 + y^2, 0)) = x^2 + y^2$ so $d((0, 0), (x, y)) = \sqrt{x^2 + y^2}$ so for any points $(x, y)$ and $(z, w)$, $d((x, y), (z, w)) = \sqrt{(z - x)^2 + (w - y)^2}$ Now I will show that $d((x, y), (z, w)) = \sqrt{(z - x)^2 + (w - y)^2}$ actually satisfies those properties. It's trivial to show that it satisfies the first 4 conditions. It also satisfies the fifth condition because for any points $(x, y)$ and $(z, w)$, $d((0, 0), (xz - yw, xw + yz)) = \sqrt{(xz - yw)^2 + (xw + yz)^2} = \sqrt{x^2z^2 - 2xyzw + y^2w^2 + x^2w^2 + 2xyzw + y^2z^2} = \sqrt{x^2z^2 + x^2w^2 + y^2z^2 + y^2w^2} = \sqrt{(x^2 + y^2)(z^2 + w^2)} = \sqrt{x^2 + y^2}\sqrt{z^2 + w^2} = d((0, 0), (x, y))d((0, 0), (z, w))$
As a result of this, from now on, I will define the distance from any point $(x, y)$ to any point $(z, w)$ as $\sqrt{(z - x)^2 + (w - y)^2}$ and denote it as $d((x, y), (z, w))$. I will also use $d(x, y)$ as shorthand for $d((0, 0), (x, y))$.
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 path that's topologically equivalent to a line segment, when there exists a function from a closed interval on $\mathbb{R}$ to $\mathbb{R}^2$ that's continuous and at some point travels along the path with a speed of 1 at all but finitely many points in that interval on $\mathbb{R}$ and assigns to each end point of that interval, opposite ends of that path, the length of that path is defined to be the difference between the end points of that domain of $\mathbb{R}$. Just because one path can be continuously transformed into another path doesn't mean its length continuously varies with time during the transformation.
That might seem so counterintuitive to you. That can be explained by the fact that statements about Calculus can be formalized as statements in the formal system of Zermelo-Fraenkel set theory and the formal system of ZF disproves the formalization of the intuitive statement that when ever a path topologically equivalent to a line segment gets continuously transformed, its length varies continuously with time.
Source: The validity of the proofs of the Pythagorean Theorem and the concept of area