Example of onto function R->R^2

Any combination of vectors along the x-axis will not be able to leave the x-axis to cover the entire xy plane, so i was thinking of something like f(x) = [itex]\left|\stackrel{t}{x}\right|[/itex] for any t[itex]\in[/itex]ℝ, but I was wondering if there are more elegant examples...

Let: ##t\in\mathbb{R}##
... then I can define two functions ##x,y \in \mathbb{R}\rightarrow\mathbb{R}\; : \; x=f(t), y=g(t)##
... then I can make ##z:\mathbb{R}\rightarrow\mathbb{R}^2\; : \; \vec{z}=(x,y)##

@Aziza, what do you mean by "any [itex]t \in \mathbb{R}[/itex]". If your [itex]f[/itex] is a function, then for a given input [itex]x[/itex], you need to specify a unique output [itex]f(x)[/itex]. E.g. [itex]f(1)[/itex] can only be one point in the plane, you can't have [itex]f(1) = (1, 0)[/itex], and also [itex]f(1) = (1,1)[/itex], and also [itex]f(1) = (1, -\pi)[/itex], and so on.

Since I can't tell whether this is a homework question or not, I'll give you something between a hint and a full answer: for a given [itex]x \in \mathbb{R}[/itex], split the decimal expansion of [itex]x[/itex] into two parts and create new real numbers out of each of those two parts (we can call these two numbers [itex]a(x)[/itex] and [itex]b(x)[/itex]). Then if you've done things right, the function [itex]f:\mathbb{R} \to \mathbb{R}^2[/itex] defined by [itex]f(x) = (a(x), b(x))[/itex] will be surjective.

@Simon, Aziza has asked for a surjective function [itex]\mathbb{R} \to \mathbb{R}^2[/itex]. You've given a function [itex]\mathbb{R} \to \mathbb{R}^2[/itex], but nothing about it makes it onto. Note that onto is a technical term, another word for it is surjective. A function [itex]f: A \to B[/itex] is surjective iff [itex]\forall b \in B, \exists a \in A : f(a) = b[/itex].