This test matrix is from the following constant-coefficient convection diffusion equation which is widely used for testing and analyzing numerical methods for the solution of linear system of equations,

where p_{1}, p_{2} and p_{3} are positive constants. Discretization by the finite difference scheme with a 5-point stencil on a uniform m × m grid gives rise to a sparse linear system of equations

where A is of order m^{2} and u and b are now vectors of size m^{2}. Centered differences are used for the first derivatives. If the grid points are numbered using the row-wise natural ordering, then A is a block tridiagonal matrix of the form

,

with

,

where .

The spectral decomposition of the convection diffusion matrix is known. For , if is a diagonal matrix with ((i-1)m+j)th diagonal entry

,

then is symmetric. For , let (k,l) denote (k-1)m-l. Then the (k,l)th unnormalized eigenvector of has (i,j)th entry

.

The reader may now verify that the (k,l)th eigenvalue of A is

.

Figure 1 shows the eigenvalue distribution of 961 by 961 convection diffusion matrix with p_{1} = 25, p_{2} = 50 and p_{3} = 250.

Since the normalized eigenvectors of a symmetric matrix are orthogonal, the eigenvectors of A are graded like the diagonal of and the condition number of the eigenvalue problem for A is

Fortran calling sequence.

Parameters:

N

order of the matrix (must be the square of an integer)