# Question sort of related to Cayley's theorem

In group theory, we saw that if $G$ is a group over a set $X$, then we can embed $G$ into $S_X$, where $S_X$ is the group of permutations on $X$, i.e. there is an injective homomorphism $G \hookrightarrow S_X$ (Cayley's theorem). Similarly, in real analysis, we saw that we can isometrically embed any metric space $(M,d)$ into another metric space $(\hat{M},\hat{d})$ where the image of $M$ under our isometry is dense in $\hat{M}$. But these facts were proved in similar ways. For groups, we map each $g \in G$ to $g \mapsto \sigma_g$ where $\sigma_g$ is defined as $\sigma_g(x) = gx$. For metric spaces, we fix $a \in M$ and map each $x \in M$ to $x \mapsto f_x$ where $f_x(y) = d(x,y) - d(a,x)$. The desired results follow.

Is there something more general "going on", or is it just a coincidence that these results are proved in a similar way?

-

The general phenomenon being described here is called currying. You have a function $f : X \times Y \to Z$ with two inputs and one output, and by fixing one input you can associate to every $x \in X$ a function $f(x, -) : Y \to Z$. In other words, $f$ also describes a function $X \to Z^Y$ (where $Z^Y$ denotes the set of functions $Y \to Z$). This is a common pattern in mathematics and it is good to understand and get used to it; it recurs constantly.
In the first example, the function being curried is the action, regarded as a function $G \times X \to X$. The curried function is a function $G \to X^X$. In the second example, the function being curried is the metric, regarded as a function $M \times M \to \mathbb{R}$. The curried function is a function $M \to \mathbb{R}^M$ (and then a second function is added to it).