# When a matrix has same eigenvalues of its column-swapped version?

What are the properties needed for a matrix $A$ to have $\mbox{Spec}(A)= \mbox{Spec}(A \cdot P)$, where

$$P = \begin{pmatrix} 0 & \cdots & 0 & 1 \\ \vdots & \cdot^{\cdot^{\cdot}} & 1 & 0 \\ 0 & \cdot^{\cdot^{\cdot}} & \cdot^{\cdot^{\cdot}} & \vdots \\ 1 & 0 & \cdots & 0 \end{pmatrix}$$

is the matrix that, in the product $A \cdot P$, swaps all the columns of $A$?

$\mbox{Spec}(A)$ denotes the spectrum of $A$.

I've found a class of matrices (a subset of symmetric matrices of size $2^k\times 2^k$ with $k$ even) that satisfy this condition, but i was not able to figure out what are the key properties needed for $A$ to make this happen.

An example of matrix I've found is:

$$A = \begin{pmatrix} 0 &0 &0 &0 &0 &0 &0 &1 &0 &0 &0 &1 &0 &1 &1 &0\\ 0 &0 &0 &0 &0 &0 &1 &0 &0 &0 &1 &0 &1 &0 &0 &1\\ 0 &0 &0 &0 &0 &1 &0 &0 &0 &1 &0 &0 &1 &0 &0 &1\\ 0 &0 &0 &0 &1 &0 &0 &0 &1 &0 &0 &0 &0 &1 &1 &0\\ 0 &0 &0 &1 &0 &0 &0 &0 &0 &1 &1 &0 &0 &0 &0 &1\\ 0 &0 &1 &0 &0 &0 &0 &0 &1 &0 &0 &1 &0 &0 &1 &0\\ 0 &1 &0 &0 &0 &0 &0 &0 &1 &0 &0 &1 &0 &1 &0 &0\\ 1 &0 &0 &0 &0 &0 &0 &0 &0 &1 &1 &0 &1 &0 &0 &0\\ 0 &0 &0 &1 &0 &1 &1 &0 &0 &0 &0 &0 &0 &0 &0 &1\\ 0 &0 &1 &0 &1 &0 &0 &1 &0 &0 &0 &0 &0 &0 &1 &0\\ 0 &1 &0 &0 &1 &0 &0 &1 &0 &0 &0 &0 &0 &1 &0 &0\\ 1 &0 &0 &0 &0 &1 &1 &0 &0 &0 &0 &0 &1 &0 &0 &0\\ 0 &1 &1 &0 &0 &0 &0 &1 &0 &0 &0 &1 &0 &0 &0 &0\\ 1 &0 &0 &1 &0 &0 &1 &0 &0 &0 &1 &0 &0 &0 &0 &0\\ 1 &0 &0 &1 &0 &1 &0 &0 &0 &1 &0 &0 &0 &0 &0 &0\\ 0 &1 &1 &0 &1 &0 &0 &0 &1 &0 &0 &0 &0 &0 &0 &0\\ \end{pmatrix}$$

• I love the $\cdot^{\cdot^{\cdot}}$ on the diagonals. – Rodrigo de Azevedo Jul 9 '16 at 19:11
• I believe any matrix composed of binary values has this property. For other number bases, special cases exist but no rules are immediately evident. – Jeff Strom Dec 24 '16 at 6:57
• As a counterexample take the identity matrix. – ilmarchese Dec 24 '16 at 10:48