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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기