**test_matrix**,
a FORTRAN90 code which
defines test matrices for which the condition number, determinant,
eigenvalues, eigenvectors, inverse, null vectors, P*L*U factorization
or linear system solution are known. Examples include the
Fibonacci, Hilbert, Redheffer, Vandermonde, Wathen and Wilkinson
matrices.

A wide range of matrix dimensions, forms and properties are available. These matrices may be useful in testing an algorithm for correctness on a variety of problems.

Some matrices can be rectangular, with the user specifying the number of rows and columns. Almost all the matrices can be made of arbitrary size, with the user specifying the dimension.

Different matrix zero structures are available, including diagonal, bidiagonal, tridiagonal, pentadiagonal, banded, upper and lower triangular, and Hessenberg.

Different matrix symmetry patterns are available, including symmetric, antisymmetric, persymmetric, circulant, Toeplitz, and Hankel.

Some matrices come from a MATLAB M file collection developed by Nicholas Higham, Department of Mathematics, University of Manchester.

An earlier version of the collection is available, again as MATLAB M files, in ACM TOMS Algorithm 694, in the TOMS directory of the NETLIB web site.

Some matrices are available at https://math.nist.gov, the Matrix Market web site.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**test_matrix** is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
an Octave version and
a Python version.

arpack, a FORTRAN90 code which computes eigenvalues for large matrices;

cg, a FORTRAN90 code which implements a simple version of the conjugate gradient (CG) method for solving a system of linear equations of the form A*x=b, suitable for situations in which the matrix A is positive definite (only real, positive eigenvalues) and symmetric.

condition, a FORTRAN90 code which implements methods of computing or estimating the condition number of a matrix.

eispack, a FORTRAN90 code which carries out eigenvalue computations; superseded by LAPACK;

jacobi_eigenvalue, a FORTRAN90 code which implements the Jacobi iteration for the iterative determination of the eigenvalues and eigenvectors of a real symmetric matrix.

levenshtein_matrix, a Fortran90 code which returns the Levenshtein distance matrix defined by two strings.

linpack, a FORTRAN90 code which factors and solves systems of linear equations in a variety of formats and arithmetic types.

test_eigen, a FORTRAN90 code which implements test matrices for eigenvalue analysis.

test_matrix_exponential, a FORTRAN90 code which defines a set of test cases for computing the matrix exponential.

wathen_matrix, a FORTRAN90 code which compares storage schemes (full, banded, sparse triplet) and solution strategies (Linpack full, Linpack banded, conjugate gradient) for linear systems involving the Wathen matrix, which can arise when solving a problem using the finite element method (FEM).

wishart_matrix, a Fortran90 code which produces sample matrices from the Wishart or Bartlett distributions, useful for sampling random covariance matrices.

- test_matrix.f90, the source code;
- test_matrix.sh, compiles the source code;