I'm reading a book and the book gives the following lemma without proof. (The lemma is in the solution to question 2.10 part b in the book of convex optimization by Boyd. The lemma is mentioned on page 9 in the solution manual.)
Suppose
- $A$ is an $n \times n$ symmetric matrix
- $v$, $g \in R^n$ and $g^T v = 0$
Then $v^TAv \geq 0$ if $\ \exists \ \lambda \in R$, such that $A+\lambda gg^T$ is semipositive definite.
I don't know how to prove this lemma and wish someone could help me!
By linearity we have $$ v^T\left(A + \lambda gg^T\right)v = v^TAv + \lambda (g^Tv)^T g^Tv = v^TAv $$ thus $v^TAv \geq 0$ if and only if $v^T\left(A + \lambda gg^T\right)v \geq 0$.
To understand why this is reasonable, note that the condition $g^Tv = 0$ means that $g$ is orthogonal to $v$ and that the matrix $gg^T$ represents the orthogonal projection along the line spanned by $g$.