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 الجبر الخطي →

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث