Accuracy, experiment 1

In the first experiment we compared the computed eigenvalues with known eigenvalues of the problem. We solved the definite symmetric generalized eigenvalue problem with two tridiagonal Toeplitz matrices. The first matrix $ T$ is constructed with a random diagonal and a random (using RAND of MATLAB) subdiagonal(equal to the superdiagonal) element. The second matrix $ S$ has a random subdiagonal (equal to the superdiagonal) element, whereas the diagonal element is chosen to be twice the subdiagonal element plus 1. In this way we known that the matrix $ S$ is positive definite and moreover is well-conditioned.

As both Toeplitz matrices commute we can explicitly compute the spectrum of the generalized eigenvalue problem as it equals the ratios of the (ordered) eigenvalues of $ T$ and $ S$. In the experiment the eigenvalues of $ T$ and $ S$ respectively were computed using the EIG of MATLAB. Based on these 'correct' eigenvalues of the generalized eigenvalue problem, we performed experiments for sizes ranging from $ 100$ to $ 1500$, and for each experiment we performed five random tests (with the constraints on $ S$ as mentioned above). The relative accuracy measure which we took into consideration is the following one:

$\displaystyle \frac{\max_i \vert \lambda_i - \tilde{\lambda_i} \vert}{ \left(\max_i \lambda_i\right)},$    

where $ \lambda_i$ denote the eigenvalues and $ \tilde{\lambda}$ the computed eigenvalues.

It is clear in Figure 3 that the presented approach is very accurate and computes in average all eigenvalues up to machine precision.

Figure 2: Accuracy of the eigenvalues
\includegraphics[scale=0.6]{acc1}

Raphael Vandebril 2007-07-17