MUNIT Function

Returns an identity matrix of the size you choose.

Category

Math & Trig

Available in

Excel 2013+, Microsoft 365

Returns

An array that spills

Want to practice MUNIT in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

MUNIT(n) returns an n×n grid with 1s on the diagonal and 0s elsewhere — the identity matrix.

Multiplying any matrix by it leaves the matrix unchanged, which makes it a handy check on MINVERSE results.

Syntax

=MUNIT(dimension) Explain

Arguments

ArgumentRequired?What it does
dimensionYesThe number of rows and columns.

Examples

Example 1 — A 3×3 identity matrix

Spill an identity matrix.

A1fx=MUNIT(3)
ABC
1100
2010
3001
=MUNIT(3) Explain

Common mistakes

  • Zero or negative sizes. Return #VALUE!.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.