# Diagonalization of a big scary matrix

I would need to diagonalize this tridiagonal block matrix $M$:

$$M = \begin{bmatrix} A & B & & \\ B^T & A & B & \\ & B^T & A & B \\ & & \ddots & \ddots & \ddots \\ & & & B^T & A & B \\ & & & & B^T & A \end{bmatrix}_{n \times n}$$

where matrices $A$ and $B$ are also $n \times n$ tridiagonal:

$$A = \begin{bmatrix} C & D & & \\ D & C & D & \\ & D & C & D \\ & & \ddots & \ddots & \ddots \\ & & & D & C & D \\ & & & & D & C \end{bmatrix}_{n \times n}$$

$$B = \begin{bmatrix} E & F & & \\ G & E & F & \\ & G & E & F \\ & & \ddots & \ddots & \ddots \\ & & & G & E & F \\ & & & & G & E \end{bmatrix}_{n \times n}$$

where:

$$C = \begin{bmatrix} 8 & 0\\ 0 & 8 \end{bmatrix} \quad D = \begin{bmatrix} -2 & 0\\ 0 & 0 \end{bmatrix} \quad E = \begin{bmatrix} 0 & 0\\ 0 & -2 \end{bmatrix} \quad F = \begin{bmatrix} -1 & 1\\ 1 & -1 \end{bmatrix} \quad G = \begin{bmatrix} -1 & -1\\ -1 & -1 \end{bmatrix}$$

So essentially $M$ is $4n^2 \times 4n^2$ large.

I would need to do this, because I need to solve this system of differential equations $\ddot{\vec{x}} = -M \vec{x}$. When I set $\vec{x} = \vec{u} e^{i \omega t}$, I got the problem of eigenvalues $M \vec{u} = \omega^2 \vec{u}$, where $\omega^2$ are the eigenvalues and $\vec{u}$ are the eigenvectors.

It would be great, if this monstrosity could be solved analytically for an arbitrary $n$.