# Symmetric matrix, a>0 on diagonal and b<0 off diagonal, positive definite?

this came up in a specific example that I'm working on, but I'm wondering under what conditions it's true in general.

Consider an nxn matrix, all of whose diagonal entries are a>0 and all of whose non-diagonal entries are b<0. Is the matrix positive (semi)definite?

In the specific example I'm interested in, n=10000, a=17.552 and b=-0.00175538. But I'm interested in the question in general too.

Thanks

Edit: The general 2x2 case is easy to work out by hand. There, the matrix is positive definite (respectively semidefinite) if and only if a+b>0 (respectively >= 0). But what about in general?

## 2 Answers

Not true. Just take $$1$$ along the diagonal and $$-10$$ off diagonal in a $$2 \times 2$$ matrix.

• The off diagonal elements have to be small in absolute value compared to the diagonal elements to get non-negtive definiteness. – Kavi Rama Murthy Jul 29 '19 at 8:30

In general (see answer by Kavi Rama Murthy), this is not true, but if the diagonal values are large, and off diagonals are small, then the Gershgorin circles might give you enough info to prove that the matrix has only positive eigenvalues.

• Thanks for the link. Yes, that answers it. Now I'm even more curious... Suppose a=(n-1)|b|. Are the eigenvalues going to be exactly 0 (multiplicity 1) and n|b| (multiplicity n-1)? That's how it looks in the examples I've put into the computer. – J.D. Jul 29 '19 at 8:53
• The vector $v$ with constant coefficients equal to $1$ is eigen. For $a=-(n-1)b$, it corresponds to the eigenvalue $0$. As your matrix is symetric, it is diagonalisable on a orthonormal basis. Set $V=v^{\perp}$, Check that $OMO^{-1}=M$ for every $O\in O(n)$ that let $v$ (thus $V$) stable. This implies that $M$ as a single eigenvalue on $V$, which thus has multiplicty $n-1$. Another way to do it is to verify that if $w\in V$ is eigen, then every permutation of its component is also eigen. A third way is to write your matrix as $cI-dE$ where $E$ is full 1, then use characteristic polynomial – Isao Jul 29 '19 at 9:46