Swapping row $n$ with row $m$ by using permutation matrix

2.7k Views Asked by At

Let $A$ be matrix ( finite or infinite). and We want to swap ( exchange ) location of row $n$ with row $m$.

I know we need to use permutation matrix to do this, but my question do exactly we know which permutation matrix need to be used to perform this swapping? or we need to know the entries of the matrix too.

2

There are 2 best solutions below

3
On BEST ANSWER

$IA,$ with $I$ being the identity matrix, selects every row of $A$ and leaves it in its place. If we want to exchange rows $n$ and $m,$ we need to swap the corresponding rows of the $I$ matrix: If $m=3$ and $n=1,$

$$P_{nm}\,A=P_{13}\,A=\begin{bmatrix}0&0&1&0&\cdots\\0&1&0&0&\cdots\\1&0&0&0&\cdots\\\vdots\end{bmatrix}\begin{bmatrix}a_{11}&a_{12}&a_{13}&\cdots\\a_{21}&a_{22}&a_{23}&\cdots\\a_{31}&a_{32}&a_{33}&\cdots\\\vdots\end{bmatrix}$$

The permutation matrix is applied to the left. Going back to the matrix $A$ would entail multiplying again from the left by $P_{13}:$

$$P_{13}\,P_{13}\,A=(P_{13}\,P_{13})\,A=I\,A$$

because every elementary permutation matrix (single transposition of rows) is its inverse: $P = P^{−1}$ or $P^2 = I.$ In general, permutation matrices form a subgroup of the general linear group $GL_n(F)$ of $n\times n$ invertible matrices, isomorphic to $S_n,$ explaining why a given permutation matrix can be seen as an element of order $k,$ such that $P^k=I.$ In the case of a simple transposition of rows, the order is 2, and $P^2 = I.$

Multiplying $A$ (or the result of $P_{13}A$ for that matter) from the right, i.e. $A\,P_{13},$ would swap the columns $1$ and $3.$

0
On

Each row of a matrix product is a linear combination of the rows of the right-hand matrix specified by the corresponding row of the left-hand matrix. Thus, left-multiplying a matrix by the $i$th row of the identity matrix selects its $i$th row. Use these facts to construct the appropriate permutation matrix.