2

I have a 4x4 transformation matrix $$\begin{bmatrix} i_x & j_x & k_x & t_x \\ i_y & j_y & k_y & t_y \\ i_z & j_z & k_z & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix}$$ in which I'd like to swap the first and second columns (i.e. the ones containing the $i$ and $j$ entries), and the $t_x$ and $t_y$ entries so I end up with: $$\begin{bmatrix} j_x & i_x & k_x & t_y \\ j_y & i_y & k_y & t_x \\ j_z & i_z & k_z & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix}$$

Does Linear Algebra offer me a way to multiply by another matrix to do this? I know that I could do the column swap by postmultiplication with a permutation matrix

$$\begin{bmatrix} i_x & j_x & k_x & t_x \\ i_y & j_y & k_y & t_y \\ i_z & j_z & k_z & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}= \begin{bmatrix} j_x & i_x & k_x & t_x \\ j_y & i_y & k_y & t_y \\ j_z & i_z & k_z & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix}$$

but I'm unsure how to swap those $t_x$ and $t_y$ entries.

PeteUK
  • 1,570
  • 2
    There is no general way to do that (for unknown $t_{x}$ and $t_{y}$). An easy way to see it is that every element in the first line of the result depends only on the first line of the input matrix. A clever way may exists although, if you allow to transpose the matrix. – Alex Botev Apr 19 '13 at 18:29
  • @Belov: this seems like an answer to me. – Douglas S. Stones Apr 20 '13 at 20:20

0 Answers0