# Matrices with Three Nonzero Diagonals

How would you compute eigenvectors of matrices of the form

$$\nonumber M = \left( \begin{array}{cccccccccc} a_1 & 0 & b_1&&&&&&&\\ 0 & a_2 & 0& b_2&&&&&&& \\ c_1 &0 & a_3 & 0&b_3&&&&&& \\ &c_2&0& a_4& 0&&&&&& \\ &&c_3&0& &&&&&& \\ &&&&&\ddots\\ \\ &&&&&& a_{n-3} & 0 & b_{n-3}& \\ &&&&& &0 & a_{n-2} & 0 & b_{n-2}\\ &&&&&&c_{n-3}& 0& a_{n-1}& 0\\ &&&&&&&c_{n-2}& 0 &a_n \\ \end{array} \right)$$

where all the omitted entries are null?

The particular matrix I'm dealing with has the additional property of being stochastic, so the principal eigenvalue is one.

• If you're interested in the principal eigenvector, you're really just looking to compute $\ker(M - I)$. Is the matrix row-stochastic or column-stochastic? – Omnomnomnom Dec 24 '16 at 20:55

I address the case in which $n$ is even. If we conjugate with a permutation matrix corresponding to the permutation $$\pmatrix{1&2&3&\cdots& n/2 & n/2 +1 & n/2+2& \cdots & n \\ 1&3&5&\cdots &n-1&2&4&\cdots&n}$$ Then we end up with the similar matrix $$\pmatrix{ a_1&b_1\\ c_1&a_3&b_3\\ &c_3&\ddots\\ &&&&b_{n-3}\\ &&&c_{n-3}&a_{n-1}&\\ &&&&& a_2&b_2\\ &&&&&c_2&a_4&b_4\\ &&&&&&c_4 & \ddots }$$ which is to say that we have the direct sum of two tridiagonal matrices. In the odd case, we end up with a similar sum but the sizes of the blocks are not the same.
Note also that since this a reducible stochastic matrix (and in particular, the direct sum of two irreducible matrices) we'll end up with 2 linearly independent eigenvectors associated with $\lambda = 1$.