# Random Rotation of Points using Householder matrices

I have $N$ points in $D$ dimensions, were $D$ is big, for sure more than $100$. $N$ is also big.

The goal is to produce an algorithm in my code, that will take as input this dataset and will give another one (in a different matrix), that will be randomly rotated.

I have used Euler rotation, but the time complexity of it is $O(N\cdot D\cdot D)$.

Chanop and Hartley note in their paper "Optimised KD-trees for fast image descriptor matching", that: but searching the internet didn't help me much, so I literally don't know how to perform this task. I am not asking for code, but for guidance, for what I should do to achieve my goal.

A relevant -maybe- question is this in this site.

• What's the question? Do you know how to multiply a Householder matrix and a vector in $O(d)$ time? That I can do. The second part I cannot do, because I don't know what a tree is. – Stephen Montgomery-Smith Jul 3 '14 at 2:16
• Also, how do you use Euler rotations if $D \ne 3$? – Stephen Montgomery-Smith Jul 3 '14 at 2:19
• Multiplying by householder matrices does reflection not rotation. You could try Givens rotations. – daw Jul 3 '14 at 8:21
• I used the generalizations described in the link. Yes that was the case, but after daw's comment, everything got cleared up, tnx! – gsamaras Jul 3 '14 at 12:50