Thousands of tools! Check out Online Tools – I have now added thousands of tools.
I often have to generate identity matrices so I created this simple online utility that does it for me. It lets you generate unit matrices of any size you need. It works in the browser and is powered by alien technology from the future.
Identity Matrix Generator Options
Identity Matrix Generator Examples (click to try!)
1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1
α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α 0 0 0 0 0 0 0 0 0 0 α
①⓪⓪⓪⓪⓪⓪ ⓪①⓪⓪⓪⓪⓪ ⓪⓪①⓪⓪⓪⓪ ⓪⓪⓪①⓪⓪⓪ ⓪⓪⓪⓪①⓪⓪ ⓪⓪⓪⓪⓪①⓪ ⓪⓪⓪⓪⓪⓪①
111 0 0 0 0 0 0 111 0 0 0 0 0 0 111 0 0 0 0 0 0 111 0 0 0 0 0 0 111 0 0 0 0 0 0 111
1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
How Does This Identity Matrix Generator Work?
This unit matrix generator works entirely in your browser and is written in JavaScript. As the identity matrix is a sparse matrix with unit elements only on the diagonal, then it uses two nested loops, indexed by i
and j
to print it. If i
is equal to j
, then it prints the unit element, otherwise, it prints the zero element. The loop runs until i
and j
reach size
(matrix dimension; specified in options). The unit element is 1
by default and the zero element is 0
by default but you can customize them to any other symbols. For example, you can use +
and -
, 𝟘
and 𝟙
, or ⓪
and ①
. Additionally, there are two separators that you can change. The first is the element separator. It's the symbol that gets put between elements on every row. The second is the row separator that gets put after one row of elements get printed. If the unit element is more than 1 character in length, then you can also prettify columns so that they look neat.
Created by Browserling
This identity matrix generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.