Let $S$ be a finite set. Show that any function $f: S \rightarrow \mathbb{R}^n$ is continuous on S. What if $S$ is countably infinite? I struggling with R.K. Sundaram 1.7.43 exercise: 
Let $S$ be a finite set. Show that any function $f: S \rightarrow \mathbb{R}^n$ is continuous on S. What if $S$ is countably infinite?
I saw that by this page the definition of continuity is simple, but i'm havind douts with finite set definition.
Any thought would be appreciated.
tks
 A: If $S$ is finite, there is a minimum distance between elements, call this $D$. 
Take some $x_0 \in S$. Suppose $\epsilon>0$. Let $\delta = \dfrac{D}{2}$. If $|x-x_0|<\delta$, you must have $x=x_0$. So $f(x)=f(x_0)$ and so $|f(x)-f(x_0)|=|f(x)-f(x)|=0 < \epsilon$. 
This means that $f$ is continuous at each $x_0$ (in fact, uniformly continuous).
If you let $S$ be infinite, this minimum distance may no longer exist. So the above argument doesn't work.
In fact, it's easy enough define a discontinuous function with a countable domain. Take for example: $f(1/n)=1/n$ for all $n=1,2,\dots$ and let $f(0)=123$.
The domain of $f$ is $\left\{\dfrac{1}{n} \;\Bigg|\; n=1,2,3,\dots \right\} \cup \{0\}$. It isn't hard to prove $f$ is discontinuous at $0$.
A: Assuming $S \subset \mathbb{R}$ with the induced metric, $S$ is a hausdorff space. In particular, it is $\tau_1$. Since it is finite, every set is a complement of a finite set, which is a finite union of points (which are closed), hence every set is open. Therefore, the topology is discrete. Hence, every function from $S$ to $\mathbb{R}$ (in fact, any space) is continuous.
For a counter-example to the enumerable case, take for instance $S=\{\frac{1}{n}\}\cup \{0\}$. It is easy to see that $f$ defined as $1$ in each $\frac{1}{n}$ and $0$ in $0$ is not continuous.
A: Let $x_n$ be a sequence such that $x_n\to x$. Then,obviously, $x_n$ remains a constant after finite terms, that is, $\exists ~N\in\mathbb{N}$ such that $x_n=x_0$ for all $n\geq N$. Therefore, $f(x_n)\to f(x)$
