8

A convex function is defined in a way that’s a bit weird to me, as it’s defined as a function whose area above the graph of a convex set is always convex.

Is it also true that if $f:S\to T$ is convex, then any convex set in $U\subseteq S$ maps to a convex set $f(U)\subseteq T$? This would mean a convex function is a “structure preserving map for structures on which convexity is defined”.

user56834
  • 12,323
  • It's worth noting that in the special case of $\mathbb{R}$, the convex subsets of $\mathbb{R}$ are just the intervals on $\mathbb{R}$, and so any continuous function at least conserves convexity, but there are plenty of continuous functions which aren't what we call "convex" functions. But all convex functions on the reals are continuous (https://math.stackexchange.com/questions/258511/proof-of-every-convex-function-is-continuous) so I speculate that being a convex function is probably a stronger condition. Great question, though! – Jack Crawford May 23 '19 at 11:52
  • Convexity is defined by an inequality so you can only to consider only real valued functions. – Kavi Rama Murthy May 23 '19 at 11:54
  • @KaviRamaMurthy You can talk about convexity on any metric space, not just the real numbers. – Jack Crawford May 23 '19 at 11:55
  • 2
    @JackCrawford I am taking about the range, not the domain. But even the domain had to be vector space. You cannot define a convex function on a metric space. – Kavi Rama Murthy May 23 '19 at 12:01

2 Answers2

6

An example of a convex function that is not continuous is $f$ defined on $[0,\infty)$ by $$ f(x) = \cases{1 & if $x =0$\cr 0 & if $x > 0$}$$ The range of this function is $\{0,1\}$ which is not convex.

Robert Israel
  • 470,583
1

Partial answer. Convex sets in an Euclidean space are connected and convex functions on open sets are continuous. So if $f$ is convex on some open set containing a convex set $S$ then the image is connected, hence also convex in $\mathbb R$. Also the image of any convex set in an Euclidean space (or even a normed linear space) under a real valued continuous convex function is convex. This is because the image is connected and any connected subset of $\mathbb R$ is an interval (which is convex).