Let $n \in \mathbb{N}$. Let $\mathcal{L}^n$ denote $n$-dimensional [Lebesgue measure](/page/Lebesgue%20Measure) on $\mathbb{R}^n$. Let $\mu,\nu \in \mathcal{P}_2(\mathbb{R}^n)$ be Borel probability measures with finite second moment on $\mathbb{R}^n$, and assume that $\mu \ll \mathcal{L}^n$. Let $\Pi(\mu,\nu)$ denote the set of Borel probability measures on $\mathbb{R}^n \times \mathbb{R}^n$ with first marginal $\mu$ and second marginal $\nu$. Let $\mathcal{T}(\mu,\nu)$ denote the set of Borel maps $S: \mathbb{R}^n \to \mathbb{R}^n$ satisfying $S_\#\mu=\nu$. Let $c: \mathbb{R}^n \times \mathbb{R}^n \to [0,\infty)$ be the quadratic cost defined by $c(x,y)=|x-y|^2$.
paragraph
admin
Then there exists a proper lower semicontinuous convex function $\varphi: \mathbb{R}^n \to (-\infty,\infty]$ such that $\mu$ is concentrated on the set
paragraph
admin
\begin{align*}
D_\varphi := \{x \in \mathbb{R}^n : \varphi(x)<\infty \text{ and } \varphi \text{ is differentiable at } x\}.
\end{align*}
latex_env
admin
Define $T: \mathbb{R}^n \to \mathbb{R}^n$ $\mu$-almost everywhere by $T(x)=\nabla\varphi(x)$ on $D_\varphi$, and choose any Borel representative on all of $\mathbb{R}^n$. Then $T \in \mathcal{T}(\mu,\nu)$ and
paragraph
admin
\begin{align*}
\int_{\mathbb{R}^n} |x-T(x)|^2\, d\mu(x)=\inf\left\{\int_{\mathbb{R}^n} |x-S(x)|^2\, d\mu(x): S \in \mathcal{T}(\mu,\nu)\right\}.
\end{align*}
latex_env
admin
The map $T$ is unique $\mu$-almost everywhere among all maps in $\mathcal{T}(\mu,\nu)$ attaining this infimum. The unique optimal Kantorovich plan in $\Pi(\mu,\nu)$ for the cost $c$ is $(\operatorname{id}_{\mathbb{R}^n},T)_\#\mu$.