This is an applied problem, which arises from the problem of reorienting of a sensor axes according to particle displacement directions:
Consider a sensor which is located inside the solid substance. This sensor is capable of detecting the substance oscillations along each of the three axes (usually orthogonal, but generally, any non-degenerated (non-coplanar) basis). This sensor produces a recording of the detected oscillations, called a trace, containing the displacement sampled at high-frequency, capable to capture any oscillation frequency existing in the substance. There are three traces, one for each axis.
Consider that at some period of time the sensor registers an interference of an event, consisting of the compression wave, and two shear waves. Traces now contain a recordings of the event, effectively, a projections of the oscillations on the sensor's axes.
How do I now virtually re-orient the axes, that is, perform the linear transform of the traces, so that they will be oriented each along a corresponding wave displacement vector, and thus will contain only single wave event recording in each of the traces after the transformation?
EDIT1: Actually, we have a 3D-curve $r(t)$ of sensor motion, which is represented by sensor axial readings $r_1(t), r_2(t), r_3(t)$. The task is to find the "primal" directions of $r(t)$ movements and re-orient axes to those directions $q_1(t), q_2(t), q_3(t)$.
If you have three unit vectors that describe your current axes $r_1, r_2, r_3$ and you want to know what the linear transform is that will change $a_1 r_1 + a_2 r_2 + a_3 r_3 $ into the coordinates of some new axes $r'_1, r'_2, r'_3$, the matrix of this transform is:
$ \left( \begin{array}{ccc} r'_{11} & r'_{21} & r'_{31} \\ r'_{12} & r'_{22} & r'_{32} \\ r'_{13} & r'_{23} & r'_{33} \end{array} \right) $
where $r'_{j} = r_{j1} r_1 + r_{j2} r_2 + r_{j3} r_3$. So once you've figured out what the axes are for the coordinate system that you want to transform into, you can just plug those numbers into that matrix and apply it to your trace-vector to get the trace in the new coordinate system.