# Finding an $D$-dimensional orthonormal change-of-basis matrix given a $D$-$2$ transformed points.

This is frustrating, I should be able to solve this but I'm having a mental fog.

I want to find an orthonormal change of basis: given a single point $(x_1,y_1)^T$ and its image $(x_2,y_2)^T$, find $M$ such that $M(x_1,y_1)^T=(x_2,y_2)^T$.

Normally we would need a second point to constrain the simultaneous equations, but I am only given one. So, maybe I can generate another point?

$\left( \begin{array}{cc} a & b \\ c & d \end{array} \right) \left( \begin{array}{cc} x_1 & -y_1 \\ y_1 & x_1 \end{array} \right) = \left( \begin{array}{cc} x_2 & -y_2 \\ y_2 & x_2 \end{array} \right)$

Nope, not invertible.

How about this? The basis is orthonormal so we note that $ab+cd=0$. Pursuing this line has got me into a terrible tangle. Blame the hangover, but I can't handle this right now :-(

Can someone please jump me to the end? What is $M$?

(I only need the 2D solution right, but for curiosity's sake shouldn't we be able to find a $d$-dimensional $M$ given $d-1$ points and their images, right? e.g. if you fix one corner of a cube at the origin and fix any two other points anywhere, the orientation is fully-specified assuming there is no shear? Is there a general form for the solution?)

• What was the problem with the first approach? That seemed the way.. I guess $(x_1,y_1)\ne (0,0)$ is assumed. – Berci Feb 28 '13 at 13:26
• The determinant of the middle matrix is zero. – spraff Feb 28 '13 at 13:28
• Which one? $x_1^2+y_1^2$? No, it's not zero! – Berci Feb 28 '13 at 13:32

The observation that you applied, is that if we want an orthonormal transformation $v\mapsto Mv$, then $b_1\perp b_2$, $\ ||b_1||=||b_2||=1\$ will imply $||Mb_1||=||Mb_2||=1$ and $Mb_1\perp Mb_2$, so that, knowing $Mb_1$ determines $Mb_2$. (Well, up to sign, if $\det M=-1$ is also allowed.) And exactly that's what you have done to $Mb_1=\pmatrix{x_2\\y_2}$ to get $Mb_2:=\pmatrix{-y_2\\x_2}$.
And, $\det\pmatrix{x_1 & -y_1\\y_1 & x_1}=x_1^2+y_1^2=1$ assumed that a unit vector was given. The inverse matrix is thus $$\pmatrix{x_1 & y_1 \\-y_1 & x_1}\ .$$