MM
The Matrix Market File Format


MM is a data directory which contains files stored in the format used by the Matrix Market for the storage and exchange of matrices.

MM File Characteristics:

A file in the Matrix Market format comprises four parts:

  1. Header line: contains an identifier, and four text fields;
  2. Comment lines: allow a user to store information and comments;
  3. Size line: specifies the number of rows and columns, and the number of nonzero elements;
  4. Data lines: specify the location of the matrix entries (implicitly or explicitly) and their values.

The header line has the form

%%MatrixMarket object format field symmetry
      
The header line must be the first line of the file, and the header line must begin with the string %%MatrixMarket. The four fields that follow that string are

If the field of a matrix is pattern, then only the locations of the nonzeros will be listed. This presumes, obviously, that we are using the coordinate format!

If the symmetry of a matrix is symmetric or hermitian, then only the entries on or below the main diagonal are to be listed. If the symmetry is skew-symmetric, then only the entries strictly below the main diagonal are to be listed.

The comment lines, if any, should follow the header line. The only requirement is that each comment line begin with a percent sign.

If format was specified as array, then the size line has the form:

        m n
      
where

If format was specified as coordinate, then the size line has the form:

        m n nonzeros
      
where

If format was specified as array, there must follow exactly m * n data lines, one for each entry, listed by columns, having the form

        value
      
where

If format was specified as coordinate, there must follow exactly nonzeros data lines, one for each matrix entry that is to be listed, having the form

        i j value
      
where

Licensing:

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

Reference:

  1. http://math.nist.gov/MatrixMarket/
    The Matrix Market Web Site.
  2. Ronald Boisvert, Roldan Pozo, Karin Remington,
    The Matrix Market Exchange Formats: Initial Design,
    Technical Report NISTIR-5935,
    National Institute of Standards and Technology, December 1996.

Sample Files:

You can go up one level to the DATA page.


Last revised on 25 March 2006.