Prove the maximum of convex functions is also convex using this def. Could someone assist me in proving that the maximum of a convex function is also convex using the below definition? I cannot figure out how this proof would work and would appreciate some help!
$$
f(\lambda x +(1-\lambda)y) \le \lambda f(x)+(1-\lambda)f(y)
$$
$$
\lambda \in[1,0]
$$
Thank you!
 A: Step 1: Take only two convex functions $f(x)$ and $g(x)$.
Step 2: Let $\lambda\in[0,1]$. Show that:
\begin{align}
\max\{ f(\lambda x +(1-\lambda) y),g(\lambda x + (1-\lambda )y)\} \leq \max\{ \lambda f(x) +(1-\lambda) f(y),\lambda g(x) + (1-\lambda)g(y)\} 
\end{align}
Step 3: Show that $\max\{A+B,C+D\}\leq \max\{A,C\} + \max\{B,D\}$, for $A,B,C,D\in\mathbb{R}$
Step 4: Show that for  $\alpha\geq 0$ we have: $\max\{\alpha A,\alpha B\}=\alpha\max\{A,B\}$, for $A,B\in\mathbb{R}$.
Step 5: Finish the proof. Repeat for more functions (induction).
A: Let $f_{1}$ and $f_{2}$ be convex, and let $f=\max(f_{1},f_{2})$. $f(\lambda x+(1-\lambda)y)=\max({f_{1}(\lambda x+(1-\lambda)y),f_{2}(\lambda x+(1-\lambda)y)}) \leq \max(\lambda f_{1}(x)+(1-\lambda)f_{1}(y)); \lambda f_{2}(x)+(1-\lambda)f_{2}(y))=\lambda \max(f_{1}(x),f_{2}(x))+(1-\lambda) \max(f_{1}(y),f_{2}(y))=\lambda f(x)+(1-\lambda)f(y)$$
A: I assume you have two convex functions $g$ and $h$ on some interval $I$, and you want to prove that $f$, defined as $f(x)=\max(g(x),h(x)), x\in I$ is convex too.
For $x,y \in I$, and $\lambda \in [0, 1] $, one of the functions $g$, $h$ is going to be the 'bigger' one at $(1-\lambda)x+\lambda y$, without loss of generality let's assume that it is $g$. Thus, $f((1-\lambda)x+\lambda y)=g((1-\lambda)x+\lambda y) \ge (1-\lambda)g(x)+\lambda g(y) \ge (1-\lambda)f(x)+\lambda f(y)$.
