This is a followup to my question here.
Let $A$ be the $n \times n$ matrix over a field of characteristic 0, all of whose entries are 1. Is $A$ diagonalizable?
This is a followup to my question here.
Let $A$ be the $n \times n$ matrix over a field of characteristic 0, all of whose entries are 1. Is $A$ diagonalizable?
$A$ is always diagonalisable when the field has characteristic 0 or characteristic $>n$.
Let $e_i$ denotes the vector with a $1$ at the $i$-th position and zeros elsewhere. Let $P$ be the matrix whose first and second columns are respectivelly $\sum_je_j$ and $e_1-e_2$ and whose $j$-th column is $e_2-e_j$ when $j\ge3$. Clearly, the columns of $P$ are eigenvectors of $A$. It is not hard to show that $\det P=(-1)^{n+1}n$. Therefore $P$ is invertible and the aforementioned eigenvectors form an eigenbasis when the characteristic of the field is either $0$ or $>n$.
Here is a matrix $P$ that I made up some time ago. Note that $P$ is not orthogonal, although the columns are pairwise orthogonal.
10: $$ \left( \begin{array}{rrrrrrrrrr} 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 2 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 3 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 4 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 5 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 6 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 7 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 8 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 9 \end{array} \right). $$
3: $$ \left( \begin{array}{rrr} 1 & -1 & -1 \\ 1 & 1 & -1 \\ 1 & 0 & 2 \\ \end{array} \right). $$
4: $$ \left( \begin{array}{rrrr} 1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & 0 & 2 & -1 \\ 1 & 0 & 0 & 3 \\ \end{array} \right). $$
5: $$ \left( \begin{array}{rrrrr} 1 & -1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 \\ 1 & 0 & 2 & -1 & -1 \\ 1 & 0 & 0 & 3 & -1 \\ 1 & 0 & 0 & 0 & 4 \\ \end{array} \right). $$
The columns of $P$ are of varying lengths; for the 10 by 10 case depicted, lengths $ \sqrt{10}, \sqrt{2}, \sqrt{6}, \sqrt{12},..$ All that is necessary to make an orthogonal matrix $Q$ out of this is to divide each column by its length. In turn, this tells us that $\det P = \pm n!,$ as $\det Q = \pm 1.$ The result is $Q^T Q = Q Q^T = I$ and $Q^T = Q^{-1}.$ Meanwhile, $Q^T A Q= Q^{-1}AQ$ is diagonal, in this case the diagonal elements are the eigenvalues.