# Failure of one-to-one along a set of points implies set is uncountable or empty

How can I go about showing that if I have a function $f(x)$ that is continuous on an interval $I$, and there is a set $S$ where $f(x)$ fails to be 1 to 1. I need to show that $S$ is either uncountable or empty.

What is known:

$f(x) = f(y)$ for $y$ $\neq$ $x$ and $y$ $\in$ $I$ is the definition of one to one.

I know that if there exists an interval where 1-1 fails, I can use the proof that the subset of the reals is uncountable. However, what about singletons? Or the empty set?

• Suppose $f(x) = x(1-x)$ on the interval $[0,1].$ Then $f$ is not 1-1 on the set $S=\{0,1\}.$ Yet $S$ has only two points. – zhw. Dec 8 '15 at 2:24
• Any function is 1-1 on the empty set. – BrianO Dec 8 '15 at 2:28
• I think what was wanted but mis-stated is that (1) the length of I is not 0, and (2) if f is not 1-to-1 on some non-empty S, then f is not 1-to-1 on some uncountable T. – DanielWainfleet Dec 8 '15 at 3:02

If $S$ is non-empty, then there exist at least two points $x,y$ such that $x < y$ and $f(x) = f(y)$. There are two possibilities:
1. $f$ is constant on $[x,y]$, in which case $f$ fails to be one-to-one on a non-trivial interval.
2. $f$ is not constant on $[x,y]$. Without loss of generality we assume there exists $\alpha \in (x,y)$ such that $f(\alpha) > f(x)$. By the intermediate value theorem, $f$ attains every value in $[f(x),f(\alpha)]$ at least twice, so $f$ fails to be one-to-one on an uncountable subset of $[x,y]$.
• The question implicitly addressed the notion of singletons being potential answers, but can't $I$ be the empty set? Does that reduce to the trivial case where the function never fails to not be 1-1? – John Yates Dec 8 '15 at 2:20