In my application, I have two general real matrices $A$,$B$ defined as follows, $$ A=\begin{bmatrix} -s I_3 & A_0 & 0 & 0 \\ A_0^T & -s I_3 & 0 & 0 \\ 0 & A_1 & -s I_3 & A_0 \\ A_1^T & 0 & A_0^T & -s I_3 \end{bmatrix}, B=\begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ I_3 & 0 & 0 & 0 \\ 0 & I_3& 0 & 0 \end{bmatrix}, $$ where $A_0,A_1 \in R^{3\times3}$ are general matrices, $s$ is a real scalar, and $I_3 \in R^{3\times3}$ is the identity matrix. I would like to solve the eigenvalue problem $AX= B X D$ numerically, where $X$ is the eigenvector matrix and $D$ is the eigenvalue matrix. I only want the right (not left) eigenvalues and eigenvectors. Consider the following as a concrete example, where $$ A_0=\begin{bmatrix} 1 & & \\ & 2 & \\ & & 3 \end{bmatrix}, A_1=\begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 0\\ 0 & 0 & 0 \end{bmatrix}, s=1, $$ From my application, I know there exists at least one eigenvalue $d_1$ and one eigenvector $x_1$, which are $$ x_1=\left(0.625543,0,0,0.625543, 0, 0, 0, -0.417029, 0, 0, -0.208514, 0\right), d_1=0, $$ because $ A x_1 -d_1 B x_1 = \textbf{0},\left\|x_1\right\|=1$. However, no matter which software I used, I couldn't get the correct eigenvalues, even for $d_1$. The software I have tried are Matlab, Eigen(c++ library) and LAPACK.
- The eigenvalues from Matlab are infinity.
- The right eigenvalues from Eigen and LAPACK are represented by $d_i=\alpha_i / \beta_i$, where $\alpha_i$ is a complex number and $\beta_i$ is a real number. The output $\beta_i$ is zero for all eigenvalues. In other words, all right eigenvalues are infinity.
I'm not sure which part is wrong. Is it that the software cannot compute a correct eigenvalue or that $d_1$ cannot be considered as an eigenvalue?
Crosspost my own question: A misunderstanding or a bug in LAPACK's solver for generalized eigenvalue problems?, as it may be a better fit here.