# Convex hull of the union of compact and convex sets

Let X be a normed space and $$A,B \subset X$$.

I need to prove that if $$A$$ and $$B$$ are compact and convex then $$conv(A \cup B)$$ is compact. (Here $$conv(A \cup B)$$ is the convex hull of $$A \cup B$$)

If $$U_{i \in I}$$ is a finite cover for $$A$$ and $$V_{j \in J}$$ is a finite cover for $$B$$, how do I cover the elements of $$z \in conv(A \cup B)$$ such that $$z \notin A$$ and $$z \notin B$$?

I tought to pick one element of each $$U_{i}$$ and $$V_{j}$$ and for each pair $$(u_{i},v_{j})$$, the number of pairs $$(u_{i},v_{j})$$ is finite, create a line segment. Then at each midpoint create an open ball that covers the entire line. But I can't prove that this will cover all that points in the convex hull and I think that this will not be the right path.

I think you can consider the function $$f : A \times B \times [0,1] \rightarrow \mathrm{Conv}(A \cup B)$$ defined by $$\forall (a,b,t) \in A \times B \times [0,1], \quad f(a,b,t)=ta+(1-t)b$$
I think that $$f$$ is surjective (because $$A$$ and $$B$$ are convex), and that it is continuous on the compact $$A \times B \times [0,1]$$ (for the natural topology), so its image is compact.
First notice that $$\operatorname{Conv}(A \cup B) = \{(1-t)a+tb : t \in [0,1], a\in A, b \in B\}$$ Clearly $$\supseteq$$ holds. Conversely, take $$x \in \operatorname{Conv}(A \cup B)$$ and write it as $$x = \sum_{i=1}^n \alpha_ia_i + \sum_{j=1}^m \beta_jb_j$$ for some $$a_1, \ldots, a_n \in A$$, $$b_1, \ldots, b_m\in B$$, $$\alpha_1, \ldots, \alpha_n, \beta_1,\ldots\beta_m \ge 0$$ and $$\sum_{i=1}^n \alpha_i + \sum_{j=1}^n \beta_j = 1$$. We have $$x = \sum_{i=1}^n \alpha_ia_i + \sum_{j=1}^m \beta_jb_j = \left(1 - \sum_{j=1}^m \beta_j\right)\underbrace{\sum_{i=1}^n \frac{\alpha_i}{1 - \sum_{j=1}^m \beta_j}a_i}_{\in A} + \underbrace{\left(\sum_{j=1}^m \beta_j\right)}_{\in[0,1]}\underbrace{\sum_{j=1}^m \frac{\beta_j}{\sum_{j=1}^m \beta_j}b_j}_{\in B}$$ since $$A$$ and $$B$$ are convex. Hence $$\subseteq$$ follows.
Now you can easily show that $$\operatorname{Conv}(A \cup B)$$ is sequentially compact: let $$(x_n)_n$$ be a sequence in $$\operatorname{Conv}(A \cup B)$$. Hence $$x_n = (1-t_n)a_n + t_nb_n, \text{ for some } t_n \in [0,1], a_n \in A, b_n \in B$$ Since $$[0,1],A,B$$ are all compact, we can extract subsequences $$(t_{p(n)})_n, (a_{p(n)})_n, (b_{p(n)})_n$$ which converge to $$t_0 \in [0,1], a_0\in A, b_0 \in B$$.
Therefore $$x_{p(n)} \to (1-t_0)a_0 + t_0b_0 \in \operatorname{Conv}(A \cup B)$$ which proves the claim.