# Irreducible non-symmetric matrix with only real eigenvalues

I'm looking for an counterexample.

Some Notation: A matrix $A$ is irreducible if there is no permutation matrix $P$ so that

$$P^{-1} A P = \begin{bmatrix} E & G \\ 0 & F \end{bmatrix}$$

where $E$ and $F$ are square. Two matrices $A$ and $B$ are diagonally conjugated if there is a non-singular diagonal matrix $D$ with $D^{-1} A D = B$.

Given a real, irreducible matrix $A$, which is not diagonally conjugated to a symmetric matrix. Is there such a matrix $A$ which has only real eigenvalues?

The conditions do rule out typical counterexamples like $\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$ (reducible) and $\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}$ (diagonally conjugate to $\begin{bmatrix} 1 & \sqrt{2} \\ \sqrt{2} & 1 \end{bmatrix}$).

Denote by $T_A \colon \mathbb{R}^n \rightarrow \mathbb{R}^n$ the linear map corresponding to multiplication by $A \in M_n(\mathbb{R})$. The matrix $A$ is irreducible according to your definition if and only if the subspaces $\mathrm{span} \{ e_{i_1}, \ldots, e_{i_k} \}$ are not $T_A$-invariant for any $1 \leq k \leq n - 1$ and $1 \leq i_1 < \ldots < i_k \leq n$ where $(e_1, \ldots, e_n)$ is the standard basis. Translating the condition that $A$ is not diagonally conjugate to a symmetric matrix to $T_A$ is possible but a bit more messy so we won't bother but the following observation is enough to construct an example:

If $A$ is diagonally conjugate to a symmetric matrix, then in particular $A$ is diagonalizable.

So in order to construct a counterexample, it is enough to find $A$ with real eigenvalues that is not diagonalizable such that the spaces $\mathrm{span} \{ e_{i_1}, \ldots, e_{i_k} \}$ are not $T_A$-invariant. The most basic example of $A'$ with real eigenvalues that is not diagonalizable is arguably

$$A' = \left( \begin{matrix} 0 & 1 \\ 0 & 0 \end{matrix} \right) \in M_2(\mathbb{R}).$$

Unfourtunately, it has $\mathrm{span} \{ e_1 \}$ as invariant subspace so let us apply a change of basis sending $e_1$ to $(1,1)$ and $e_2$ to $e_2$. Thus, we can take

$$A = \left( \begin{matrix} 1 & 0 \\ 1 & 1 \end{matrix} \right) \left( \begin{matrix} 0 & 1 \\ 0 & 0 \end{matrix} \right) \left( \begin{matrix} 1 & 0 \\ -1 & 1 \end{matrix} \right) = \left( \begin{matrix} -1 & 1 \\ -1 & 1 \end{matrix} \right).$$

The matrix $A$ is irreducible, nilpotent with real eigenvalues $0$ and is not conjugate to a symmetric matrix .