A question regarding continuous functions on metric spaces

28 Views Asked by At

Let $X$ be a metric space and let $f$ be continuous on $X$. Then how do you show that this is true if and only if $f$ is continuous on every compact subset of $X$. I tried a contradiction approach but I that didn’t work out. Any help will be highly appreciated.

1

There are 1 best solutions below

0
On

Here $f$ is continuous iff $x_n\rightarrow x$ implies $f(x_n)\rightarrow f(x)$. Note that $\{x_n\}\cup \{x\}$ is a compact set. Hence continuity on compact set implies continuity.