Science Fair Projects Ideas - Permutation matrix

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

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.

Contents

Definition

Given a permutation π of m elements

\pi : \lbrace 1, \ldots, m \rbrace \to \lbrace 1, \ldots, m \rbrace

the permutation matrix Pπ with m elements is defined as

P_{\pi} :=  \begin{bmatrix} \mathbf{e}_{\pi(1)} \\ \vdots \\ \mathbf{e}_{\pi(m)} \\ \end{bmatrix}

with ei being the i-th vector in the identity matrix

Rules

Given two permutations π and σ of m elements and the corresponding permutation matrices Pπ and Pσ

P_{\pi} P_{\sigma} = P_{\pi \circ \sigma}

As permutation matrices are orthogonal matrices the inverse matrix exists and can be written as

P_{\pi}^{-1} = P_{\pi^{-1}}

The multiplication of a permutation matrix Pπ with a vector g will permute the entries of the vector.

P_\pi \mathbf{g}  =  \begin{bmatrix} \mathbf{e}_{\pi(1)} \\ \vdots \\ \mathbf{e}_{\pi(n)} \end{bmatrix}  \begin{bmatrix} g_1 \\ \vdots \\ g_n \end{bmatrix} = \begin{bmatrix} g_{\pi(1)} \\ \vdots \\ g_{\pi(n)} \end{bmatrix}

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 linear 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 left (MP) permutes the rows of M, likewise, on the right (PM), 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.

The trace of a permutation matrix is the number of fixed points of the permutation. If the permutation has fixed points, so it can be written as (a1)(a2)...(an)q where q has no fixed points, then e1,e2,...,en are eigenvectors of the permutation matrix.

Examples

The permutation matrix Pπ corresponding to the permutation π=(1)(2 4 5 3) is

P_\pi  =  \begin{bmatrix} \mathbf{e}_{\pi(1)} \\ \mathbf{e}_{\pi(2)} \\ \mathbf{e}_{\pi(3)} \\ \mathbf{e}_{\pi(4)} \\ \mathbf{e}_{\pi(5)}  \end{bmatrix} = \begin{bmatrix} \mathbf{e}_{1} \\ \mathbf{e}_{3} \\ \mathbf{e}_{5} \\ \mathbf{e}_{2} \\ \mathbf{e}_{4}  \end{bmatrix} = \begin{bmatrix}  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{bmatrix}

and given a vector g

P_\pi \mathbf{g} = \begin{bmatrix} \mathbf{e}_{\pi(1)} \\ \mathbf{e}_{\pi(2)} \\ \mathbf{e}_{\pi(3)} \\ \mathbf{e}_{\pi(4)} \\ \mathbf{e}_{\pi(5)}  \end{bmatrix}  \begin{bmatrix} g_1 \\ g_2 \\ g_3 \\ g_4 \\ g_5 \end{bmatrix} = \begin{bmatrix} g_1 \\ g_4 \\ g_2 \\ g_5 \\ g_3 \end{bmatrix}

Explanation

A permutation matrix will always be in the form

\begin{bmatrix} \mathbf{e}_{a_1} \\ \mathbf{e}_{a_2} \\ \vdots \\ \mathbf{e}_{a_j} \\ \end{bmatrix}

where eai represents the ith basis vector (as a row) for Rj, and where

\begin{bmatrix}  1   & 2   & \ldots & j \\ a_1 & a_2 & \ldots & a_j\end{bmatrix}

is the permutation form of the permutation matrix.

Now, in performing matrix multiplication, one essentially forms the dot product of each row of the first matrix with each 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

So, the product of the permutation matrix with the vector v above, will be a vector in the form (ga1, ga2, ..., gaj), and that this then is a permutation of v since we have said that the permutation form is

\begin{bmatrix}  1   & 2   & \ldots & j \\ a_1 & a_2 & \ldots & a_j\end{bmatrix}

So, permutation matrices do indeed permute the order of elements in vectors multiplied with them.

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{bmatrix}  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{bmatrix}

A matrix of this sort can be decomposed into permutation matrices as

M = c_1 P_1 + \cdots + c_t P_t

with

\sum_{i=1}^{t} c_i = c.

See also

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice