onlinenumbertools logo

Random matrix generator

World's simplest number tool

Quickly generate random numeric matrices in your browser. To get your matrix, just specify the dimensions, number bounds and matrix type you need in the options below, and this utility will generate that matrix. Created by developers from team Browserling.
sneak preview sssshhhhh!
We just started working on a new site – Online Unicode Tools – utilities for working with Unicode. Check it out!
Types of Matrices
Elements fill the entire matrix.
Elements outside the diagonal are zeros.
Elements below the diagonal are zeros.
Elements above the diagonal are zeros.
Elements on both sides of the main diagonal are equal.
Size and Range
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Digits in fractional part.
Separators and Prettifying
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random matrix generator tool What is a random matrix generator?
This is an online browser-based utility for generating matrices with random numbers as their elements. You can generate random matrices of any size, shape, and form. All you need to do is enter the number of rows and columns in the options above as well as set the lowest and highest possible numeric values for random elements. You can also choose elements to be either integer or decimal numbers with the given precision. There are several templates for generating special types of matrices – 1) you can fill the matrix with random numbers only diagonally and generate a random diagonal matrix, 2) you can fill the matrix with random numbers above the diagonal and generate a random right-triangular matrix, 3) you can fill the matrix with random numbers below the diagonal and generate a left-triangular triangular matrix, 4) you can fill the matrix symmetrically and generate a random symmetric matrix, and 5) you can fill all matrix elements completely randomly. You can also customize matrix row and column separator symbols and if they're a space and a newline, then you can use beautify matrix function that aligns all matrix numbers into neat columns. That's numberwang!
Random matrix generator examples Click to use
Random Six-by-six Matrix
In this example, we generate a matrix with whole random numbers as its elements and dimension 6x6. All elements belong to the range from -100 to 100 and fill the entire matrix. The matrix is also prettified so all numbers are aligned below each other.
27 78 61 89 -66 68 -66 18 -73 67 -97 29 65 72 76 -15 32 38 -3 -94 100 -23 -21 -21 17 -40 -71 27 29 -5 93 -13 48 -15 8 80
Required options
These options will be used automatically if you select this example.
Elements fill the entire matrix.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random Diagonal Matrix
This example fills a matrix with random numbers only on the diagonal. All other elements are zeros. This is done by selecting the diagonal matrix type in the options. The range of random values is 0-9, which means diagonal elements can be only 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
9 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0
Required options
These options will be used automatically if you select this example.
Elements outside the diagonal are zeros.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random Right Triangular Matrix
This example generates a random upper triangular matrix (also known as right triangular matrix). This matrix has numbers only in the area above the main diagonal. We generate a matrix of fractions from the range [-5, 5], with three digits in the fractional part. As this matrix is rectangular (6x4), there are two zero rows under the main diagonal.
3.292 -1.541 1.776 -0.769 0 1.656 -4.467 0.979 0 0 4.721 -4.582 0 0 0 4.122 0 0 0 0 0 0 0 0
Required options
These options will be used automatically if you select this example.
Elements below the diagonal are zeros.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Digits in fractional part.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random Left Triangular Matrix
In this example, we generate a lower triangular matrix (also known as left triangular matrix) of size 6 by 6. In this case, all numbers above the main diagonal are zero. We don't use the prettify matrix option here but instead, we split all rows of the matrix by a comma.
8, 0, 0, 0, 0, 0 46, 41, 0, 0, 0, 0 25, 19, 15, 0, 0, 0 14, 45, 11, 10, 0, 0 6, 35, 39, 46, 36, 0 48, 37, 2, 30, 49, 18
Required options
These options will be used automatically if you select this example.
Elements above the diagonal are zeros.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random Negative Symmetric Matrix
This example creates a symmetric matrix, with random negative integers (from -10 to -1). A symmetric matrix has a property that element a_ij is equal to a_ji. Note that only a square matrix can be symmetrical, so we set the same number of rows and columns (equal to 4).
-1 -4 -3 -4 -4 -5 -2 -8 -3 -2 -7 -9 -4 -8 -9 -5
Required options
These options will be used automatically if you select this example.
Elements on both sides of the main diagonal are equal.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Random Vector
This example generates a matrix that is actually just a random vector. The randomness range is very tight here with the minimum value equal to 0.1 and the maximal value equal to 0.2. We set the numeric precision equal to 5 digits and generate a column matrix with eight elements.
0.12439 0.15987 0.10011 0.12835 0.13184 0.11571 0.18000 0.11669
Required options
These options will be used automatically if you select this example.
Elements fill the entire matrix.
Number of rows.
Number of columns.
Smallest random number.
Biggest random number.
Digits in fractional part.
Place this symbol between matrix columns.
Place this symbol between matrix rows.
Align all matrix elements in elegant columns.
Pro tips Master online number tools
You can pass options to this tool using their codes as query arguments and it will automatically compute output. To get the code of an option, just hover over its icon. Here's how to type it in your browser's address bar. Click to try!
https://onlinenumbertools.com/random-number-matrix?&rows=6&columns=6&element-separator=%20&row-separator=%5Cn&range-start=-100&range-end=100&whole-nums=true®ular-matrix=true&prettify-matrix=true
All number tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly create a list of numbers in arithmetic series.
Quickly create a list of numbers in geometric series.
Quickly calculate the coefficients of the binomial expansion.
Quickly create a downloadable image from numbers.
Quickly create a list of random numbers.
Quickly create a list of random primes from a specific interval.
Quickly create a matrix with random numbers as its elements.
Quickly create a random row or column vector.
Quickly exchange rows and columns of a matrix.
Quickly find the inverse matrix of any square matrix.
Quickly find the determinant of any square matrix.
Quickly calculate any number of digits of number π.
Quickly generate the specified number of Euler constant's digits.
Quickly generate any number of golden ratio digits.
Quickly generate numbers of say what you see sequence.
Quickly calculate numbers of Fibonacci sequence.
Quickly calculate numbers of Lucas series.
Quickly generate Fibonacci-like series with custom start values.
Quickly calculate members of a linear recurrence series.
Quickly create a sequence of prime numbers.
Quickly check if the given number is a prime.
Quickly compute all prime factors of a number.
Quickly compute all divisors of a number.
Quickly calculate the GCD of two or more numbers.
Quickly calculate the LCM of two or more numbers.
Quickly create a list of increasing or decreasing integers.
Quickly create a sequence of even numbers.
Quickly create a sequence of odd numbers.
Quickly create a list of squares.
Quickly create a list of cubes.
Quickly generate a series of numbers in the form 2^n.
Quickly generate a series of numbers in the form 10^n.
Quickly choose one or more numbers from a list of numbers.
Quickly round one or more numbers to the given accuracy.
Quickly sort numbers in ascending or descending order.
Quickly sort number's digits in ascending or descending order.
Quickly randomize the order of digits in a number.
Quickly filter numbers according to certain criteria.
Quickly add up all the numbers in the given list and find their sum.
Quickly multiply all the given numbers together and find their product.
Quickly add up all the digits of the given numbers.
Quickly multiply all the digits of the given numbers.
Quickly create a diagonal matrix with ones on the main diagonal.
Quickly convert a number to the form 2^x.
Quickly express a number in the form 10^x.
Quickly add digits to a number so that it becomes a palindrome.
Quickly test if the given numbers are palindromes.
Coming soon These number tools are on the way
Generate Numberwang Numbers
Create a list of numberwang numbers.
Rewrite Numbers
Given numbers and a grammar, recursively rewrite them.
Create a Floating Point Number
Create a number from the mantissa, base and exponent.
Convert a Number to the Scientific Notation
Convert a number to the a*10^b form.
Convert Scientific Notation to a Number
Convert a number in scientific notation to a regular number.
Generate Random Binary Numbers
Create a list of random binary numbers.
Generate Random Octal Numbers
Create a list of random octal numbers.
Generate Random Decimal Numbers
Create a list of random decimal numbers.
Generate Random Hex Numbers
Create a list of random hexadecimal numbers.
Calculate a Running Sum
Calculate a cumulative sum of a list of numbers.
Calculate a Running Product
Calculate a cumulative product of a list of numbers.
Find the Maximal Number
Find the largest number in a number sequence.
Find the Minimal Number
Find the smallest number in a number sequence.
Calculate the Factorial
Find the factorial of a number.
Generate Number Bigrams
Create a list of digit bigrams from a number.
Generate Number Trigrams
Create a list of digit trigrams from a number.
Generate Number N-grams
Create a list of digit ngrams from a number.
Analyze a Number
Report how many digits appear how many times.
Convert a Number to an Ordinal
Convert a cardinal number to an ordinal number.
Convert an Ordinal to a Number
Convert an ordinal number to a cardinal number.
Convert a Number to Words
Express a number in English words.
Convert Words to a Number
Rewrite English words to numbers.
Convert a Number to Roman Number
Convert Arabic numerals to Roman numerals.
Convert a Roman Number to Regular Number
Convert Roman Numerals to Arabic numerals.
Generate Negafibonacci Numbers
Calculate a series of extended Fibonacci numbers.
Generate Fibonacci Primes
Find numbers that are both Fibonacci numbers and primes.
Fibonacci Number Test
Check if a number is a Fibonacci number.
Fibonacci Prime Test
Check if a number is both a Fibonacci number and a prime.
Construct Fibonacci Words
Create a sequence of Fibonacci words.
Construct Tribonacci Words
Create a sequence of Tribonacci words.
Generate Negalucas Numbers
Calculate a series of extended Lucas numbers.
Generate Lucas Primes
Calculate a series of extended Lucas numbers.
Lucas Prime Test
Check if a number is both a Lucas number and a prime.
Calculate the Trace of a Matrix
Find the sum of main diagonal elements of a matrix.
Calculate the Eigenvalues of a Matrix
Find the eigenvalues of a matrix.
Multiply Matrices
Compute the product of two matrices.
Add Matrices
Compute the sum of two matrices.
Subtract Matrices
Compute the difference of two matrices.
Generate Moser de Bruijn Numbers
Calculate a sequence of Moser-Bruijn numbers.
Generate Kolakoski Numbers
Calculate a sequence of Oldenburger-Kolakoski numbers.
Generate Stanley Numbers
Calculate a sequence of Stanley numbers.
Generate Gijswijt Numbers
Calculate a sequence of self-describing Gijswijt numbers.
Generate Rudin-Shapiro Numbers
Calculate a sequence of Rusin-Shapiro numbers.
Generate Baum-Sweet Numbers
Calculate a sequence of Baum-Sweet numbers.
Generate Thue-Morse Sequence
Calculate members of Thue-Morse number series.
Generate Perfect Numbers
Create a list of perfect numbers.
Generate Almost Perfect Numbers
Create a list of almost perfect numbers.
Generate Excessive Number Sequence
Calculate a sequence of abundant numbers.
Generate Deficient Number Sequence
Calculate a sequence of deficient numbers.
Calculate Dragon Curve Numbers
Generate a list of paperfolding sequence numbers.
Generate Composite Numbers
Create a list of numbers that are not prime.
Test if a Number is Perfect
Check if the given number is a perfect number.
Test if a Number is Abundant
Check if the given number is an abundant number.
Test if a Number is Deficient
Check if the given number is a deficient number.
Calculate the Modulo
Find the modulus of a number.
Group Number Digits
Group together digits of a number.
Split a Number into Digits
Create a list of digits from a number.
Printf Numbers
Apply sprintf or printf function to numbers.
Create Zalgo Numbers
Let Zalgo destroy your numbers.
Mirror a Number
Create a mirror copy of a number.
Zero-pad a Number
Add zeros to a number.
Reverse a Number
Reverse the order of digits of a number.
Rotate a Number
Cyclically rotate digits of a number to the left or right.
Increase All Digits in a Number
Add one to every digit in a number.
Decrease All Digits in a Number
Subtract one from every digit in a number.
Calculate Percentages
Find x% of a number.
Generate Natural Numbers
Create a list of natural numbers.
Generate Rational Numbers
Create a list of rational numbers.
Generate Real Numbers
Create a sequence of real numbers.
Generate Complex Numbers
Create a list of complex numbers.
Generate Binary Numbers
Create a sequence of binary numbers.
Generate Pairs of Numbers
Create a sequence of number pairs.
Convert a Fraction to a Decimal
Convert a fraction to a decimal number.
Convert a Decimal to a Fraction
Convert a decimal number to a fraction.
Convert a Binary Number to Octal Number
Convert a base two number to base eight number.
Convert a Binary Number to Decimal Number
Convert a base two number to base ten number.
Convert a Binary Number to Hex Number
Convert a base two number to base sixteen number.
Convert a Octal Number to Binary Number
Convert a base eight number to base two number.
Convert a Octal Number to Decimal Number
Convert a base eight number to base ten number.
Convert a Octal Number to Hex Number
Convert a base eight number to base sixteen number.
Convert a Decimal Number to Binary Number
Convert a base ten number to base two number.
Convert a Decimal Number to Octal Number
Convert a base ten number to base eight number.
Convert a Decimal Number to Hex Number
Convert a base ten number to base sixteen number.
Convert a Hex Number to Binary Number
Convert a base sixteen number to base two number.
Convert a Hex Number to Octal Number
Convert a base sixteen number to base eight number.
Convert a Hex Number to Decimal Number
Convert a base sixteen number to base ten number.
Convert Any Number to Any Base
Convert any number in any base to any other base.
Change Number's Mantissa
Change the significand of a number.
Change Number's Base
Change the base of a number.
Change Number's Exponent
Change the power of a number.
Numberwang Number Test
Test if the given number is numberwang.