# proving compactness and convexity of a set

Suppose functions $f(x)$ and $g(x)$ are continuous with domain $X \subset \mathbb{R}$ which is nonempty, convex and compact, can we show that $$S \equiv (f(x), g(x))$$ for all $x \in X$ is nonempty, compact and convex? If it is possible to show, please provide me hints on how to prove.

-
You haven't yet told us what's the image of the functions...! And is $\,X\,$ just a general compact convex topologuical space? – DonAntonio Jan 8 '13 at 12:40
$S$ non-empty and compact should be no problem. Convexity is: are $f$ and $g$ linear? If not, take $X = [0,2\pi]$ and $f(x) = \cos{x}$ and $g(x) = \sin{x}$ (for example). – Martin Jan 8 '13 at 12:42
Then you are working on $\,\Bbb R\,$ and the functions are real...good. – DonAntonio Jan 8 '13 at 12:46
Think of $x \mapsto (f(x),g(x))$ as a path in the plane. You should see that the answer depends a lot on what your $g$ looks like. // I removed (proof-theory) from your question because that's a branch of mathematical logic. – Martin Jan 8 '13 at 12:53
@Martin In effect, I have $f(x)=g(x)$ for any given $x \in X$. Can this help to provide a specific claim to the proof? – Daniel Lårs Jan 8 '13 at 13:13

1. $S$ is non-empty - trivial since both $f(X)$ and $g(X)$ are nonempty subsets of $\mathbb{R}$
2. $S$ is compact - since $f$ and $g$ are continuous on a compact set $X$, it follows that $f(X)$ and $g(X)$ are compact sets. This means, by Heine-Borel, they are closed and bounded. Boundedness implies that $S=(f(x),g(x))$ is bounded. To show $S$ is closed, take a sequence in $\{(a_n,b_n)\}_{n=0}^\infty\subset S$ that coverges to $(a,b)\in\mathbb{R}^2$. Since convergence in $\mathbb{R}^2$ occurs if and only if we have convergence in both components, it follows that $a_n\rightarrow a$ and $b_n\rightarrow b$. By construction $a_n=f(\tilde{a}_n)$ and $b_n=g(\tilde{b_n})$ for some tilde real sequences. Since $f(X)$ is compact, it is closed. This tells us that $a_n=f(\tilde{a}_n)\rightarrow a \in f(X)$. Since $g(X)$ is compact, it is closed. This tells us that $b_n=f(\tilde{b}_n)\rightarrow b \in g(X)$. Therefore $a=f(\tilde{a})$ and $b=g(\tilde{b})$ implying $(a,b)\in S$. This shows closedness. Since closed and bounded, by Heine-Borel, S is compact.
3. Since $f(x)=g(x)$ for all $x\in X$ and since continuous functions from $\mathbb{R}$ to $\mathbb{R}$ take convex sets to convex sets, convexity follows.