Real quick question:
I was wondering, how would one denote mathemathically the flipping of a matrix, horizontally or vertically, around its own axis?
$\endgroup$ 153 Answers
$\begingroup$Let $P$ be the matrix with $1$ on the antidiagonal and $0$ otherwise, that is $$P=\begin{pmatrix}0&0&\ldots& 0& 1\\0&0&\ldots & 1 & 0\\\vdots&\vdots &{}_.\cdot{}^\cdot&\vdots&\vdots\\ 0&1&\ldots& 0& 0\\1&0&\ldots& 0& 0\\ \end{pmatrix}.$$ Then $AP$ and $PA$ (and $PAP$) are flipped versions of $A$.
$\endgroup$ 1 $\begingroup$It seems there is a general agreement that no such notation already exists. As I suggested in a comment you could use $A^H$ and $A^V$. If I was writing in a document in French, I would use ${}^h\!A$ and ${}^v\!A$.
$\endgroup$ 3 $\begingroup$Old question, but it is the first hit in search results for notation of flipping a matrix - so let's leave an answer.
Let $A \in \mathbb{R}^{m \times n}$. If you use the notation that matrix $A = A_{ij}$ where $i \in \{1,\ldots,m\}$ represents the row and $j \in \{1,\ldots,n\}$ represents the column.
The following $7$ flips of $A$ come out of changing the indicies:
$A^\top = A_{ji}$
- Transpose A by changing the order of the indices
$A_{i(n+1-j)}$.
- Flip $A$ horizontally
- This interchanges the columns so that the first column of $A$ is the last column of $A_{i(n+1-j)}$, and the last column of $A$ is the first column of $A_{i(n+1-j)}$.
$A_{(m+1-i)j}$
- Flip $A$ vertically
- This interchanges the rows so that the first row of $A$ is the last row of $A_{(m+1-i)j}$, and the last row of $A$ is the first row of $A_{(m+1-i)j}$.
$A_{(m+1-i)(n+1-j)}$
- Flip $A$ horizontally then vertically
- Same as flip vertical then horizontal
$A_{(n+1-j)i}$
- Flip $A^\top$ vertically
$A_{j(m+1-i)}$
- Flip $A^\top$ horizontally
$A_{(n+1-j)(m+1-i)}$
- Flip $A^\top$ vertically then horizontally