# Prove that a function that maps a discrete metric space to any metric space is continuous [closed]

Let $f:D→M$ where $M$ can be any metric space and $D$ is any set with the discrete metric. Prove that $f$ is continuous.

I'm not sure where to begin with this.

• Well, one place to begin would be to write down the definition of what it means for a function $f$ between metric spaces to be continuous. – John Gowers Mar 8 '15 at 11:19

Since it is a metric space setup, you can made sequential argument. First show that any convergent sequence in a discrete metric space is eventually a constant sequence (i.e a sequence whose terms are constant after possibly a finite number of indices). Choose any $x\in D$. So if $x_n\to x$ in $D$ implies that $\exists n_0\in\Bbb N$ such that $x_n=x,\forall n\ge n_0$. Hence $f(x_n)=f(x),\forall n\ge n_0$ i.e. $f(x_n)\to f(x)$ in $M$. Hence $f$ is continuous at every point of $D$.