Is there a bijective function $f:[0,1] \to [0,1]$ such that the graph of $f$ in $\mathbb{R}^2$ is a dense subset of $[0,1] \times [0,1]$? (Exact same as title).
I think the question is not affected much if we ask the same question but for a function $f:(0,1) \to [0,1]$ or $f:[0,1) \to (0,1]$ etc, as opposed to $f:[0,1] \to [0,1]$, which was in the original question. All that really matters is that the domain and range are bounded, connected subsets of $\mathbb{R}^2$.
I suspect the answer to the question is yes, but I don't know how to construct such a function.
The first thing to note is that, if such a function exists it must be nowhere continuous, else the graph of f would not be dense throughout all of $[0,1] \times [0,1]$. However, it is not clear if the graph of our function would be a totally disconnected subset of $[0,1] \times [0,1]$.
Can a nowhere continuous function have a connected graph?
I have actually not read the answers to the above question in any detail, and anyway, it may not be relevant to answer the question here (although it might).
My attempt:
Let $f_{ Conway_{(0,1)} }:(0,1) \to \mathbb{R} $ be the Conway base-13 function, but with domain restricted to $(0,1)$. Now define $f_{Conway_{(0,1)}bounded}(x) = \frac{1}{\pi} \arctan(f_{ Conway_{(0,1)} }(x)) + \frac{1}{2}$ with domain $(0,1)$ and range $(0,1)$. Then the function is well-defined, and the graph of $f_{Conway_{(0,1)}bounded}:(0,1) \to (0,1)$ is a dense subset of $[0,1] \times [0,1]$. Now we can easily modify our function $f_{Conway_{(0,1)}bounded}$ so that it has domain $[0,1]$ and range $[0,1]$, and I will assume the reader can do this and leave the details for brevity. But the point is, these missing two points in the domain, $0$ and $1$, are not a problem.
The problem is that our function is not injective.
Note that we cannot answer the question by only removing points from the graph of $f_{Conway_{(0,1)}bounded}$, for then you would be removing lots of points from the domain, and so this would not be a function with domain $(0,1)$. So maybe doing something clever to $f_{Conway_{(0,1)}bounded}$, or perhaps coming up with an entirely different way to construct a function to answer the question is necessary.