<s>[INST] 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!
 [/INST] 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.
</s>