How to define derivatives in Wasserstein space Let $M$ be a Polish space equipped with a metric $d$. Let $p\geq 1$. The $p^{th}$ Wasserstein distance between $\mu,\nu \in \mathcal P_p(M)$ (the space of Borel measures on $M$ with finite $p$ moments) is
$$
W_{p}(\mu, \nu):=\left(\inf _{\pi \in \Pi(\mu, \nu)} \int_{M \times M} d(x, y)^{p} \mathrm{d} \pi(x, y)\right)^{1 / p}.$$
$(P_p(M), W_{p})$ is a metric space called the $p^{th}$ Wasserstein space. How do we define a derivative of a functional
$$F: (P_p(M), W_{p}) \rightarrow \mathbb R ?$$
The Wasserstein space is not a normed vector space, so the Fréchet derivative does not make sense. A particular functional I am interested in is $F(\mu)=W_{p}(\mu, \delta_0)$. People do study gradient flows in Wasserstein spaces so a rigorous definition must exist.
Is this related to metric derivatives?
 A: There are many ways to generalize the definition of the derivative to something that makes sense in $(\mathcal{P}_p, W_p) $, it depends exactly on what one wants to do, if you want to obtain intuition first, you can make use of the so called 'Otto Calculus' which you can read at 'The geometry of dissipative evolution equations:  The porous medium equation.' by Felix Otto.
In a more concrete and rigorous way, let me give you two approaches:
The first one is to use the variational derivative (mainly beacause it has an optimality criterion like the 'first order test' we have in calculus $g'(x_0) = 0 $), for a functional $F:(\mathcal{P}_p,W_p) \to \mathbb{R}$ and a probability measure $\rho $, if $F(\epsilon \rho + (1-\epsilon) \tilde{\rho}) < \infty$ (for all $\tilde{\rho}$ in a suitable class) we define the variational derivative of $F$ at $\rho$ as the function $f$ such that
$$ \frac{d}{d\epsilon}\bigg|_{\epsilon = 0} F(\rho + \epsilon (\tilde{\rho} - \rho)) = \int f d (\tilde{\rho} - \rho) $$
whenever it exists, again for all $\tilde{\rho}$ in a suitable class. Again though it is not a derivative in the usual sense it does have an optimality criterion, which is fundamental for the study of Wasserstein flows as it appears in the continuity equation $$ \partial_t \mu + div( \mu \cdot ( f \mu)) = 0 $$
where $f$ is the variational derivative of $F$.
Further the variational derivative of $W_2(\mu,\nu)^2$ is $ \varphi_{\mu,\nu}$, the Kantorovich potential between the measures.
A second interesting approach is to (instead of defining the derivative) only defining it's slope, $ \frac{d^+ F}{d\rho}$ which also appears in the Evolution Variational Inequality in the context of Gradient Flows.
Both of these concepts can be found in 'Optimal Transport for Applied Mathematicians' by Santambrogio or in Villani's second book or in the more technical (but more specific) 'Gradient Flows in Metric spaces and in the space of Probability measures' by Ambrosio, Gigli and Savaré.
I hope this is helpful and I didn't make horrible mistakes.
