Dear Math Stackexchange community, how can I compute $R$ rotation matrix in this equation ($P=Rp+t$)?
$p$ consists of 3 points of $p_1,p_2,p_3$. And $p_1,p_2,p_3$ each has 3 coordinates of $x,y,z$. Therefore p is 3x3 matrix.
$p=\begin{bmatrix} p_{1x} & p_{2x} & p_{3x} \\ p_{1y} & p_{2y} & p_{3y} \\ p_{1z} & p_{2z} & p_{3z} \end{bmatrix}$
t is 3x1 vector. $t=\begin{bmatrix} t_x \\ t_y \\ t_z \end{bmatrix}$
P is a 3x3 matrix. $P=\begin{bmatrix} P_{1x} & P_{2x} & P_{3x} \\ P_{1y} & P_{2y} & P_{3y} \\ P_{1z} & P_{2z} & P_{3z} \end{bmatrix}$
R is a 3x3 matrix. $R=\begin{bmatrix} r_{11}&r_{12}&r_{13} \\ r_{21}&r_{22}&r_{23} \\ r_{31}&r_{32}&r_{33} \end{bmatrix}$
Therefore, all in all: $P=Rp+t$
$\begin{bmatrix} P_{1x} & P_{2x} & P_{3x} \\ P_{1y} & P_{2y} & P_{3y} \\ P_{1z} & P_{2z} & P_{3z} \end{bmatrix} = \begin{bmatrix} r_{11}&r_{12}&r_{13} \\ r_{21}&r_{22}&r_{23} \\ r_{31}&r_{32}&r_{33} \end{bmatrix}.\begin{bmatrix} p_{1x} & p_{2x} & p_{3x} \\ p_{1y} & p_{2y} & p_{3y} \\ p_{1z} & p_{2z} & p_{3z} \end{bmatrix}+\begin{bmatrix} t_x \\ t_y \\ t_z \end{bmatrix}$
I tried to take the inverse and calculate R. However; when I put numeric values in it, that method doesn't work with numeric values.
Do you have any suggestion?
edit1: I did the following after DavidK, and Cryo's suggestion:
$P=Rp+t$
$(P-t)=R.p$
$(P-t).p^{-1}=R$
However there is a problem now: last raw of $p$ is always fully zero for my case. And I can't take the inverse of $p$.
\begin{array}...\end{array}to type matricies. The current stuff is unreadable. Second, I think you may have lost something. If $P$ is a matrix then how can you have a $t$ - a vector on the other side of equation? How do you define adding-subtracting matrix from a vector? It looks like you are working in something like Matlab, surely it would complain? – Cryo Jan 23 '21 at 22:10A + bwhere $A$ is (for example) a $3\times3$ matrix and $b$ is a $3$-element column vector. However, that's a MATLAB feature of convenience, not a conventional mathematical operation. To write the effect of this feature mathematically, write a $3\times3$ matrix containing $3$ copies of the column vector side by side. Instead of $\begin{bmatrix}t_x\t_y\t_z\end{bmatrix},$ write $\begin{bmatrix}t_x&t_x&t_x\t_y&t_y&t_y\t_z&t_z&t_z\end{bmatrix}.$ – David K Jan 24 '21 at 15:48