# Eigenvalues of matrix with -1 values

Please help me calculate eigenvalues and eigenvectors for a square matrix, with $n$ rows and $n$ columns, and $-1$ in each cell:$$\begin{bmatrix} -1 & \,\,\cdots & -1\\\,\,\vdots \strut& \,\,\ddots & \,\,\vdots \strut\\ -1 &\,\,\cdots & -1\end{bmatrix}$$

I guess that this is a $0$ and $n$, vectors $(1,1,\ldots,1)$ and $(1,-1,0,\ldots)$, $(1,0,-1,0,\ldots),\ldots$

How to prove it?

-
To be clear, you mean a matrix of the form $$\begin{bmatrix} -1 & \cdots & -1\\\,\vdots \strut& \,\ddots & \,\vdots \strut\\ -1 &\cdots & -1\end{bmatrix}\qquad ?$$ – Zev Chonoles Feb 28 '13 at 20:00
Yes, that's correct matrix – Steve Feb 28 '13 at 20:03

## 1 Answer

For $i=1\ldots n$ let $e_i$ be the $i$-th vector of the canonical basis of $\mathbb R^n$, i.e. $$(\vec e_i)_j = \begin{cases} 1 & \text{if }i=j \\ 0 & \text{if }i\neq j\end{cases}$$ If $M_{ij}=-1$ $\forall i,j$ then, as you say, $\vec v_i=\vec e_1-\vec e_i$ ($i=2\ldots n$) are all eigenvectors of $M$ with eigenvalue $0$. In fact for all $j=1\ldots n$ $$(M\vec v_i)_j = \sum_{\ell=1}^n M_{j\ell}(\vec v_i)_\ell = (-1)\cdot (\vec v_i)_1 + (-1)\cdot(\vec v_i)_i = -1 -(-1) = 0$$ Therefore $M\vec v_i = \vec 0 = 0\cdot\vec v_i$.

A similar computation shows that $\vec u=(1\ldots 1)$ is an eigenvector of $M$ with eigenvalue $1$.

$\vec u,\vec v_2\ldots \vec v_n$ are $n$ linearly independent eigenvectors, i.e. they form a basis of $\mathbb R^n$ so no more linearly independent eigenvectors exist.

-