MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a topological question that came up tangentially to some material I was working on. Suppose $X$ and $Y$ are complete metric spaces and $D$ is a dense subset of $X$. Let $f:D\mapsto Y$ be a continuous injection. Extend $f$ to a function $g:X\mapsto Y$ by continuity. Must $g$ be injective? It seems to me that the answer should be yes, but I haven't been able to prove it.

share|cite|improve this question
You may state the question starting from g. Can it happen that a continuous non-injective $g:X\to Y$ between complete metric space restrict to an injective function on a dense subset $D$? Of course it can, another example is e.g $x\mapsto x^2$ on $X=Y=\mathbb{R}$, restricting on $D$:={positive rationals and negative irrationals}. – Pietro Majer Aug 26 '11 at 13:13
up vote 10 down vote accepted

Map the open unit interval to a circle minus a point, and then extend it to the closed interval.

share|cite|improve this answer

Joel has completely answered the question, but let me add another example, with a bigger failure of injectivity of $g$. Let $D$ be the set of points in the plane of the form $(\frac1n,\sin n)$ for positive integers $n$. Its closure consists of $D$ plus the segment $S=\{0\}\times[-1,1]$ on the $y$-axis. The projection $(x,y)\mapsto x$ is one-to-one on $D$ but its continuous extension to the closure $D\cup S$, given by the same projection formula, is constant on $S$, i.e., on a bigger set than the set $D$ on which it's one-to-one.

There are analogous examples with the segment replaced by any complete, separable, metric space, for example, Hilbert space. And the only reason for needing the word "metric" there is because it was in the question; otherwise, there would be a Stone-Čech compactification example here.

share|cite|improve this answer
To answer your query, which I've now deleted, about getting the accent on Čech's name: on my computer (UK keyboard, Linux) it's done by typing AltGr-@ followed by C. – Tom Leinster Aug 26 '11 at 3:56
@Tom: Thanks. – Andreas Blass Aug 26 '11 at 4:50
Another similar example to this would be to use a dense subset of the plane that contains at most one point from each column. (One can even make it countable by using only rational points.) Thus, the projection map of this set to the $x$-axis is injective, but extends by continuity to the full projection map of the plane to the $x$-axis. – Joel David Hamkins Aug 26 '11 at 11:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.