# How to characterize functions that map convex sets to convex sets?

Let $f: \mathbb{R}^n \to \mathbb{R}^n$.

What is a necessary and sufficient condition for the following? If $C$ is a convex subset of $\mathbb{R}^n$, then so is $f(C)$.

It's easy to find various sufficient conditions (I won't attempt an exhaustive list here), but I've been unable to find interesting necessary conditions.

If it helps, I'm happy to assume that $C$ is closed and/or bounded.

If a necessary and sufficient condition is known for $\mathbb{R}^n$, can it be extended to general vector spaces? Alternatively, if such a condition is unknown, could someone explain why the problem is difficult?

• Do you want a characterisation of functions $f$ that map all convex sets to convex sets? Because the way you phrased your question, it looks like you want a characterisation for a fixed $C$. But this doesn't make much sense. – TonyK Mar 10 '17 at 17:52
• And if the answer to my question is yes, I think it is necessary and sufficient that $f$ maps every straight line or line segment to a straight line, a line segment, or a point. – TonyK Mar 10 '17 at 17:56
• The answer to your question is yes. I will edit for clarity. – grndl Mar 10 '17 at 18:13
• @TonyK I'm having trouble showing necessity. Let $C$ be a line (segment) such that $f(C)$ is not a line (segment, point). If $n=1$, then it follows that $f(C)$ is not convex. But how to conclude for $n \geq 2$? – grndl Mar 10 '17 at 18:51
• In full generality this question might be difficult: consider the existence of a space-filling curve from $[0,1]$ to $[0,1]^2$. Certainly all linear (affine) functions satisfy the property, as does any continuous function from $\Bbb R$ to $\Bbb R$. Does anyone have a simple example of another function that satisfies the property? – Greg Martin Mar 10 '17 at 18:56

The reason there is no necessary condition is that there are quite pathological maps $f$ that satisfy the condition (as discussed in comments). As discussed in this answer, there exists a function $g:\mathbb{R}^n\to \mathbb{R}$ that maps every nontrivial line segment onto $\mathbb{R}$. This can be composed with a surjection $\mathbb{R}\to\mathbb{R}^n$ (or a surjection of $\mathbb{R}$ onto a closed ball $B\subset \mathbb{R}^n$) to obtain a map $f$ such that $f(C)=\mathbb{R}^n$ for every convex set $C$ with more than one point. (Alternatively, $f(C)=B$ for any such $C$.)
This $f$ is quite terrible. There are no sensible function properties that it satisfies; yet, it preserves convexity. This is why we can't come up with a necessary property for convexity-preservation.