Is there a compact sign invariant representation of a vector with a continuous mapping?

37 Views Asked by At

I'm looking for a representation of a vector where the overall sign carries no information.

Specifically, given a vectors $a,b \in \mathbb{R}^n$, what is a possible continuous function $f: \mathbb{R}^n \mapsto \mathbb{R}^m$ with small as possile $m$ where $f(a) = f(-a)$ while: $a \ne \pm b \Rightarrow f(a) \ne f(b)$.

$f(a)$ would then be a representation of the vector $a$ that is unique except for the overall sign of $a$ and changes continuously with changes in $a$.

One candidate i can think of is $a*a^\top$ which is in $R^{n \times n}$. Is there a more compact representation that fulfills the above criteria.