# Why is this matrix necessarily positive definite?

A recently asked question here was solved with the claim that any symmetric square matrix $$M$$ of the following form is positive definite:

• All of the off-diagonal elements are the same positive integer $$k$$.

• Each diagonal element is a positive integer $$n_i \gt k$$. The diagonal elements may or may not be equal to one another.

The matrix arises as the product of a particular incidence matrix with its transpose. Why is a matrix of this form positive definite?

• Thanks, but in this case positive definite was essential to the proof. – Robert Shore Feb 26 at 0:34
• It is positive definite because it is the sum of a positive definite matrix (namely, the positive diagonal matrix $\operatorname{diag}(n_1-k,\ n_2-k\ldots)$) and a positive semidefinite matrix (whose elements are all equal to $k$). – user1551 Feb 26 at 0:39
• @user1551 Elegant argument. I was messing around with row-echelon form. You ought to post this as an answer, I think. – saulspatz Feb 26 at 0:47
• @RodrigodeAzevedo We needed to know the matrix is positive definite in order to get control over the rank of the incidence matrix. – Robert Shore Feb 26 at 0:53
• @user1551 I agree, it's answer time! Ready to upvote it b/c you beat me to it. – Oscar Lanzi Feb 26 at 1:25

It is positive definite because it is the sum of a positive definite matrix (namely, the positive diagonal matrix $$\operatorname{diag}(n_1−k,\ n_2-k,\ldots)$$) and a positive semidefinite matrix (whose elements are all equal to $$k$$).