In the solution of problem 2.10(b) of Stephen Boyd & Lieven Vandenberghe's Convex Optimization, it is mentioned that if
$$g^Tv = 0, \qquad v^TAv \geq 0 \qquad \forall v$$
where $A$ is a positive semidefinite matrix and $g$ is a vector with real elements), then there must exist $\lambda$ such that $A+\lambda gg^T$ is positive semidefinite. How to obtain this?
Here is the solution image which I am talking about: