Equality for Convex Functions A function $f$ is convex on $\mathbb{R}$ if for all $x\in \mathbb{R}$ $\lambda \in [0,1]$
$$ f(\lambda x+(1-\lambda) y)\leq \lambda f(x)+(1-\lambda)f(y),   $$
Similarly we can define a convex functional, for instance the Wasserstein Metric on the space of probability measures (say on $\mathbb{R}^d$) is convex, indeed if we define
$$
W^2_2(\mu,\nu)=\inf_{\pi\in \Pi(\mu,\nu)} \int_{\mathbb{R}^d\times\mathbb{R}^d} |x-y|^2 d\pi(x,y)
$$
where $\Pi(\mu,\nu)$ are joint probability measures with marginals $\mu,\nu$. Then $W_2$ is convex i.e for all $\mu_1,\mu_2,\nu_1,\nu_2$ $\lambda\in[0,1]$
$$
W_2^2\Big(\lambda\mu_1+(1-\lambda)\mu_2,\lambda\nu_1+(1-\lambda)\nu_2\Big)\leq \lambda W_2^2(\mu_1,\nu_1) +(1-\lambda) W_2^2(\mu_2,\nu_2).
$$
$\underline{\textbf{Question}}$ how to characterise those points at which we have equality in these inequalities?
$\underline{\textbf{Some thoughts}}$  :
$\bullet$ Obviously whenever $x=y$, or $\mu_1=\mu_2,\nu_1=\nu_2$ we have equality. So set them not equal.
$ \bullet$ Take the classic example $f(x)=|x|$ then we have equality if $x,y$ have the same sign.
 A: In general the equality holds if $\lambda = 0$ or $\lambda = 1$ or $x$ and $y$ are in an affine set where the function is affine. Note that every single element set is affine. Proof: Suppose $$f(\lambda x + (1 - \lambda) y) = \lambda f(x) + (1-\lambda) f(y)$$ for some $\lambda \in (0, 1)$. If for some $\lambda_1 \in (\lambda, 1)$ we have $$\tag{1}f(\lambda_1 x + (1 - \lambda_1) y) < \lambda_1 f(x) + (1-\lambda_1) f(y)$$ then take $x_1 = \lambda_1 x + (1 - \lambda_1) y$ and $\lambda_2 = \frac{\lambda}{\lambda_1} < 1$. Now $$\begin{aligned} \lambda f(x) + (1-\lambda)f(y) &= \lambda_2(\lambda_1 f(x) + (1-\lambda_1)f(y)) + (1-\lambda_2)f(y) \\ &>\lambda_2 f(x_1) 
 + (1-\lambda_2)f(y) && \text{by (1)} \\ &\ge f(\lambda_2 x_1 +  (1-\lambda_2)y) &&\text{by convexity} \\ &= f(\lambda_2(\lambda_1x + (1-\lambda_1)y) + (1-\lambda_2)y) \\ &= f(\lambda x + (1-\lambda) y) = \lambda f(x) + (1-\lambda)f(y)\end{aligned}$$ A contradiction. This implies $f(\lambda_1 x + (1 - \lambda_1) y) = \lambda_1 f(x) + (1-\lambda_1) f(y)$ for all $\lambda_1 \in (\lambda, 1)$. The case $\lambda_1 \in (0, \lambda)$ follows by swapping $x$ and $y$.
