When do group-invariant bivariate functions depend on the distance only? Let $M$ denote the sphere $\mathbb S^{d-1}$ and let $G$ denote the group $O(d)$ of orthogonal $d\times d$ matrices. Suppose that the function
$$
F\colon M\times M\to \mathbb R
$$
is $G$-invariant, in the sense that
$$
F(R\omega, R\nu)=F(\omega, \nu), \qquad \forall \omega, \nu\in\mathbb S^{d-1}, \forall R\in G.$$
Then there is a $\phi\colon [-1, 1]\to \mathbb R$ such that
$$
F(\omega, \nu)=\phi(\omega\cdot \nu).$$
In other words, $F$ depends only on the distance of its arguments. (See below for the proof).

Now redo the above reasoning with $M=\mathbb R^d$ and $G=(\mathbb R^d, +)$. A function $F$ is now $G$-invariant if
$$
F(x-z, y-z)=F(x, y), \qquad \forall x, y\in M,\ \forall z\in G.$$
The inference that can be drawn from this is that
$$
F(x, y)=\psi(x-y), \quad \text{ for a }\psi\colon \mathbb R^d\to \mathbb R, $$
which is weaker than before; the function now depends on the difference $x-y$, not on the distance $|x-y|$.

Question. Can you give a conceptual explanation of this different behavior?


I purposely wrote a vague question, because I would love to receive insight of any kind. However, I do have a framework in mind. In both examples above,
$$
M=G/K, \quad \text{ where } G\text{ is a Lie group, }$$
and $K$ is the stabilizer of an arbitrarily chosen point of $M$. Moreover, $M$ is a $G$-invariant Riemannian manifold.
Now there are two major differences between the two cases. On the sphere, $G=O(d)$ is compact, and the stabilizer $K$ is isomorphic to $O(d-1)$. Both properties fail on $\mathbb R^d$, for which $K=\{0\}$ is the trivial subgroup.
I have this vague idea that the different behavior is a consequence of these two different properties.

Proof of the statement on the sphere.
Without loss of generality we can assume that $\omega$ is the North Pole $e_d\in\mathbb S^{d-1}$. We can write $\nu\in\mathbb S^{d-1}$ in cylindrical coordinates
$$
\nu= t e_d + \sqrt{1-t^2}\nu_{d-2}, $$
where $t=e_d\cdot \nu$ and $ \nu_{d-2}\in\mathbb S^{d-2}$. Thus, obviously,
$$
F(e_d, \nu)=F(e_d, te_d + \sqrt{1-t^2}\nu_{d-2}).$$
So $F$ is a function of the two variables $t, \nu_{d-2}$. However, for each rotation $R\in O(d)$ such that $Re_d=e_d$ we have that
$$
F(e_d, \nu)=F(e_d, R\nu)=F(e_d, te_d + \sqrt{1-t^2}R\nu_{d-2}).$$
This shows that, actually, $F$ does not depend on $\nu_{d-2}$ and is therefore a function of $t$ only. $\Box$
 A: Based on my comments:
Suppose that $G$ is a locally compact topological group (I am primarily thinking about Lie groups, but this is also used for other locally compact groups, such that p-adic groups), $H< G$ is a closed subgroup. The group $G$ acts (continuously) diagonally via left multiplication on $G\times G$ and, hence, on the product of quotient-spaces $Z=G/H\times G/H$. Let's analyze the quotient $Q$ of $Z$ by this $G$-action: One can regard $Q$ as the "parameter space" parameterizing the $G$-congruence classes of pairs $(p, q)\in Z$.
We can first take the quotient of $G\times G$ by the (left) $G$-action. This quotient is homeomorphic to $G$ and the homeomorphism is induced by the map
$$
\nu: (g, h)\mapsto g^{-1} h, G\times G\to G. 
$$
The point is that for each $f\in G$, $\nu(f(g,h))= \nu((fg, fh))$. Under this  identification of the quotient of $G\times G$, the right $H\times H$-action on $G\times G$ becomes
$$
(h_1,h_2) g= h_1^{-1}gh_2. 
$$
Hence, $G\backslash (G/H \times G/H)$ is homeomorphic to the biquotient $H\backslash G/H$. Note that the nonebelian nature of $G$ (if it is nonabelian) becomes important here: If $H$ were normal in $G$, then  $H\backslash G/H$ would be homeomorphic to $G/H$.
Now, depending on $G$ and $H$ the space $Q$ might be 1-dimensional or higher dimensional. The examples I am most familiar with (besides the ones in the post) are:
Symmetric spaces of noncompact type $X=G/H$ where $G$ is a semisimple connected Lie group and $H=K$ is its maximal compact subgroup. The biquotient $Q=H\backslash G/H$ is then described by the Cartan decomposition of $G$:
$$
G= K A_+ K
$$
and $A_+$ is homeomorphic (via the exponential map) to a positive chamber ${\mathfrak a}_+$ in the Lie algebra ${\mathfrak a}$ of $A$. Thus, $Q$ is homeomorphic to $A_+$. The dimension of $Q$ is also known as rank of the symmetric space $X$. The space $X$ has rank 1 precisely when the $G$-congruence classes of pairs of points $(p,q)$ in $X$ are parameterized by the metric distance $d(p,q)$. One of the standard examples of the Cartan decomposition is the SVD (singular value decomposition) of $G=SL(n, {\mathbb R})$, $K=SO(n)$ and $A$ is the subgroup of diagonal matrices in $G$. Once $n\ge 3$, you have more than one independent singular value (if $n=2$ then the singular values are inverses of each other and, effectively, you just need one of them).
A similar story is for $p$-adic groups such as $G=SL(n, {\mathbb Q}_p)$: in this case Cartan decomposition is known as the  Smith Normal Form of a matrix.  The analogue of $K$ in this setting is $K=SL(n, \widehat{\mathbb Z}_p)$, where $\widehat{\mathbb Z}_p$ is the ring of p-adic integers. (As a topologist, I do not like the notation  ${\mathbb Z}_p$ for this ring, but I am biased.)
People study algebras of biinvariant functions on biquotients $Q=H\backslash G/H$ in these examples (both Lie algebras and p-adic cases); the product on these algebras is given by the convolution. (The fact that the product is commutative is a bit surprising, I think, this observation is due to Gelfand.) These algebras are known as Hecke algebras/rings. The biinvariant functions on $G$ are called spherical functions. In other words (coming back to your post), these are $G$-invariant functions on $G/H \times G/H$.
