I have a $k$ number of $n$-dimensional vectors written with respect to two rotated frames:
$X= \{\vec{x}_1,\vec{x}_2,...,\vec{x}_k\}$
and the same rotated vectors:
$X'= \{\vec{x'}_1,\vec{x'}_2,...,\vec{x'}_k\}$
How do I find the rotation matrix that transform all these vectors? From here I know how to find the rotation matrix from one single vector:
$\vec{x} = R.\vec{x}'$
but then how do I find the full rotation matrix that rotates the full $X'$ set at the same time?
EDIT2: From the answers bellow I now proceed as follows:
Build a $Y$ matrix made from the norm vectors $\hat{x_i}$ and a second $Y'$ from the norm vectors $\hat{x_i}'$ (both in the same order), with $i=1,...,n$ The rotation matrix is be written as:
$R = Y (Y')^{-1}$
I have tested the method with the following simple example:
Lets suppose I have two sets of vectors, $u = \{\vec{u}_1,\vec{u}_2,\vec{u}_3,...,\vec{u}_k\}$ and $v=\{\vec{v}_1,\vec{v}_2,\vec{v}_3,...\vec{v}_k\}$, where I know a priori that $v$ was built from the a rotation of $u$ (I used this to simulate $\vec{v}_i$).
Since we are in 3D I just need three vectors form the full set. Lets suppose that $u$ set had the following vectors:
$\vec{u}_1 = [3,5,2]$
$\vec{u}_2 = [1,2,8]$
$\vec{u}_3 = [4,3,10]$
and the respective associated $v_i$
$\vec{v}_1 = [4.20, 3.63, 2.69]$
$\vec{v}_2 = [6.78, -2.76,3.93 ]$
$\vec{v}_3 = [10.39,-1.82,3.71]$
Then, the transformation matrix R is constructed by::
$Y = (\hat{u_1},\hat{u_2},\hat{u_3})$
$Y' = (\hat{v_1},\hat{v_2},\hat{v_3})$
R = $Y(Y')^{-1}$
Now, any of remaining $k-n$ vectors can be mapped trough:
$\vec{u}_i = R \vec{v}_i$