$$A=\begin{array}{ccc} 0 & 1/2 & 0 & \cdots & 0 \\ 1/2 & 0 & 1/2 &\cdots& 0\\ 0 & 1/2 & 0 & \cdots & 0\\ \vdots & \vdots & \vdots &\ddots & 1/2\\ 0 & 0 & 0 & 1/2 & 0 \end{array}$$
I need to know the spectral radius of $A$ in function of the dimension of the matrix $n$. I know only one way to know the spectral radius, using the definition I find all eigenvalues and then find the maximum. but it very hard if $n$ is changing. Some help please!
I did some iteration by
$$det(\lambda I-A)$$
$$n=2 \quad r=\frac{\sqrt{1}}{2}$$ $$n=3 \quad r=\frac{\sqrt{2}}{2}$$
for $n=2$ and $n=3$ are correct. and if we take this rule, for
$$n=5\quad \quad r=\frac{\sqrt{4}}{2}$$
but this isn´t true since I know radius for this matrix should be $< 1$ and if we take this rule for $n=5$ we have $$\frac{\sqrt4}{2}=1$$
Some hint?
The eigenvalues of an $n\times n$ tridiagonal Toeplitz matrix $A=\mathrm{tridiag}(c,a,b)$, $bc>0$, are (see, e.g., here) $$a+2\sqrt{bc}\cos\left(\frac{k\pi}{n+1}\right), \quad k=1,\ldots,n.$$ In this particular case, where $c=b=1/2$ and $a=0$, the eigenvalues are $$ \cos\left(\frac{k\pi}{n+1}\right), \quad k=1,\ldots,n, $$ so the spectral radius is $$ \rho(A)=\cos\left(\frac{\pi}{n+1}\right)\leq\underbrace{\frac{1}{2}+\frac{1}{2}=1}_{\substack{\text{bound from the}\\\text{Gershgorin theorem}}}. $$ Note that $\rho(A)\rightarrow 1$ as $n\rightarrow\infty$, so the bound obtained from the Gershgorin theorem is in a sense asymptotically sharp.