Associate a unique real number to any n-dimensional vector Let us suppose to fix a dimension $d$ for a vector space $\mathbb{R}^d$. I want to define a bijection $f\colon \mathbb{R}^d \leftrightarrow \mathbb{R}$. I first thought of the norm $||v||$, but thtat does provide the same representation for vectors $(0.5,0.6)$ and $(0.6,0.5)$, while I want to distinguish such two cases.
I know that it is potentially possible do define such bijection for  $\mathbb{N}^d$ by using the bijection $f_N\colon \mathbb{N}^d\leftrightarrow \mathbb{N}$ which is defined as follows:
$$f_N(v_1,\dots,v_d):=\begin{cases} b(0,0) & n = 0\\ b(1,v_1) & n=1\\ b(d,r(v_1,\dots,v_d)) & n>1\\ \end{cases}$$
Where $r$ is recursively defineda s follows:
$$r(v_1,\dots,v_n)=\begin{cases} b(v_2,v_1)& n=2\\ b(v_n,r(v_1,\dots,v_{n-1})) & n>2\\ \end{cases}$$
and $b$ is defined as a dovetailing function 
$b(i,j):=\sum_{k=0}^{i+j}k\;+\;j$. 
If $f\colon \mathbb{R}^d\leftrightarrow \mathbb{R}$ cannot be defined in general, I'm wondering if that would work over some specific restrictions, a part from the case where we have a finite number of vectors to represent, and therefore we might directly use the $f_N$ function after enumerating all the possible values contained within the vectors of interest.
 A: You are looking for an bijection of $\mathbb{R}^n$ into $\mathbb{R}$, and this exists, since these sets have the same infinite cardinality (namely, that of $\mathbb{R}$). This is a pretty artifical answer though, and one could hope for a natural way of doing this, eg, by insisting that our function is continuous.
However, this is not possible, given such a function $f$, fix a point $x$ in its image, and look at the preimage of $\mathbb{R}\setminus x$ in $\mathbb{R}^n$. On one hand, this is just $\mathbb{R}^n\setminus f^{-1}(x)$, which is connected, but on the other it is the disjoint union of $f^{-1}\{y\in \mathbb{R}|y>x\}$ and $f^{-1}\{z\in \mathbb{R}|z<x\}$, which are open by our continuity assumption, a contradiction.
Whether or not continuity is important is your own decision, as you could still make a bijection by expressing real numbers as strings of digits, and say, interleaving them in a clever way, but "geometrically", there is no reasonable way of giving a bijection between $\mathbb{R}^n$ and $\mathbb{R}$.
