Excel functions / Math
MUNIT function
The unit matrix of a given size: 1 down the diagonal and 0 everywhere else.
Syntax
=MUNIT(dimension)
Arguments
dimension: The number of rows, which is also the number of columns.
When to use it
MUNIT gives the unit (identity) matrix of a size: 1 down the diagonal, 0 elsewhere. Multiplying any matrix by it leaves the matrix unchanged.
Examples
A 3 × 3 identity
A B C D E 1 Size 2 3 1 0 0 3 0 1 0 4 0 0 1 In C2:
=MUNIT(A2)→ 1, 0, 0; 0, 1, 0; 0, 0, 1
Common mistakes
- Size 0. The size must be 1 or more.
MUNIT in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: MUNIT
- Danish: MENHED
- Dutch: EENHEIDMAT
- Finnish: YKSIKKÖM
- French: MATRICE.UNITAIRE
- German: MEINHEIT
- Hungarian: MMÁTRIX
- Italian: MATR.UNIT
- Norwegian: MENHET
- Polish: MACIERZ.JEDNOSTKOWA
- Portuguese (Brazil): MUNIT
- Portuguese (Portugal): UNIDM
- Russian: МЕДИН
- Spanish: M.UNIDAD
- Swedish: MENHET
- Turkish: BİRİMMATRİS