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?
Not true. Just take $1$ along the diagonal and $-10$ off diagonal in a $2 \times 2$ matrix.