M={{9,-2,0,0,0},{-2,9,-2,0,0},{0,-2,9,-2,0},{0,0,-2,9,-2},{0,0,0,-2,9}}

Eigenvalues[M]

MM={{9,-2,0,0,0,0,0},{-2,9,-2,0,0,0,0},{0,-2,9,-2,0,0,0},{0,0,-2,9,-2,0,0},{0,0,0,-2,9,-2,0},{0,0,0,0,-2,9,-2},{0,0,0,0,0,-2,9}}

Eigenvalues[MM]

N[%]

Sort[%]

MMM={{9,-2,0,0,0,0,0,0,0,0},{-2,9,-2,0,0,0,0,0,0,0},{0,-2,9,-2,0,0,0,0,0,0},{0,0,-2,9,-2,0,0,0,0,0},{0,0,0,-2,9,-2,0,0,0,0},{0,0,0,0,-2,9,-2,0,0,0},{0,0,0,0,0,-2,9,-2,0,0},{0,0,0,0,0,0,-2,9,-2,0},{0,0,0,0,0,0,0,-2,9,-2},{0,0,0,0,0,0,0,0,-2,9}}

Eigenvalues[MMM]

N[%]