Prove that the function $f(x) = |x - 3|$ is continuous at $x = 3$ To Prove that the function $f(x) = |x - 3|$ is continuous at $x = 3$,
I consider that given $\varepsilon > 0$, there exists $\delta = \text{min} \lbrace 1, \varepsilon \rbrace >0$, such that $\vert x-3 \vert < \delta $ implies that $ \vert \vert x-3 \vert -0 \vert =  |x - 3| < \delta = \varepsilon$
I have two questions to ask the community. First: Is this proof correct?
Second: If correct, then what if we had x=2 instead?
Thanks for your contribution in advance.
 A: A function f is continuous at $x=p$ if, for every $\epsilon > 0$, there exists an $\delta > 0$, such that
$$|x-p| < \delta \implies |\mathrm f(x)-\mathrm f(p)| < \epsilon$$
In your case $\mathrm f(x) = |x-3|$, and you asked what happens at $x=2$.
Our definition of continuity becomes
$$|x-2| < \delta \implies ||x-3|-1| < \epsilon$$
If $|x-2| < \delta$ then, $-\delta < x-2 < \delta$, and so $2-\delta < x < 2 + \delta$.
If $2-\delta < x < 2 + \delta$, then $-1-\delta < x-3 < -1 + \delta$, and so $|\delta-1| < |x-3| < |\delta+1|$.
Assuming that $\delta < 1$, we have $\delta-1<0$, and so $|\delta-1|=-(\delta-1) = 1-\delta$.
Since $\delta > 0$, we have $\delta+1 > 0$, and so $|\delta+1|=\delta+1$.
Hence, if  $|\delta-1| < |x-3| < |\delta+1|$, then $1-\delta < |x-3| < 1+\delta$.
If $1-\delta < |x-3| < 1+\delta$, then  $-\delta < |x-3|-1 < \delta$, and so $0 \le ||x-3|-1| < \delta$.
Hence we need $\delta < 1$ by assumption and to choose $\delta$ less than $\epsilon$: 
$$\delta < \min(1,\epsilon)$$
A: Lemma: Let $f: \Bbb R\to \Bbb R$ be continuous function then $g:\Bbb R \to \Bbb R$ defined as $x \to \vert f(x)\vert$ is continuous.
Solution: Use the $\epsilon-\delta$ definition with the following equality: for any $a,b \in \Bbb R$, $$\big||a| - |b|\big| \le |a - b|$$
Also note that converse of the above lemma is false, for example you can take the following function (Thanks to @Peter):
$$f(x) = \begin{cases} -1, & x \not\in \mathbb{Q}\\ 1, & x \in \mathbb{Q} \end{cases}$$ 
A: It is correct. For prove that $f$ is continuous at $x=2$ we have to prove that $\forall \varepsilon>0, \ \exists \delta>0$ such that  $| x-2 | < \delta $ implies that $| | x-3 | - | 2-3 | |=||x-3|-1| < \varepsilon $. Then you choose an appropriate $\delta$. Note that you only have found $\delta=\varepsilon$ because $||x-3|-|x_0-3||=|x-3|$ when $x_0=3$, if you try to prove continuity in other point this doesn't happen. 
A: If you want continuity at $x=2$, note that in a sufficiently small neighbourhood of $2$, say within $0.5$, the function is $g(x) = 3 - x$. The function $g$ is continuous at $x=2$, since $|x-2|<\delta \rightarrow |(3 - x) - (3 - 2)| = |x-2| < \epsilon$ which is clear if we choose $\delta = \epsilon$. 
We can thus choose $\delta = \min{(0.5, \epsilon)}$. 
A: As the function is piecewise linear, the case is not too complex. 
At the breakpoint,  $||(3+\epsilon) -3| -0|\le |\epsilon|$. So for each $\delta = |\epsilon|$, stuff easily works. The function is symmetric with respect to $3$, so continuity of the positive side of $3$ will imply continuity on the negative side. On the positive side, the function is $x-3$, which is continuous, as a sum of continuous functions.
More generally, the study of piecewise-defined functions can be split into continuity of the pieces, and continuity at the junctions.
