  In this paper, we remark that any optimal coupling for the quadratic
Wasserstein distance $W^2_2(\mu,\nu)$ between two probability measures $\mu$
and $\nu$ with finite second order moments on $\mathbb{R}^d$ is the composition
of a martingale coupling with an optimal transport map ${\mathcal T}$. We check
the existence of an optimal coupling in which this map gives the unique optimal
coupling between $\mu$ and ${\mathcal T}\#\mu$. Next, we give a direct proof
that $\sigma\mapsto W_2^2(\sigma,\nu)$ is differentiable at $\mu$ in the Lions
sense iff there is a unique optimal coupling between $\mu$ and $\nu$ and this
coupling is given by a map. It was known combining results by Ambrosio, Gigli
and Savar\'e and Ambrosio and Gangbo that, under the latter condition,
geometric differentiability holds. Moreover, the two notions of
differentiability are equivalent according to the recent paper of Gangbo and
Tudorascu. Besides, we give a self-contained probabilistic proof that mere
Fr\'echet differentiability of a law invariant function $F$ on
$L^2(\Omega,\mathbb{P};\mathbb{R}^d)$ is enough for the Fr\'echet differential
at $X$ to be a measurable function of $X$.
