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.
 A: *

*$S$ is non-empty - trivial since both $f(X)$ and $g(X)$ are nonempty subsets of $\mathbb{R}$

*$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. 

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

