Skip to content
Novus Examples
mtx228 B

Matrix Market — Symmetric Pattern, Lower Triangle Only (.mtx)

A symmetric pattern matrix carrying only positions and only the lower triangle, so nine stored lines describe sixteen non-zeros. Both halves of that — no value column and an implied mirror — are places a reader can silently disagree with the file.

Preview — first 14 linesmtx
%%MatrixMarket matrix coordinate pattern symmetric
% Pattern: no values at all, only the positions of the non-zeros.
% Symmetric: ONLY the lower triangle is stored; (i,j) implies (j,i).
6 6 9
1 1
2 1
3 2
4 1
4 3
5 4
6 2
6 5
6 6

Specifications

Field
pattern
Symmetry
symmetric
Rows
6
Columns
6
Stored Entries
9
Implied Entries
16
Diagonal Entries
2
Values Present
false
Rule
each off-diagonal stored entry implies its mirror

Testing contract

Expected to pass
Scenario
Expand the stored lower triangle into a full symmetric matrix and count the resulting non-zeros.
Expected result
Nine stored entries expand to sixteen non-zeros because the seven off-diagonal entries are mirrored and the two diagonal ones are not, and each line carries two indices and no value.

What is a .mtx file?

Matrix Market (.mtx) is a plain-text exchange format for sparse and dense matrices from NIST. A banner line declares the object, format, field, and symmetry — for example `%%MatrixMarket matrix coordinate real general` — comment lines follow, and then a size line gives rows, columns, and the number of stored entries. Coordinate entries list a 1-based row, a 1-based column, and a value, with symmetric matrices storing only the lower triangle.

How to use this file

Use an example .mtx file to test sparse-matrix loaders and numerical pipelines, verifying 1-based to 0-based index conversion, correct expansion of symmetric and pattern matrices, and that the declared entry count matches the data.

How to use this file for testing

“Matrix Market — Symmetric Pattern, Lower Triangle Only (.mtx)” is a deterministic Novus Examples fixture for Scientific data, Editor testing. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.

Documented properties for this file: 6 rows · 6 columns. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.

Generated by generation/scientific.py. Free for any use, no attribution required — license.