eigenvector and spectral norm $x^TAx=\lambda$ with $A$ is a semi-positive definite matrix, $x$ is a unit vector, and $\lambda\ne 0$ is the largest eigenvalue of $A$. Then $x$ is an eigenvector of $A$? I.e., $Ax=\lambda x$?

It can be solved by Lagrange multipler for the following optimization
$
\text{maximize}\{ x^TAx\}\quad s.t. \quad x^Tx=1 .
$
To solve the above optimization, using Lagrange multipler, it needs
$
\text{maximize}\{ x^TAx+\lambda(x^Tx-1) \}.
$
Taking the derivative of the objective function w.r.t. $x$ and then let it be $0$ yields $Ax=\lambda x$.
Thus the optimal $x$ must be the eigenvector of A.
