I need to derive a formula for the characteristic polynom of a complete graph. Here are some example of the adjacency Matrices:
$$ K_2= \begin{pmatrix}{} 0 & 1 \\ 1 & 0 \\ \end{pmatrix} $$ $$ \chi(K_2)=(-1 + x) (1 + x) $$
$$ K_3= \begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{pmatrix} $$
$$ \chi(K_3)=-(-2 + x) (1 + x)^2 $$
$$ K_4=\left( \begin{array}{cccc} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \\ \end{array} \right)$$
$$ \chi(K_4)=(-3 + x) (1 + x)^3 $$
$$ K_5= \left( \begin{array}{ccccc} 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 0 \\ \end{array} \right)$$
$$ \chi(K_5)=-(-4 + x) (1 + x)^4 $$
I see the pattern: $$ \chi(K_n)=(-1)^{n}(-(n-1) + x) (1 + x)^{(n-1)} $$ Although I have no idea how to proove it. Any ideas?
Application: From the closed formula one can derive the number of closed walks in the graph
If you add the identity then you get a rank-one matrix whose characteristic polynomial is $$\chi(K_n + I) = (-1)^n x^{n-1} (x - n).$$ The factor $(x-n)$ coming from the lone eigenvalue $n$ with eigenvector $(1,1,...1).$ When passing from $K_n+I$ to $K_n$ you substitute $x \mapsto x+1$ and get the formula you want.