Permutation matrix
Encyclopedia : P : PE : PER : Permutation matrix
In linear algebra, a permutation matrix is a binary matrix that has exactly one entry 1 in each row and each column and 0s elsewhere. Permutation matrices are the matrix representation of permutations.
Definition
Given a permutation π of m elements
- [\pi : \lbrace 1, \ldots, m \rbrace \to \lbrace \pi(1), \ldots, \pi(m) \rbrace]
- [P_ := \begin\mathbf_ \\\vdots \\\mathbf_ \\\end]
Properties
Given two permutations π and σ of m elements and the corresponding permutation matrices Pπ and Pσ
- [P_ P_ = P_]
- [P_^ = P_}]
- [P_\pi \mathbf = \begin\mathbf_ \\\vdots \\\mathbf_\end
Notes
P(1) is the identity matrix. This is clear if one views the permutation matrix of a permutation σ, as the permutation of the rows or columns of the identity matrix.
A permutation matrix is a stochastic matrix; in fact doubly stochastic. One can show that every doubly stochastic matrix is a convex combination of permutation matrices of the same size, giving permutation matrices a characterisation as the set of extreme points.
The product of a matrix M with a permutation matrix P on the right (PM) permutes the rows of M, likewise, on the left (MP), permutes the columns of M.
Since the map Sn → A ⊂ GL(n, Z2) is a faithful representation, we have the following:
- There are n! n-by-n permutation matrices, so |Sn| = |A| = n!.
- The n-by-n permutation matrices form a group under matrix multiplication with the identity matrix as the identity element, as Sn is.
From group theory we know that any permutation may be written as a product of transpositions. Therefore, any permutation matrix P factors as a product of row-interchanging elementary matrices, each having determinant −1. Thus the determinant of a permutation matrix P is just the signature of the corresponding permutation.
Examples
The permutation matrix Pπ corresponding to the permutation π=(1)(2 4 5 3) is
- [P_\pi = \begin\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \end=\begin\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \end=\begin 1 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 1 & 0 \\0 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 1 \\0 & 0 & 1 & 0 & 0 \end]
- [P_\pi \mathbf=\begin\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \\\mathbf_ \end
Solving for P
The question of "if I have two matrices A and B, how can I find P?" is answerable through the use of eigenvalue decomposition which yields:
- [A = Q \Lambda Q^]
The permutation matrix [P] relates [A] and [B] by
- [B = P A P^]
Example
Given the two matrices
- [A=\begin 0 & 1 & 2 \\ 1 & 0 & 1.5 \\ 2 & 1.5 & 0\end]
- [B=\begin 0 & 1 & 1.5 \\ 1 & 0 & 2 \\ 1.5 & 2 & 0\end]
- [P=\begin 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1\end]
After finding the eigenvalues of both [A] and [B] and diagonalizing them into a diagonal matrix is
- [\Lambda=\begin -2.09394 & 0 & 0 \\ 0 & 0.9433954 & 0 \\ 0 & 0 & 3.037337\end]
- [Q_A=\begin -0.60130 & 0.54493 & 0.58437 \\ -0.25523 & -0.82404 & 0.50579 \\ 0.75716 & 0.15498 & 0.63458\end]
- [Q_B=\begin -0.25523 & -0.82404 & -0.50579 \\ -0.60130 & 0.54493 & -0.58437 \\ 0.75716 & 0.15498 & -0.63458\end]
The resulting [P] matrix is:
- [P=\begin 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1\end]
Explanation
A permutation matrix will always be in the form- [\begin\mathbf_ \\\mathbf_ \\\vdots \\\mathbf_ \\\end]
- [\begin 1 & 2 & \ldots & j \\
Now, in performing matrix multiplication, one essentially forms the dot product of each row of the first matrix with each column of the second. In this instance, we will be forming the dot product of each column of this matrix with the vector with elements we want to permute. That is, for example, if we call this vector v = (g0,...,g5)T,
- eai·v=gai
- [\begin 1 & 2 & \ldots & j \\
Generalization
The sum of the values in each column or row in a permutation matrix adds up to exactly 1. A possible generalization of permutation matrices are matrices where the values of each column and row add up to a number c.
For example in the following matrix M each column or row adds up to 5.
- [M =\begin 5 & 0 & 0 & 0 & 0 \\0 & 3 & 2 & 0 & 0 \\0 & 0 & 0 & 5 & 0 \\0 & 1 & 2 & 0 & 2 \\0 & 1 & 1 & 0 & 3 \end]
- [M = c_1 P_1 + \cdots + c_t P_t]
- [\sum_^ c_i = c.]
See also
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
