Teacher is correct, the result still holds in the positive semidefinite case.

One way to see it, thinking of A as a linear transformation rather than a matrix, is to let L be the kernel of A (equivalently, the eigenspace corresponding to the eigenvalue 0). Let B denote the restriction of A to the orthogonal complement . Then B is positive definite on , and is the restriction of to . So the nonzero eigenvalues of are exactly the eigenvalues of . The square root of the largest one is equal to the largest eigenvalue of B, which is equal to the largest eigenvalue of A.