# diagonalisation of systems of symbolic equations from two cross products

A description of what I'm attempting:

Given a generic vector $$\vec{r}$$ and a point in space $$D$$, I want to build a reference frame centred in $$\vec{r}= (x,y,z)$$, with one axis directed along the direction from $$\vec{r}$$ to $$D$$. Calling this last vector $$\vec{L} = \vec{D} - \vec{r}$$, the direction of reference is simply $$\hat{L} = \frac{\vec{L}}{|\vec{L}|} = \frac{(D_x-x,D_y-y,D_z-z)}{\sqrt{(D_x-x)^2+(D_y-y)^2+(D_z-z)^2}}$$.

At this point, I define two generic unit vectors: $$\hat{V} = \frac{(V_x,V_y,V_z)}{|\vec{V}|}$$ and $$\hat{T} = \frac{(T_x,T_y,T_z)}{|\vec{T}|}$$

Taking $$\hat{L}$$, $$\hat{V}$$, $$\hat{T}$$ to correspond to the directions in Cartesian space $$(i,j,k)$$, their mutual orthogonality of is given by: $$\hat{L} \times \hat{V} = \hat{T}$$ and $$\hat{L} \times \hat{T} = -\hat{V}$$

Taken together, the two cross products yield six equations in six unknowns: $$V_x,V_y,V_z,T_x,T_y,T_z$$

What I would like to obtain via Mathematica is the expression of the unknowns above as a function of $$x,y,z,D_x,D_y,D_z$$.

I first tried this:

Solve[{Cross[L, V] == T, Cross[L, T] == -V}, {Vx,Vy,Vz,Tx,Ty,Tz}]


but this command takes ages and after a full night of running, it wasn't done.

I also looked at the functions JordanDecomposition and NDSolve, but they both appear to serve for numerical evaluations, whereas I need the symbolic expressions.

I thought of writing the six equations into matrix form (possibly there's a Mathematica function to do this) and then diagonalise this matrix.

Is there a way to do this with Mathematica?

• Matrix form for a set of nonlinear equations? No way. Moreover, you seem to mix up the vectors $V$ and $\hat V$ etc. Aug 9, 2019 at 17:22

With

r = {x, y, z};
d = {Lx, Ly, Lz};


one possible solution of your problem is

ld = #/Sqrt[#.#] &[d - r]
vd = #/Sqrt[#.#] &[r - ld.r ld]  (*vd normal to ld*)
td = #/Sqrt[#.#] &[Cross[vd, ld]];

• yes! that's exactly what I needed. fantastic. thanks you so much Ulrich Aug 10, 2019 at 20:58