Random Matrix Generator
Create reproducible numeric matrices for testing, examples, and algorithms.
Also known as: random matrix · 2d array
seeded
Output
About this tool, tips & examples
What it does
The Random Matrix Generator produces rectangular numeric matrices — up to 500×500 — with values drawn from your min/max range at a chosen decimal precision. Seeded output means the same matrix regenerates identically anywhere, and exports as CSV, JSON, or plain text ready for spreadsheets, NumPy, or test fixtures.
Common use cases
- Algorithm testing — input matrices for sorting, searching, and linear-algebra routines at controlled sizes.
- ML and data-science fixtures — feature matrices for smoke-testing pipelines before real data arrives.
- Math exercises — worksheet matrices for determinants, products, and row reduction at the right difficulty.
- Performance testing — step up 10×10 → 100×100 → 500×500 and watch where your code’s complexity bites.
Settings
- Rows / Columns — 1 to 500 each; a 500×500 matrix is 250,000 values.
- Minimum / Maximum — the value range entries are drawn from.
- Decimal places — 0 to 10; zero gives integer matrices.
- Seed — identical seed + settings = identical matrix, so linear-algebra tests can assert exact expected outputs.
Privacy note
Matrices are computed locally in your browser and never uploaded. The values are uniform random draws — synthetic numbers with no meaning beyond your test.
FAQ
How do I load this into NumPy or a spreadsheet?
Export CSV — np.loadtxt(..., delimiter=',') reads it directly, and
every spreadsheet opens it. JSON export gives nested arrays for
JavaScript.
Can I get an integer matrix? Set decimal places to 0. Min 0 / max 1 with 0 decimals also makes a random binary matrix — handy for adjacency and mask fixtures.
I need more than two dimensions. The N-Dimensional Array generator produces nested tensors of any practical shape; Numeric Series covers the 1-D case.