# Proof verification: If $f:[0,1]^2\mapsto\mathbb{R}$ is continuous, then $f$ is not injective

If $$f:[0,1]^2\mapsto\mathbb{R}$$ is continuous, then $$f$$ is not injective

I start by ascerting that, since $$[0,1]^2$$ is compact, then there are $$x_1,x_2\in[0,1]^2$$ such that for every $$x\in [0,1]^2$$ $$f(x_1)\leq f(x)\leq f(x_2)$$; like this: So, if I declare the sets $$S$$ and $$S'$$ like this: The curves $$f(S)$$ and $$f(S')$$ will take all values between $$f(x_1)$$ and $$f(x_2)$$, since they will inherit continuity from $$f$$.

Thus, $$f$$ is not injective since $$S$$ and $$S'$$ both will have a point that maps to the same value between $$f(x_1)$$ and $$f(x_2)$$.

Is this proof correct? Thanks in advance.

• Can you explain more what the two sets $S$ and $S'$ are? It seems very unclear... May 21, 2022 at 6:41
• It is much easier to prove this using connectedness. May 21, 2022 at 7:18
• I think your argument is clear and correct, and gets to the point nicely. You can formalise it by defining the paths $S$ and $S’$ mathematically, but I rather think that that isn’t necessary in this simple setting May 21, 2022 at 7:33
• (And if you need to satisfy a teacher, you might wanna point to a specific pair of points that break injectivity) May 21, 2022 at 7:35
• I like your proof a lot. I think it is nice and clear. You might add that in the second step you choose some value $y$ strictly intermediate between $f(x_1)$ and $f(x_2)$, and that because of the intermediate value theorem both a point on $S'$ and on $S$ must get mapped to $y$. To be totally precise, you should also say that without loss of generality $f(x_1) < f(x_2)$.
– Nico
May 21, 2022 at 9:14

Let $$A:=[0,1]^2.$$ Clearly, $$A$$ is connected. Suppose that $$f$$ is injective. The image of $$f:A\to\Bbb{R}$$, $$f(A)$$, is a closed interval, since $$f$$ is continuous. Let $$x\in A$$ be any point such that $$f(x)$$ is not one of the end-points of the image $$f(A)$$. Now, $$A\setminus\{x\}$$ is connected and the restriction of $$f$$ on this set, denoted by $$f_{|_{A\setminus\{x\}}}$$ is also continuous and injective. But the image of $$f_{|_{A\setminus\{x\}}}$$, $$f(A)\setminus\{f(x)\}$$ (because $$f$$ is injective), is not connected, leading to a contradiction.
• Why must injectivity imply the image is an interval? Continuity alone ensures this since $A$ is connected. May 21, 2022 at 8:46
• I believe the statement $f(A\setminus\{x\})=f(A)\setminus f(x)$ is where you actually need injectivity May 21, 2022 at 8:48
Let $$f:[0,1]^2\to\Bbb R$$ an injective continuous function. Suppose an $$a\in ([0,1]^2)^\circ$$; then $$f$$ is still continuous in connected $$[0,1]^2\setminus\{a\}$$, but $$f([0,1]^2\setminus\{a\})=f([0,1])\setminus \{f(a)\}$$ is an interval without one point (by injectivity), so it is not connected, which is false, because the continuous image of a connected set is connected.