Identity Matrix in LaTeX (I_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.
\documentclass{article}
\begin{document}
Identity Matrix: $I_n$
\[ \det(A - \lambda I_n) = 0 \]
\end{document}Related symbols
- Zero Matrix
\mathbf{0} - Kronecker Delta
\delta_{ij} - Lambda
\lambda - Multiplication
\times - Matrix
\begin{bmatrix} a & b \\ c & d \end{bmatrix} - Dot Product
\cdot
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.
Beste AI LaTeX Editor, Overleaf Alternatief
Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI
- Genereer mooie TikZ-diagrammen met AI
- Upload afbeelding en converteer naadloos naar LaTeX
- Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen