TL;DR Can a bijective function $f : {\Bbb R}^n \to {\Bbb R} : \vec{x} \mapsto f(\vec{x})$ be constructed in such a way that I can always find the vector $\vec{x}$ if I know $f(\vec{x})$?
I am trying to find a way to store (sparse) matrices on my computer very efficiently. Which is why I am looking for such a function. This function has to be bijective, of course. If such a function exists and can be constructed, then that would mean that any matrix could be stored in a single number.
Let me visualize for everyone. Let $A$ be a $2\times 2$ matrix :
$$ A = \begin{pmatrix} a_1 & a_2 \\ b_1 & b_2 \end{pmatrix} $$
and let $A_i$ denote the $i$th row of $A$. Using the function I am looking for on the rows of $A$, I would get : $$ \left(\begin{matrix} f(A_1) \\ f(A_2) \end{matrix}\right) =\left(\begin{matrix} f(a_1,a_2) \\ f(b_1,b_2) \end{matrix}\right)$$
and applying $f$ once again to the remaining column, I would get the real number
$$ r = f(f(a_1,a_2),f(b_1,b_2))$$
So that would be the gist of how the function works. But to make it usable in my use case, I would need to be able to find the matrix $A$ back from $r$ which is why $f$ must be bijective.
I have not found litterature that talks about this so I was wondering if this community could enlighten me. Does such a function exist? If so, can it be constructed? And if so, how?