Can a function whose domain is noncovex be a convex function?

59 Views Asked by At

Suppose I have a function $f:\text{dom}(f)\rightarrow\mathbb{R}$, where $\text{dom}(f) \subseteq \mathbb{R}^n$, that obeys the convexity rule, i.e.,

$$ f(\theta\mathbf{x}+(1-\theta)\mathbf{y}) \leq \theta f(\mathbf{x}) + (1-\theta)f(\mathbf{y}),\;\forall\; \mathbf{x}, \mathbf{y} \in \text{dom}(f), 0\leq\theta\leq 1 $$

However, consider further that $\text{dom}(f)$ happens to be a nonconvex set, e.g.,

enter image description here

  • Is it possible to have such situation?
  • If the previous question is yes, is $f$ a convex function?