General form of a matrix that is both centrosymmetric and orthogonal A centrosymmetric matrix is of the form $JAJ=A$ where $J$ is the counter identity matrix, i.e. $$J=
        \begin{bmatrix}
        0 & 0 & 1 \\
        0 & 1 & 0 \\
        1 & 0 & 0 \\
        \end{bmatrix}
$$And an orthogonal matrix is $A$ such that $A^{-1}=A^T$
The only such matrix I could think of having these property is the identity matrix $$I=
        \begin{bmatrix}
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        0 & 0 & 1 \\
        \end{bmatrix}
$$Is there a general form that A takes that has these properties?
 A: An immediate example that comes to mind, if we stay at $3\times 3$, is 
$$
A=\begin{bmatrix}-1&0&0\\ 0&-1&0\\ 0&0&-1\end{bmatrix}.
$$ Also, $$
A=\begin{bmatrix}-1&0&0\\ 0&1&0\\ 0&0&-1\end{bmatrix}.
$$
In the $3\times3$ case, commuting with $J$ means that the entries are symmetric around $2,2$. That is, $AJ=JA$ implies
$$
A=\begin{bmatrix} a&b&c\\ d&g&d\\ c&b&a\end{bmatrix}.
$$
For this to be orthogonal, we need 
$$
a^2+b^2+c^2=1, \ 2ac+b^2=0,\ ad+bg+dc=0,\ 2d^2+g^2=1.
$$
Obvious solutions are $J$ and variations: things like 
$$
A=\begin{bmatrix}0&0&1\\ 0&-1&0\\ 1&0&0\end{bmatrix}
$$
Wolfram Alpha suggests other nontrivial solutions: for example, with $a=1/2$, we get 
$$
A=\begin{bmatrix}
1/2&-1/\sqrt2&-1/2\\ 
-1/\sqrt2&0&-1/\sqrt2\\
-1/2&-1/\sqrt2&1/2
\end{bmatrix}.
$$
Other values of $a$ in the formulas 
$$
b=d=-\sqrt{2a(1-a)},\ c=a-1,\ g=1-2a
$$
will produce other choices (uncountably many) of $A$ which are both centrosymmetric and orthogonal.
A: Note that $J^2 = I$ and so the condition $JAJ = A$ is equivalent to the condition $JA = AJ$. That is, $A$ and $J$ should commute. The matrix $J$ is orthogonally diagonalizable with eigenvalues $1,-1$ and eigenspaces
$$ V_{1} = \operatorname{span} \{ e_2, \frac{1}{\sqrt{2}}(e_1 + e_3) \}, V_{-1} = \operatorname{span} \{ \frac{1}{\sqrt{2}}(e_1 - e_3) \} $$
where $e_i$ are the standard basis vectors.
Any matrix that commutes with $J$ must keep the eigenspaces of $J$ invariant and, since $J$ is diagonalizable, any matrix that satisfies $AV_{1} \subseteq V_{1}$ and $AV_{-1} \subseteq V_{-1}$ will indeed commute with $J$. Set
$$ v_1 = e_2, v_2 = \frac{1}{\sqrt{2}}(e_1 + e_3), v_3 = -\frac{1}{\sqrt{2}}(e_1 - e_3), \\
P = \begin{pmatrix} v_1 & | &  v_2 & | & v_3 \end{pmatrix} $$
so $P$ is the orthogonal $3 \times 3$ matrix whose columns are the eigenvectors of $J$. A matrix $A$ will commute with $J$ if and only if we have
$$ P^T A P = \begin{pmatrix} a & b & 0 \\ c & d & 0 \\ 0 & 0 & e \end{pmatrix} $$
for some $a,b,c,d,e \in \mathbb{R}$. Finally, $A$ will be orthogonal if and only if $P^T A P$ will be orthogonal and so $P^T A P$ must be in one of the forms
$$ P^T A P = \begin{pmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{pmatrix},
\begin{pmatrix} \sin \theta & \cos \theta & 0 \\ \cos \theta & -\sin \theta & 0 \\ 0 & 0 & -1 \end{pmatrix}, \\
\begin{pmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & -1 \end{pmatrix}, \begin{pmatrix} \sin \theta & \cos \theta & 0 \\ \cos \theta & -\sin \theta & 0 \\ 0 & 0 & +1 \end{pmatrix} $$
where $\theta \in \mathbb{R}$. The first case corresponds to rotation matrices around the $v_3$ axis and $A$ can be written explicitly as
$$ A = P(P^TAP)P^T = \begin{pmatrix} \frac{\cos \theta + 1}{2} & \frac{\sin \theta}{\sqrt{2}}  & \frac{\cos \theta - 1}{2} \\
-\frac{\sin \theta}{\sqrt{2}} & \cos \theta & -\frac{\sin \theta}{\sqrt{2}} \\
\frac{\cos \theta - 1}{2} & \frac{\sin \theta}{\sqrt{2}} & \frac{\cos \theta + 1}{2}.
\end{pmatrix} $$
One can obtain similar expression for the other three cases.
