ExcelExcel 2013+
MUNIT function in Excel
Returns the unit matrix or the specified dimension
=MUNIT(dimension)MUNIT syntax and parameters
One argument, one required.
- dimensionnumberRequired
MUNIT examples
Formulas you'll actually reuse.
A 3×3 identity matrix — ones on the diagonal, zeros elsewhere:
=MUNIT(3)Multiplying by the identity returns the matrix unchanged — a sanity check:
=MMULT(B2:D4, MUNIT(3))
MUNIT in Google Sheets
Same name — your formula ports as-is.
Try MUNIT in the playground
Edit the example — nothing to install.
Preloaded with the MUNIT formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets
- ACOSHReturns the inverse hyperbolic cosine of a numberMathGoogle Sheets
- ACOTReturns the arccotangent of a numberMathGoogle Sheets
- ACOTHReturns the hyperbolic arccotangent of a numberMathGoogle Sheets
- AGGREGATEReturns an aggregate in a list or databaseMathNo Google Sheets equivalent