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:

From what's given, $A$ is positive semidefinite. Therefore,
\begin{align} v^T (A + \lambda g g^T ) v &= v^T A v + \lambda v^T g g^T v \\ &= v^T A v + \lambda (v^T g)(g^Tv) \\ &= v^T A v + 0 \\ &= v^T A v \\ &\geq 0. \end{align}