Let $p$ be the permutation $(3 4 2 1)$ of the four indices. The permutation matrix associated with it is $$ P = \begin{bmatrix} 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \end{bmatrix} $$ This is the matrix that permutes the components of a column vector.
The problems asks you to decompose $p$ into transpositions and show that the associated matrix product equals the above matrix. However, I'm not getting that it does and I've run through it several times. Here are my calculations:
$p = (12)(14)(13)$
$$ P_{(12)} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}, P_{(14)} =\begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix}, P_{(13)}=\begin{bmatrix} 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$
However, $$P_{(12)} (P_{(14)} P_{(13)}) = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} \neq P$$
I don't see where I've made a mistake.
I think I found the issue. I was using the definition $PX = \begin{bmatrix} X_{p(1)}\\ X_{p(2)} \\ \vdots \\ X_{p(n)} \end{bmatrix} $ i.e. $P$ operates on $X$ by permuting the indices by $p$. However, the book defines $PX$ as $X_i$ gets sent to the position $p(i)$ in column vector $X$. These definitions are inverses of each other so that's somehow why my matrix multiplication was corrected by rearranging the matrices. Again, the proper definition of $P$ is $\sum_{i=1}^n e_{p(i), i}$ where $e_{i,j}$ is the matrix unit with $1$ at position $i,j$ and zero elsewhere.
Referring back to my first post, $P$ was defined using the incorrect definition, simply transposing $P$ will give us the proper $\sum_{i=1}^n e_{p(i), i}$ definition. Now the multiplication works out as it should.