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?
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.