1
$\begingroup$

Given a rectangular matrix $A$, what is the general form to rotate the matrix about the center term, e.g. such that

$$\pmatrix{a_{0,0} & a_{0,1} & a_{0,2} \\ a_{1,0} & a_{1,1} & a_{1,2} \\ a_{2,0} & a_{2,1} & a_{2,2}}\longrightarrow\pmatrix{a_{0,2} & a_{1,2} & a_{2,2} \\ a_{0,1} & a_{1,1} & a_{2,1} \\ a_{0,0} & a_{1,0} & a_{2,0}} $$

and possibly the reverse case as well.

  • 0
    XKCD may be helpful in solving this question. http://xkcd.com/184/2012-04-17
  • 0
    @Auke no its not2012-04-17

1 Answers 1

2

$$\pmatrix{0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0}A^T = \pmatrix{a_{0,2} & a_{1,2} & a_{2,2} \\ a_{0,1} & a_{1,1} & a_{2,1} \\ a_{0,0} & a_{1,0} & a_{2,0}} =A_r $$

Edit: reverse is,

$$A_r^T \pmatrix{0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0} = \pmatrix{a_{0,0} & a_{0,1} & a_{0,2} \\ a_{1,0} & a_{1,1} & a_{1,2} \\ a_{2,0} & a_{2,1} & a_{2,2}} = A $$

  • 0
    that somewhat answers the example (being that it is a square matrix), but what about the general case which will be a "rectangular" matrix where transpose has no meaning2012-04-17
  • 0
    It works for non-square matrices, just make sure the transformation matrix is the right size. The transpose works on rectangular matrices (are you getting mixed up with the inverse?)2012-04-17
  • 1
    In short: transpose, and multiply by an appropriately-sized *exchange matrix*.2012-04-18