2
$\begingroup$

Matrices may be used to permute the order of elements in a set. For example:

$ \begin{bmatrix} 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} \times \begin{bmatrix} x \\ y \\ z \\ w \end{bmatrix} = \begin{bmatrix} w \\ x \\ y \\ z \end{bmatrix} $

My problem is that I need to permute values in different matrices:

$ A = \begin{bmatrix} 0 & 0 & x & 0 & 0 \\ x & x & x & x & x \\ x & 0 & 0 & 0 & x \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix} $

$ B = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & y & 0 & 0 \\ y & y & y & y & y \\ y & 0 & 0 & 0 & y \end{bmatrix} $

$ C = \begin{bmatrix} z & 0 & 0 & 0 & z \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & z & 0 & 0 \\ z & z & z & z & z \end{bmatrix} $

$ D = \begin{bmatrix} w & w & w & w & w \\ w & 0 & 0 & 0 & w \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & w & 0 & 0 \end{bmatrix} $

Thus given the permutation matrix (from above) and the following pattern matrix how would you change all the $x$ in $A$ to $w$, all the $y$ in $B$ to $x$, all the $z$ in $C$ to $y$, and all the $w$ in $D$ to $z$:

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

  • 0
    Applying permutation matrices does not alter the values it permutes, so how do you expect to change $x$ into $w$? Adding $w-x$ would be one way, but it you want to use multiplication, what if $x=0$?2012-08-28

2 Answers 2

2

There's a pretty good chance I don't know what you're asking, but maybe the matrix you're looking for is $M=\pmatrix{0&1&0&0\cr0&0&1&0\cr0&0&0&1\cr1&0&0&0\cr}$ You get $MA=\pmatrix{0&1&0&0\cr0&0&1&0\cr0&0&0&1\cr1&0&0&0\cr}\pmatrix{0&0&x&0&0\cr x&x&x&x&x\cr x&0&0&0&x\cr0&0&0&0&0\cr}=\pmatrix{x&x&x&x&x\cr x&0&0&0&x\cr0&0&0&0&0\cr0&0&x&0&0\cr}$ which is exactly the pattern of $D$, but with $x$ instead of $w$, and you get similar things for $MB,MC,MD$.

0

When you multiply by a permutation matrix on the left, you permute rows (those become single entries in a column vector). When you multiply by a permutation matrix on the right, you permute columns. Here you need to permute rows.