# A function for rotation based on desired normal vector

Let $A$ be an $n \times n$ nondegenerate square matrix with real-valued entries. If we interpret the rows of $A$ as points in $\mathbb{R}^n$, then $A$ defines a simplex. We'll say $v \in \mathbb{R}^n$ is a normal vector to $A$ if $v$ is the normal vector to the hyperplane on which this simplex lies.

I am looking for a function $f_A: \mathbb{R}^n \to \mathbb{R}^{n \times n}$ that maps a normal vector to a rotation of $A$ that has that normal vector. It's easy to see that many rotations of $A$ might correspond to a single normal vector; thus, many implementations of $f_A$ might be possible. Any of them will do, as long as $f_A$ is continuous.

Thanks!

-
I might be missing something. If $A$ is nondegenerate, then its rows are linearly independent, which means that the only subspace of $\mathbb R^n$ that contains them is $\mathbb R^n$ itself. And in that case there's nothing normal to it. – Martin Argerami Nov 16 '12 at 0:18
What you say is true if we interpret the rows of $A$ as vectors. However, I am interpreting them as points in $\mathbb{R}^n$ - thus, the hyperplane they define need not pass through the origin. If we like, we can mentally translate the hyperplane to pass through the origin for purposes of computing its normal vector. – GMB Nov 16 '12 at 1:36
Now I understand, thanks. – Martin Argerami Nov 16 '12 at 1:45
Isn't $A$ itself a bit of a red herring? An arrangement of $n$ points has a unique unit normal $v$, up to sign, and you are just looking for a continuous function that maps any unit vector $u$ to a rotation matrix $R$ such that $Rv = u$. Right? – Rahul Nov 16 '12 at 7:53
I have a feeling this is impossible in $\mathbb R^3$ due to the hairy ball theorem, but I'm not sure yet. – Rahul Nov 16 '12 at 7:54

If I've understood the question correctly, this is impossible for odd $n$.
Any rotation of $A$ transforms its unit normal vector $v$ by the same rotation, so what you're really looking for is a continuous function that, for any vector $u$, gives a rotation matrix $R(u)$ which maps $v$ to $u$.
Let $w$ be a fixed unit vector orthogonal to $v$. Then $R(u)w$ is orthogonal to $R(u)v = u$. Now $R(u)w$, seen as a function over the unit sphere, defines a vector field which is everywhere tangential to the sphere and nowhere zero. By the hairy ball theorem, such a vector field cannot be continuous when $n$ is odd, so $R(u)$ cannot be either.