How to diagonalize the following matrix?
$$ A=\begin{pmatrix} 0 & a& 0 & 0 & 0 & \cdots \\ a& 0 & b & 0 & 0 & \cdots \\ 0 & b & 0 & b & 0 & \cdots \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots \\ \cdots & 0 & 0 & b & 0 & b \\ \cdots & 0 & 0 & 0 & b & 0 \\ \end{pmatrix} $$
Let me write in answer box. Apply the row operations $[(-b/a)R_1+R_3 \to R_3]$, $[-R_3+R_5 \to R_5]$, ..., $[-R_{2k+1}+R_{2k+3} \to R_{2k+3}]$ Denote this operations by the matrices $C_i$ and their corresponding columns operations are denoted by $C_i^T$. Then (let the matrix in question is $A$)
$C_sC_{s-1}...C_1AC_1^T...C_s^T$ is the following matrix
\begin{bmatrix} A & & & & & & \\ & 0 & & & & &\\ & & B & & & & \\ & & & 0 & & & \\ & & & & B & & \\ & & & & & 0 & \\ & & & & & & B \\ & & & & & & & . \\ & & & & & & & & . \end{bmatrix}
where $A=\begin{bmatrix} 0 & a \\ a & 0 \end{bmatrix}$, and $B=\begin{bmatrix} 0 & b \\ b & 0 \end{bmatrix}$ and $0$ is $2 \times 2$ zero matrix. Then apply the following row operations
$R_{4k+2}+R_{4k+1}=R_{4k+1}$ and their corresponding column operations $C_{4k+2}+C_{4k+1}=C_{4k+1}$simultaneously. Let these row operations denoted by $E_k$. Then
$E_t...E_1(C_sC_{s-1}...C_1AC_1^T...C_s^T)E_1^T...E_t^T$ is the following matrix
\begin{bmatrix} A & & & & & & \\ & 0 & & & & &\\ & & B & & & & \\ & & & 0 & & & \\ & & & & B & & \\ & & & & & 0 & \\ & & & & & & B \\ & & & & & & & . \\ & & & & & & & & . \end{bmatrix}
where
where $A=\begin{bmatrix} 2a & a \\ a & 0 \end{bmatrix}$, and $B=\begin{bmatrix} 2b & b \\ b & 0 \end{bmatrix}$ and $0$ is $2 \times 2$ zero matrix. Then apply the following row operations
$(-1/2)R_{4k+1}+R_{4k+2}=R_{4k+2}$ and their corresponding column operations simultaneously. Let these row operations denoted by $F_k$. Then
$F_t^T...F_1^T(E_t...E_1C_sC_{s-1}...C_1AC_1^T...C_s^TE_1^T...E_t^T)F_1^T...F_t^T$ is the diagonal matrix whose diagonal entries are $2a,-a/2,0,0,2b,-b/2,0,0,2b,-b/2,0,0,...$