$f$ continuous $\iff f(B(a,\delta))\subset B(f(a),\epsilon)$ My book says that when $f$ is continuous, we have that $\forall \epsilon>0$, there exists $\delta>0$ such that:
$d(x,a)<\delta \implies d(f(x),f(a))<\epsilon$
Then, my book says that this definition is equivalent to this one:
$f$ continuous $\iff$ for all $\epsilon>0$ there exists $\delta>0$ such that $f(B(a,\delta))\subset B(f(a),\epsilon)$
This isn't obvious for me. Can someone help me understanding why?
 A: $B(a,\delta)=\{x\colon d(x,a)<\delta\}$
$B(f(a),\epsilon)=\{y\colon d(y,f(a))<\epsilon\}$

the continuity condition: 
$d(x,a)<\delta \implies d(f(x),f(a))<\epsilon$ 
means that for every $x$ such that $d(x,a)<\delta$ you have $d(f(x),f(a))<\epsilon$, what is $f(x)\in \{y\colon d(y,f(a))<\epsilon\}=B(f(a),\epsilon)$
A: First of all, a correction: $f$ is continuous if for every $x$ and for every $\epsilon$, there exists a $\delta$ such that if $d(x,a)<\delta$, then $d(f(x),f(a))<\epsilon$.
Hints:


*

*One set, $A$, is a subset of another, $B$, if it is true that for every $x\in A$, $x$ is also an element of $B$.

*$x$ is an element of $B(a, \delta)$ if and only if $d(x,a) < \delta$

*Every element of $f(A)$ is of the form $f(x)$ for some element $x\in A$

A: Assume the first characterisation is true. 
Then we want to show $f(B(a, \delta))\subseteq B(f(a), \epsilon)$, so take any element $f(x)\in f(B(a, \delta))$.
As $x\in B(a, \delta)$, it must be less than $\delta$ away from $a$, and so the first characterisation says that the distance between $f(x)$ and $f(a)$ must be less than $\epsilon$. So $f(x)$ is within the ball of radius $\epsilon$. That is, $f(x)\in B(f(a), \epsilon)$ 
$f(x)$ was a general element of $f(B(a, \delta))$, so we've just shown $f(B(a, \delta))\subseteq B(f(a), \epsilon)$. 
Therefore the first characterisation implies the second.
Now let's go the other direction. Suppose the second statement is true, and then suppose $x$ is within $\delta$ of $a$, so $x\in B(a, \delta)$. This implies $f(x)\in f(B(a, \delta))$, and by the second characerisation, this implies $f(x)\in B(f(a), \epsilon)$. But that's precisely the same as saying $f(x)$ is within $\epsilon$ of $f(a)$.
Therefore $d(x, a)< \delta$ implies $d(f(x), f(a))< \epsilon$, and so the second characterisation implies the first.
Therefore they're equivalent!
