Google Sheets
MUNIT function in Google Sheets
Returns a unit matrix of size dimension x 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 Excel
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 Google Sheets gets this done.
- ABSReturns the absolute value of a number.MathExcel
- ACOSReturns the inverse cosine of a value, in radians.MathExcel
- ACOSHReturns the inverse hyperbolic cosine of a number.MathExcel
- ACOTReturns the inverse cotangent of a value, in radians. .MathExcel
- ACOTHReturns the inverse hyperbolic cotangent of a value, in radians. Must not be between -1 and 1, inclusive..MathExcel
- ASINReturns the inverse sine of a value, in radians.MathExcel