Identity Matrix in LaTeX (I_n)

InI_n
LaTeX command
I_n
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

The n by n identity matrix, with ones on the diagonal and zeros elsewhere.

The subscript records the size, so for an m by n matrix A both AI_n = A and I_m A = A hold, with different identities on each side. When the dimension is obvious, plain I is enough; some authors prefer bold \mathbf{I} or write E, especially in older European texts. For multi-character sizes, add braces: I_{n+1} or I_{10}, because I_10 would lower only the 1. The characteristic polynomial \det(A - \lambda I_n) is the standard place it appears, and \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} spells out I_2 explicitly.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

det⁡(A−λIn)=0\det(A - \lambda I_n) = 0
\documentclass{article}
\begin{document}
Identity Matrix: $I_n$

\[ \det(A - \lambda I_n) = 0 \]
\end{document}

Related symbols

All Algebra Linear →

Frequently asked questions

How do I write Identity Matrix in LaTeX?
Type I_n in math mode, for example $\det(A - \lambda I_n) = 0$. It works in plain LaTeX without loading any package.
Which package do I need for I_n?
None. I_n is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use I_n in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $I_n$ in running text.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan