TITLE: Can such a matrix be singular?
QUESTION [7 upvotes]: Let $A$ be an $n\times n$ matrix that satisfies
i. All diagonal entries of $A$ are positive, even integers,
ii. All non-diagonal entries of $A$ are positive, odd integers,
iii. $A$ is symmetric: $A_{ij}=A_{ji}$.
iv. If $i\neq j$, then $A_{ij}<A_{ii}$ and $A_{ij}<A_{jj}$.
Question: can such $A$ be singular (i.e. $|A|=0$)?
I can prove the answer is NO, when $n$ is even, and without using condition iv: reduce $A$ mod $2$ we get a matrix with zero diagonal and all other entries $1$; then we can compute directly that the determinant of such matrix is odd, in particular not zero. When $n$ is odd this argument says $|A|$ is even, I don't know if it can be zero, and it seems condition iv will be important here.
I encountered it when I was trying to solve a question in this post.

REPLY [2 votes]: Yes, $A$ can be singular. Let $n\ge3$ be odd. Consider
$$
A=\left[\begin{array}{cccc|c}a&b&\cdots&b&d\\ b&a&\ddots&\vdots&\vdots\\ \vdots&\ddots&\ddots&b&\vdots\\ b&\cdots&b&a&d\\ \hline d&\cdots&\cdots&d&c\end{array}\right]
=\begin{bmatrix}(a-b)I_{n-1}+bee^T&de\\ de^T&c\end{bmatrix}
$$
where $a,c$ are even, $b,d$ are odd, $\max(b,d)<\min(a,c)$ and $e=(1,1,\ldots,1)^T\in\mathbb R^{n-1}$. Using Schur complement, $A$ is congruent to $B=\left[(a-b)I_{n-1}+(b-\frac{d^2}{c})ee^T\right]\oplus c$. The eigenvalues of $B$ are $a+(n-2)b-\frac{d^2}{c}(n-1),\,a-b$ and $c$. The latter two are odd integers. Hence $B$ and $A$ are singular if and only if
$$
[a+(n-2)b]c=(n-1)d^2.
$$
When $n\ge5$ is odd, we can always pick $(b,c,d)=(1,n-1,n-2)$ and $a=d^2-d=(n-2)(n-3)$. Note that we do have $\max(b,d)=d<d^2-d=\min(a,c)$ in this case.
When $n=3$, the above choice of $(a,b,c,d)$ does not work (because $d$ becomes zero), but a brute-force search gives a solution $(a,b,c,d)=(16,9,18,15)$, i.e.
$$
A=\begin{bmatrix}16&9&15\\ 9&16&15\\ 15&15&18\end{bmatrix}.
$$