This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Construction  /
IdentityMatrix

  • IdentityMatrix[ n ] gives the identity matrix.
  • See the Mathematica book: Section 1.8.3Section 3.7.1.
  • See also: DiagonalMatrix, Table.
  • Related package: LinearAlgebra`MatrixManipulation`.

    Further Examples

    Here are two ways to show the x identity matrix.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]//MatrixForm=