User:Blackbombchu/Sandbox/There is exactly one distance function

Theorem
There is exactly one distance function and that function assigns to every ordered pair of real numbers (x, y) √x2 + y2.

Proof
Suppose f is a distance function. Then for every ordered pair (x, y) where x and y aren't both 0, let a = $x⁄√x^{2} + y^{2}$ and b = $y⁄√x^{2} + y^{2}$, so a2 + b2 = 1. Since g(z, w) = (az - bw, aw + bz) is an origin rotation and g(√x2 + y2, 0) = √x2 + y2, by definition since f is a distance function, f(x, y) = f(g(√x2 + y2, 0)) = √x2 + y2. Also by definition, since f is a distance function, it assigns 0 to (0, 0). Therefore, only the function that assigns √x2 + y2 to every ordered pair of real numbers (x, y) can be a distance function.

Let h(x, y) be x2 + y2. Suppose g is an origin rotation, then for some a, b where a2 + b2 = 1, g(x, y) = (ax - by, ay + bx) so for all real numbers x, y, h ∘ g(x, y) = (ax - by)2 + (ay + bx)2 = a2x2 - 2abxy + b2y2 + a2y2 + 2abxy + b2x2 = (a2x2 + a2y2) + (b2x2 + b2y2) = a2(x2 + y2) + b2(x2 + y2) = (a2 + b2)(x2 + y2) but a2 + b2 = 1 so h ∘ g(x, y) = (x2 + y2) = h(x, y). Let f(x, y) = √g(x, y) = √x2 + y2, then f ∘ g(x, y) = f(x, y) for all origin rotations g. Also, for all nonnegative real numbers r, f(r, 0) = √r2 + 02 = √r2 = r so f(x, y) = √x2 + y2 is a distance function.

Since f(x, y) = √x2 + y2 is a distance function and it can be the only distance function, there is exactly one distance function and it is that function.