Question: Suppose $I$ is an $n \times n$ identity matrix, and $S$ is the $n \times n$ symmetric matrix with rank equals two. I was reading something saying that:
$$\det(I-S)=(1-\lambda\_1)(1-\lambda\_2)$$

where $\lambda\_1$ and $\lambda\_2$ are the two largest (in absolute values) eigenvalues of $S$. Can anyone provide some clues for proving this? Thanks in advance!

Answer: 
Notice that $S$ is symmetric real then it's diagonalizable over $\Bbb R$ and since it's rank is $2$ then it's similar to
$$\operatorname{diag}(\lambda\_1,\lambda\_2,0,\ldots,0)$$
where $\lambda\_i\ne0$ so $I-S$ is similar to
$$\operatorname{diag}(1-\lambda\_1,1-\lambda\_2,1,\ldots,1)$$
and then the result follows easily.
Diagonalizing does not matter much; if you know the full list of eigenvalues and multiplicities, adding, say, $tI$ just adds $t$ to each eigenvalue. The same would work for something with nontrivial Jordan form, you don't need to know full details of the Jordan form, just the diagonal entries.