Continuity of $f(x)=\max\{x,0\}$ $$f(x)=\max\{x,0\}$$
I want to check whether this function is continuous in its domain $\mathbb{R}$ or not, but unfortunately I have no idea how to start.
 A: Notice that $f(x) = x$ for $x \in [0,\infty)$ and $f(x)=0$ for $x \in (-\infty,0]$. Proving continuity of $f$ on $\mathbb{R}$ from this point should be straightforward.
A: An alternative strategy to Edward's answer is to use a closed form expression for the $\max$ of two real numbers, $\max\left\{a,b\right\}=\frac{a+b+|a-b|}{2}$, show that $|\cdot|$ is continuous, and use the basic theorems of continuous functions. In fact, this can be generalized to show that $f=\max\left\{g,h\right\}$ is continuous whenever $g$ and $h$ are continuous. Also, these statements hold when $\max$ is replaced with $\min$, with $\min\left\{a,b\right\}=\frac{a+b-|a-b|}{2}$.
A: Slightly more generally, let $\phi:\mathbb{R}^n \to \mathbb{R}$ be given by $\phi(x) = \max_k x_k$.
Let $I(x) = \{ k | x_k = \phi(x) \}$.
If $k \in I(x), k' \in I(y)$, we have $\phi(x)-\phi(y) = x_k-y_{k'} \le x_k -y_k \le \|x-y\|_\infty$. Reversing the roles of $x,y$ gives
$| \phi(x)-\phi(y) | \le \|x-y\|_\infty$.
Hence $\phi$ ls Lipschitz continuous of rank 1.
Since the function $x \mapsto 0$ is continuous, and  composition of continuous functions is continuous, we see that $x \mapsto \max(0,x)$ is continuous.
