# Does adding non-negative values to diagonal of positive definite matrix preserves positive definiteness?

Does adding non-negative values to the diagonal of a positive definite matrix preserves its positive definiteness?

For example, $$A$$ is a symmetric positive definite matrix, and $$D$$ is a diagonal matrix with non-negative elements. Is $$A+D$$ positive definite?

• yes and it is fairly easy to see why: $\langle (A+D)x,x\rangle = \langle Ax,x\rangle + \langle Dx, x\rangle$ by the linearity of inner products. If $A$ is positive definite and $D$ is a diagonal matrix with nonnegative elements, both terms are larger than zero, i.e positive definite Aug 18, 2021 at 21:30
• @Imaosome the term $x^TDx$ can be zero for the special case $D=0$.
– user
Aug 18, 2021 at 21:31

We have that $$\forall x\neq 0$$
$$x^T(A+D)x = x^TAx+x^TDx > 0$$