6
$\begingroup$

I was asked in a exam: does there exist a function(need not be continous) $f:\mathbb{R}\rightarrow \mathbb{R}$ whose graph is dense in $\mathbb{R}^2$?

I proved that graph of a discontinuous linear map is dense but did not provide explicit example, could any one give me one such? thank you

  • 1
    See [Function with range equal to whole reals on every open set](http://mathoverflow.net/questions/32126/function-with-range-equal-to-whole-reals-on-every-open-set/) at MO Many examples from this question have the same property: [Can we construct a function $f:\mathbb R\to \mathbb R$ such that it has intermediate value property and discontinuous everywhere?](http://math.stackexchange.com/questions/21812/)2012-11-02

1 Answers 1

7

For terminating decimals $x=.d_1d_2\dots d_n$, let $f(x)=.d_nd_{n-1}\dots d_2d_1$. For other $x$, define $f$ however you like. This will give a map from $I=[0,1]$ to $I$, dense in $I\times I$. Now compose with any continuous map from $I$ onto the reals, and make $f$ periodic with period 1.

  • 0
    More examples of such functions from $[0,1]$ to $[0,1]$ can be found in the answers to [Does there exist a function $f:\[0,1\] \to\[0,1\]$ such its graph is dense in $\[0,1\]\times\[0,1\]$?](http://math.stackexchange.com/questions/139791/does-there-exist-a-function-f0-1-to0-1-such-its-graph-is-dense-in-0-1)2012-11-02