How to find the eigenvalues and Jordan canonical form of this matrix Question:
let $a_{i,j}\in R,A=(a_{i,j})_{n\times n} $,and 
$a_{i,j}=\begin{cases}
1&i+j\in\{n,n+1\}\\
0&i+j\notin\{n,n+1\}
\end{cases}$
that's meaning:
$$A=\begin{bmatrix}
0&0&0&\cdots&0&1&1\\
0&0&0&\cdots&1&1&0\\
0&0&\cdots&1&1&0&0\\
\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\
0&1&1&\cdots&0&0&0\\
1&1&0&\cdots&0&0&0\\
1&0&0&\cdots&0&0&0
\end{bmatrix}_{n\times n}$$
Problem (1): Find the Jordan canonical form of $A$.
I know this matrix Jordan is 
$$diag(\lambda_{1},\lambda_{2},\cdots,\lambda_{n})$$
where $\lambda_{i}$ is eigenvalue
But this problem key find the eigenvalue is hard,
Thank you.maybe this problem is not easy,But I hope see someone can solve it.Thank you very much!
 A: Edit: I haven't an answer, but here are some observations. Note that $A$ is real symmetric. Hence it is diagonalisable. Furthermore, $|\det(A)|=1$. So, the Jordan form of $A$ is a diagonal matrix with nonzero entries. This answers your first question.
For the second question, it seems that even finding the characteristic polynomial of $A$ is not easy. However, observe that
$$
B_n=A^2=\pmatrix{2&1\\ 1&\ddots&\ddots\\ &\ddots&\ddots&\ddots\\ &&\ddots&2&1\\ &&&1&\color{red}{1}}.
$$
If we can determine the eigenvalues of $B_n$, at least we know the absolute values of the eigenvalues of $A$. Now, if we perform Laplace expansion along the first row of $xI_n-B_n$, we see that the characteristic polynomial $p_n(x)$ of $B_n$ is given by the recurrence relation $p_n(x) = (x-2) p_{n-1}(x) - p_{n-2}(x)$, with $p_0(x)=1$ and $p_1(x)=x-1$. Yet I am not sure if there is any explicit formula for the roots of $p_n$.
Some careful analysis would show that when $n=3k+1$, one of the eigenvalues of $A$ is $1$, but this does not seem to be useful in determining other eigenvalues of $A$.
A: I show below that the eigenvalues of $A$ are exactly the numbers
$-2\cos\big(j\frac{2\pi}{2n+1}\big)$ for $1\leq j\leq n$.
What makes everything work is the 
identity $2\cos(\theta)\cos(k\theta)=\cos((k-1)\theta)+\cos((k+1)\theta)$.
Unfortunately the eigenvectors are a little complicated to express directly,
the best presentation I could find so far was by successively applying
two reasonably simple change of bases.
Denote by $\alpha$ the endomorphism of ${\mathbb R}^n$ canonically associated
to $A$, and by $(d_1,d_2,d_3, \ldots,d_n)$ the canonical basis of ${\mathbb R}^n$.  We thus
have
$$
\alpha(d_j)=
\left\lbrace\begin{array}{lcl}
d_{n-j}+d_{n+1-j}, & \text{for} & j<n, \\
d_1,   & \text{for} & j=n.
\end{array}\right. \tag{1}
$$
Let us put $z_1=d_1,z_2=d_2$, and $z_j=d_{j}-d_{j-2}$ for $j>2$. We have thus
defined a new basis ${\mathcal Z}=(z_1,z_2,z_3, \ldots,z_n)$, and for any $j$
we have $d_j=\sum_{k\leq j, k \equiv j \ ({\sf mod} \ 2)} z_k$. We deduce that
$$
\alpha(z_j)=
\left\lbrace\begin{array}{lcl}
\sum_{k=1}^n z_k, & \text{for} & j=1, \\
\sum_{k=1}^{n-1} z_k, & \text{for} & j=2, \\
-z_{n+2-j}-z_{n+3-j}, & \text{for} & j>2. \\
\end{array}\right. \tag{2}
$$
In other words, the matrix of $\alpha$ relative to the basis $\mathcal Z$ is
$$
Z=\left(\begin{array}{ccccccccc}
1 & 1 & & & & \ldots & & & \\
1 & 1 & & & & \ldots & & & -1 \\
1 & 1 & & & & \ldots & & -1 & -1 \\
1 & 1 & & & & \ldots & -1 & -1 &  \\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
1 & 1 & & & -1 & \ldots &  &  &  \\
1 & 1 & & -1 & -1 & \ldots &  &  &  \\
1 & 1 & -1 & -1 &  & \ldots &  &  &  \\
1 &  & -1 &  &  & \ldots &  &  &  \\
\end{array}\right) \tag{3}
$$
Next, let us define a new basis ${\mathcal W}=(w_1,w_2,w_3, \ldots,w_n)$, by putting
$$
w_j=
\left\lbrace\begin{array}{lcl}
z_{l+1}, & \text{for} & j=n-2l, l\geq 0 \\
z_{n+1-l}, & \text{for} & j=n-(2l+1),l\geq 1 \\
-(\sum_{k=1}^n z_k), & \text{for} & j=n-1. \\
\end{array}\right. \tag{4}
$$
By construction, we have
$$
z_j=
\left\lbrace\begin{array}{lcl}
w_{n+2-2j}, & \text{when} & n+2-2j\geq 1 \\
w_{2j-(n+3)}, & \text{when} & 2j-(n+3)\geq 1 \\
-(\sum_{k=1}^n w_k), & \text{when} & j \text{ is the unique integer in } [\frac{n+2}{2},\frac{n+3}{2}]. \\
\end{array}\right. \tag{5}
$$
We deduce that 
$$
\alpha(w_j)=
\left\lbrace\begin{array}{lcl}
w_1+\sum_{k=3}^n w_k, & \text{for} & j=1, \\
-w_{j-1}-w_j, & \text{for} & 1 < j < n-1, \\
-w_{n-1}-2w_n, & \text{for} & j=n-1, \\
-w_{n-1}, & \text{for} & j=n. 
\end{array}\right. \tag{6}
$$
In other words, the matrix of $\alpha$ relative to the basis $\mathcal W$ is
$$
W=\left(\begin{array}{cccccccccc}
1 & -1 &    &    &    & \ldots & & & &  \\
0 &    & -1 &    &    & \ldots & & &  &  \\
1 & -1 &    & -1 &    & \ldots & &  &  &  \\
1 &    & -1 &    & -1 & \ldots &  &  & &  \\
1 &    &    & -1 &    & \ldots &  &  & &  \\
\vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots  \\
1 &  & & &  & \ldots   & -1 &    &    &      \\
1 &  & &  &  & \ldots  &    & -1 &    &      \\
1 &  &  &  &  & \ldots & -1 &    & -1 &      \\
1 &  &  &  &  & \ldots &    & -1 &    & -1   \\
1 &  &  &  &  & \ldots &    &    & 2 &      \\
\end{array}\right) \tag{7}
$$
From the identity
$2\cos(\theta)\cos(k\theta)=\cos((k-1)\theta)+\cos((k+1)\theta)$, (combined
with $\cos(-k\theta)=\cos(k\theta)$ and $\displaystyle\sum_{k=1}^{n} \cos(k\theta)=-\frac{1}{2}$ when
$\theta$ is a multiple of $\frac{2\pi}{2n+1}$), we see that for $1\leq j \leq n$, the vector
$$
v_j=\sum_{k=1}^{n} \cos\bigg(jk\frac{2\pi}{2n+1}\bigg)w_j
$$
is an eigenvector for $W^T$, associated to the eigenvalue $-2\cos\big(j\frac{2\pi}{2n+1}\big)$. This finishes the problem.
A: Although Ewan Delanoy was more quick than I, :-)  I’ll continue user1551‘s answer.  
It seems the following. Denote the determinant of the $n\times n$ matrix $xI-A$ as $q_n(x)$. Then we can calculate the first polynomials: 
$q_1=x-1$ 
$q_2=x^2-x-1$
$q_3=x^3-x^2-2x+1$
$q_4=x^4-x^3-3x^2+2x+1$
$q_5=x^5-x^4-4x^3+3x^2+3x-1$
$q_6=x^6-x^5-5x^4+4x^3+6x^2-3x-1$
$q_7=x^7-x^6-6x^5+5x^4+10x^3-6x^2-4x+1$
Investigating decomposition of the determinant $|xI-A|$ by the first row, we obtain the following recurrence: 
$q_n=(x^2-1)q_{n-2}-xq_{n-3}$ for each $n\ge 4$.
Adding for the completeness the polynomial $q_0\equiv 1$, we can easily prove the recurrence 
$q_n=xq_{n-1}-q_{n-2}$ for each $n\ge 2$. 
The Google search by these polynomials suggests that roots of the polynomial $q_n$ are $x_{k}=2\cos\frac{2k+1}{2n+1}\pi $, where $k=0,\dots,n-1$ (but not always for $k=n$). 
Geometric interpretation (and Ewan Delanoy’s solution :-) ) suggest to try to take as $q_n$ a sum $s_n(x)=(-1)^n\sum_{j=-n}^n \cos jt,$ where $t=\arccos (-x/2)$. 
We can check that $s_n=q_n$ for all $n\le 3.$  Let $n\ge 2$. Then 
$$s_n(x)+s_{n-2}(x)= (-1)^n\sum_{j=-n}^n \cos jt+(-1)^{n-2}\sum_{j=-n+2}^{n-2} \cos jt=
(-1)^n\left(\sum_{j=-1}^1 \cos jt + 2\sum_{j=2}^n \left( \cos jt+\cos (j-2)t \right)-\sum_{j=0}^0 \cos jt \right)= (-1)^n\left(-x+2\sum_{j=2}^n 2\cos (j-1)t\cos t \right)=
(-1)^n\left(-x-2x\sum_{j=1}^{n-1} \cos jt \right)=s_{n-1}x.$$
That is $s_n(x)+s_{n-2}(x)=xs_{n-1}x$. Therefore $s_n=q_n$ for each $n$. At last, we show that $s=s_n(2\cos\frac{2k+1}{2n+1}\pi)=0$ for $k=0,\dots,n-1$. But in this case $$s=
(-1)^{n-1}\sum_{j=-n}^n \cos j\left(\frac{2k+1}{2n+1}+1\right)\pi$$ is a multiple of the sum of the abscissas of vertices of a right $(2n+1)/d$-gon $P$ centered at the zero of the complex plane, where $d$ is a greatest common divisor of the numbers $k+n+1$ and $2n+1$. The rotational symmetry of $P$ implies that $se^{2d\pi i/(2n+1)}=s$. Therefore $s=0$.
PS. The Google  search by “x^5-x^4-4x^3+3x^2+3x-1” yielded me only two links. One of then to *.jp site, and the other to this MSE question. The recurrent relations and the roots of the polynomials $q_n$ are similar to these of Chebyshev (and cyclotomic) polynomials, so I added relative tags to the question. But the general trigonometric formula for polynomials $q_n$ is much more complex than the trigonometric formula for Chebyshev polynomials.
