Conversion from cartesian to fractional coordinates

 P: 416 It seems like you're doing a lot more work than necessary. You want something like: $$\vec{R} = x_1 \vec{a}_1 + x_2 \vec{a}_2 + x_3 \vec{a}_3$$ which can be written in matrix form as $$\vec{R} = A \cdot \left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right)$$ where the matrix A is formed with the vectors a_i as its columns. Then you just need to invert the matrix to find the x's.