If $\Omega$ is a subset of a matric space $X$ with metric, $d$, then the signed distance function $f$, is defined by $f(x) = \begin{cases} d(x, \partial \Omega) & x \in \Omega\\ -d(x, \partial \Omega) & x \in \Omega^c \\ \end{cases}$
where $\partial \Omega$ denotes the boundary of $\Omega$, and $d(x, \partial \Omega) =\inf_{y \in \partial \Omega}d(x,y)$
Wikipedia states here, that if $\Omega$ is a subset of $\mathbb{R}^n$ with piecewise smooth boundary, then the signed distance function is differentiable almost everywhere, and its gradient satisfies the Eikonal equation
$|| \nabla f || = 1$
I'm not sure why this equation holds. For instance, if we are in three dimensional space, and we wish to do this for a sphere,
If the point is inside the sphere, we take a line from the centre of the sphere to the point and intersect it with the sphere, and then take the negative distance between the intersection point and our input point.
If the point is outside the sphere, we take the difference between
1) the point's distance to the centre of the sphere
2) consider the ray from the centre of the sphere to the point, and take the length of the subray starting from the centre where the endpoint intersects the surface of the sphere.
It's not clear to me why this function would have its gradient's norm equal to $1$.
Any insights appreciated.