$\begin{bmatrix}\mathbf O & U\\ V^T & 0\end{bmatrix}$ is diagonalizable? I was trying to solve this problem: find all vectors $U, V\in \mathbb R^{n}$ such that $$\begin{bmatrix}\mathbf{O} & U \\
V^T & 0\end{bmatrix}$$ is a diagonalisable matrix.
I was able to see that the above matrix is of rank at most $2$ so I tried to find the remainning two eigenvalues of the matrix, but I did not find them in terms of $U$ and $V$. Is there any way to do it?
 A: I assume we are considering diagonalizability over $\mathbb{R}$. Furthermore, assume that neither $U$ nor $V$ are zero.
A necessary and sufficient condition for diagonalizability is that the minimal polynomial is a product of distinct linear factors.
The nonzero eigenvalues are $\pm \sqrt{U^T V}$. To arrive at this, consider $A^2,$ the eigenvalues of which are the eigenvalues of $A$ squared.
$A^2 = 
\begin{pmatrix}
U V^T & \mathbf{0} \\
\mathbf{0}^T & U^T V 
\end{pmatrix}.$
From this, it is clear that the vector of all ones is an eigenvector. Furthermore, the vector with only 1 in the last entry and zeros elsewhere is an eigenvector. In both cases, the corresponding eigenvalue of $A^2$ is $U^T V$. Taking the positive and negative square root yields the eigenvalues of $A$.
Interestingly, for any $k \in \mathbb{N}$, if $(i, j)$ is a nonzero entry of $A^k$, then the $(i,j)$ entry of $A^{k+1}$ is zero and vice versa. To see this in practice, computing $A^3$ yields
$A^3 = 
\begin{pmatrix}
 \mathbf{0}\mathbf{0}^T & U^TV U \\
 U^TV V^T & 0 
\end{pmatrix}.$
In other words, odd powers of $A$ have the "opposite" nonzero pattern than the even powers of $A$.
From this, assuming neither $U$ nor $V$ equals $0$, we can conclude that the minimal polynomial of $A$ will not include even terms (the only way to cancel even terms would be even terms of higher order, which would be unnecessary).
It is clear from these calculations that $x^3 - U^T V x$ is an annihilating polynomial for A. Because $x$ is not an annihilating polynomial (neither $U$ nor $V$ are zero), this polynomial must be the minimal polynomial.
Thus, diagonalizability of $A$ is determined by the factorization of $x^3 - U^TV x$ into linear factors. We have
$x^3 - U^TV x = x(x^2 - U^TV).$
For $U^TV$ positive, $x^2 - U^TV$ factors into $(x + \sqrt{U^TV})(x - \sqrt{U^TV})$. For $U^TV$ negative, no such factorization is possible over $\mathbb{R}$. For $U^TV = 0$, the minimal polynomial is $x^3,$ and thus not a product of distinct linear factors.
Therefore, the matrix is diagonalizable over $\mathbb{R}$ if and only if $U^TV$ is positive.
For the case where both $U$ and $V$ are zero, the matrix is trivially diagonalizable. For the case where one of $U$ or $V$ are zero, the matrix is nilpotent and the minimal polynomial is $x^2,$ and thus the matrix is not diagonalizable. For $U^TV$ negative, the matrix is diagonalizable over $\mathbb{C}$.
A: Denote by $A$ the given matrix and suppose that the base field is $\mathbb R$.
Case 1:  $U=V=0$
In that case, $A=0$ is diagonalizable.
Case 2: only one of $U,V$ is equal to zero
Here, $A$ is a non-zero triangular matrix with the main diagonal equal to zero. Hence $A$ is not diagonalizable.
Case 3: non of $U,V$ is zero
In that case, the rank of $A$ is equal to $2$. Its null space is of dimension $n-2$ and defined by the equations:
$$\begin{cases}
x_{n+1} &= 0\\
\sum_{i=1}^n V_i x_i &= 0
\end{cases}$$
Let's have a look at the other eigenspaces. If $x \neq 0$ is an eigenvector associated to the eigenvalue $\lambda \neq 0$, we have the equations
$$\begin{cases}
U_i x_{n+1} &= \lambda x_i \text{ for } 1 \le i \le n\\
\sum_{i=1}^n V_i x_i &= \lambda x_{n+1}
\end{cases}$$
$x_{n+1} \neq 0$ as otherwise $x =0$. Replacing $x_i= \frac{U_i x_{n+1}}{\lambda}$ in the last equation, we get
$$\lambda^2 = \sum_{i=1}^n U_i V_i = U^TV$$
If $U^TV \lt 0$, $0$ is the only eigenvalue of $A$ which is non-zero, and $A$ is not diagonalizable.
If $U^TV = 0$, we get $\lambda = 0$. $0$ is the only eigenvalue and the associated eigenspace is of dimension $n-2$. Hence $A$ is not diagonalizable.
Finally if $U^TV \gt 0$, we get two additional non-zero eigenvalues, namely $\pm \sqrt{U^TV}$ with associated distinct eigenspaces of dimension $1$. Therefore $A$ is diagonalizable.
A: First if $U=0$ or $V=0$, then the matrix is nilpotent, as $A^2=O$, and hence cannot be diagonalized, unless $A=O$ itself. Now we assume $U\not=0$ and $V\not=0$, which implies $A$ has rank $2$, and therefore $A$ can be diagonalized iff it has two linearly independent eigenvectors with nonzero eigenvalues, and in fact we can explicitly compute the nonzero eigenvalues.
$$A-\lambda I = 
\begin{pmatrix} 
    -\lambda  & \dots  & U_1\\
    \vdots & \ddots & \vdots\\
    V_1 & \dots  & -\lambda 
\end{pmatrix}
  =\frac{1}{\lambda}
\begin{pmatrix} 
    -1  & \dots  & U_1/\lambda\\
    \vdots & \ddots & \vdots\\
    V_1/\lambda & \dots  & -1 \end{pmatrix}$$
Now we can use the $-1$ on the diagonal in each row to cancel $U_i/\lambda$ at the end of each row, by adding the $i$-th column multiplied by $U_i/\lambda$ to the last column, which creates the following lower triangular matrix $$\begin{pmatrix} 
    -1  &   & \\
    \vdots & \ddots & \\
    V_1/\lambda & \dots  & -1+\sum_{i=1}^n \frac{U_iV_i}{\lambda^2} \end{pmatrix}$$ whose determinant is up to a sign $$-1+\sum_{i=1}^n \frac{U_iV_i}{\lambda^2}=0$$ Hence $$\lambda^2=\sum_{i=1}^n U_iV_i=U^tV$$
If $U^tV=0$, then it has no nonzero solution, therefore the matrix cannot be diagonalized.
In any general field with char $\not=2$, it either doesn't have any solution or two distinct solutions. In the latter case, the two eigenvectors corresponding to distinct eigenvalues must be linearly independent. Therefore, a necessary and sufficient condition for the matrix to be diagonalizable over $F$ (with $\text{char }F\not=2$) is $U^tV$ is a nonzero square in $F$.
In particular, when $F=\mathbb R$, the above is equivalent to $U^tV>0$.
In fact, we can explicitly write down the eigenvectors corresponding to eigenvalues $\alpha=\pm \sqrt{U^tV}$: $$\begin{pmatrix} V \\ \alpha \end{pmatrix}$$
Update: Once the above is done, I realized we can directly work with the eigen-equation $$A\begin{pmatrix} W \\ w \end{pmatrix} = \begin{pmatrix} wV \\ U^tW \end{pmatrix} = \lambda \begin{pmatrix} W \\ w \end{pmatrix}$$
From $wW=\lambda V$, by a proper scaling, we may assume the $W=V$, hence $\lambda = w$ is the eigenvalue with the property $\lambda^2=U^tW=U^tV$. In particular, in characteristic $2$, as there can be at most one such $\lambda$, it has at most one linearly independent eigenvector with nonzero eigenvalue, hence the matrix is never diagonalizable (unless it's the zero matrix).
