-2

Basically, this boils down to a question about matrix multiplication in general. I was wondering if there is a general formula to know the result immediately of these kind of multiplications:

$\begin{bmatrix}0&0&1\\1&0&0\\0&1&0 \end{bmatrix}\begin{bmatrix}0&1&0\\0&0&1\\1&0&0\end{bmatrix}$.

So, I want to be able to know what the product of 2 square matrices will look like when the colums are the standard basis of $\mathbb{R}^n$, $n$ being 3 in the example above. These matrices are also used to represent how the elements of the group $\mathbb{S}3$ = $\{$possible permutations of 3 elements$\}$ act. This was the motivation for my question, to gain some understanding about $\mathbb{S3}$. E.g. if you multiply a vector in \mathbb{R^3} by a permutation matrix, you "change" the order of it's coordinates.

I could have answered this question by first remembering the formula of matrix multiplcation, i.e.: $P_{ij} = \sum_{k=1}^{3}c_{ik}d_{kj}$, which denotes the element $(i,j)$ of the product matrix. Then I could have found the formula myself that was provided by Antonielly.

These question shouldn't have been posted since it is already discussed on this website. About matrix multiplication: Matrix multiplication: interpreting and understanding the process About permutation matrices: https://en.m.wikipedia.org/wiki/Permutation_matrix

user33
  • 301
  • 1
  • 9

2 Answers2

1

These are permutation matrices.

Here is how to quickly assemble the product matrix $P_{\alpha\times \gamma}$ of two permutation matrices $H_{\alpha\times \beta}$ and $V_{\beta\times \gamma}$:

$p_{rc} = \begin{cases} 1 & \quad\text{if }h_{rx}=1\text{ and }v_{xc}=1;\\ 0 & \quad\text{otherwise.} \end{cases}$

Each row and each column in $P$ will have exactly one entry with 1, because the product of permutation matrices is a permutation matrix too.

Antonielly
  • 76
  • 6
0

These are permutation matrices. Consider the first matrix, $P_{1}$. In its first row, the 1 is in the 3rd column, which we can write $1\rightarrow 3$; in the second row the 1 is in the first column, $2\rightarrow 1$; in the third row the 1 is in the 2nd column, $3\rightarrow 2$. We can write down these results as the permutation $[3,1,2]$. When $P_{1}$ premultiplies a matrrix $M$, it permutes the rows of $M$, so the rows of $P_{1}M$ are the rows of $M$ in the order $[3,1,2]\,$. In this case that leads to the identity matrix. But since here $M=P_{2}$ is also a permutation matrix for permutation $[2,3,1],$ the result will be the permutation matrix for the product of the permutations $[3,1,2].[2,3,1]$ where the permutation on the left is done first. This product is $[1,2,3]$.

We can work this out directly. Start with row 1 of $P_{1}\,$, which says that $1\rightarrow 3$ \ Then we look at row 3 of $P_{2}$ to find $ 3\rightarrow 1,$ so overall $1\rightarrow 3\rightarrow 1$ or $1\rightarrow 1$ , so the first row in the product matrix has the 1 in column 1. Then we start with the second row of $P_{1}$ and find $2\rightarrow 1\rightarrow 2$ so the second row in the product has the 1 in column 2. For the third row, $ 3\rightarrow 2\rightarrow 3$, so the third row has the 1 in column 3. We find again that the product is the identity matrix.

dharr
  • 578