I'm sanity-checking a proof I have that a symmetric matrix is singular iff it has a zero on the diagonal. I don't think this proof is right, but I can't find out why.
Forward direction, $S \text{ is singular} \Rightarrow \exists i : S_{ii} = 0$. $$ \begin{align*} S \text{ is singular} && \text{given} \\ \exists i : \lambda_i & = 0 && \text{all singular matrices have a 0 eigenvalue} \\ S & = Q \Lambda Q^T && \text{eigendecomposition (diagonalizable because symmetric)} \\ S_{ii} & = \lambda_i q_i^{\top}q_i \\ S_{ii} & = 0 && \blacksquare \end{align*} $$ Backward direction $\exists i : S_{ii} = 0 \Rightarrow S \text{ is singular}$ $$ \begin{align*} \exists i : S_{ii} & = 0 && \text{given} \\ S & = Q \Lambda Q^T && \text{eigendecomposition} \\ S_{ii} & = \lambda_i q_i^{\top} q_i = 0 \\ \lambda_i & = 0 && q_i \neq 0 \text{ because it's an eigenvector} \\ S & \text{ is singular} && \text{any 0 eigenvalue means singular } \blacksquare \end{align*} $$
Where did I go wrong?