Wauvel

Excel like a finance pro.

← The library

Math function

MUNIT

Returns the identity matrix of a given size.

Rarely usedDifficulty 1400 · AdvancedUsage rank #354 of 520
Practice · 2 questions →

When to use it

The identity matrix of a given size: ones on the diagonal, zeros elsewhere.

The shape of it

Syntax
=MUNIT(dimension)

Worked examples

  • Size two

    =MUNIT(2) {1,0;0,1}

    Spills into 2 by 2.

  • Size three

    =MUNIT(3) {1,0,0;0,1,0;0,0,1}

    Size three.

  • Sanity check

    =MMULT(A1:B2,MUNIT(2)) A1:B2 unchanged

    Multiplying by the identity does nothing.

Worth knowing

  • Handy for building I - A in Leontief and Markov calculations.
  • Dimension must be a positive integer.
  • Combine with MINVERSE to verify inverses.

Where it goes wrong

  • #VALUE! for a dimension of 0 or less.
  • Spills; clear the space first.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.