[Math] Convert coordinates to a different coordinate axis

3dcoordinate systemsmathematical physicsmatricesmatrix equations

Sorry for any forum rules I have broken, I needed a quick answer.

I want to create a plane including 3 nonlinear points on a 3d coordinate system, one being the origin. I also need to create a transformation matrix to switch between the points on the $xyz$ system to the new system and back.

Pretty much I want to make a plane between points $(0,0,0)$, $(X_0, Y_0, Z_0)$, $(X_1,Y_1,Z_1)$, and then make a transformation matrix to multiply any 3d point by to get the coordinates on the new plane. I assume I can get back by multiplying by the inverse.

I can find the normal vector using cross product between two vectors between the points, but would prefer another way using matrices. I also don't want to use too many sines and cosines in the transformation matrix.

Thanks a lot

Best Answer

Note. I am assuming that you want a linear transformation that takes the vector $(1, 0)$ to $(X_0, Y_0, Z_0)$ and $(0, 1)$ to $(X_1, Y_1, Z_1)$.

Observe that any vector $(u, v)$ in the plane can be written $$ (u, v) = u \, (1, 0) + v \, (0, 1). $$ Therefore, the transformation (let's call it $T$) sends $(u, v)$ to $$ u \, (X_0, Y_0, Z_0) + v \, (X_1, Y_1, Z_1) = ( uX_0 + vX_1, \; uY_0 + vY_1, \; uZ_0 + vZ_1), $$ which is a vector in $3$-space.

Now if you want the transformation to have an inverse $T^{-1}$, then given a vector $(X, Y, Z)$ in the plane sitting in $3$-space, you have to be able to express each of its three coordinates in terms of parts of the two given vectors that defined the plane. In other words, you have to be able to solve the system of linear equations: $$ \left\{ \! \begin{array}{rcrcl} uX_0 &+& vX_1 &=& X \\ uY_0 &+& vY_1 &=& Y \\ uZ_0 &+& vZ_1 &=& Z \end{array} \right. $$

Does this help? I can say more if you are familiar with matrices and their inverses.