Imaginary Unit in LaTeX (i)

ii
LaTeX command
i
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

The imaginary unit, a number whose square is −1; the basis of complex arithmetic.

Mathematicians and physicists write i for the square root of -1, giving z = a + bi and the Schrodinger equation's i\hbar. In math mode plain i is italic, the same as an index variable, so in papers that also sum over i it is safer to use upright \mathrm{i}, which is what the ISO typesetting standard recommends; a macro such as \newcommand{\iu}{\mathrm{i}} keeps this consistent. Do not use \imath for the imaginary unit: it is a dotless i meant for placing accents like \hat{\imath} for unit vectors. Game theorists also use i for a player index.

Also listed under: Game Theory

Minimal compilable example

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

i2=−1,(1+i)2=2ii^2 = -1, \quad (1 + i)^2 = 2i
\documentclass{article}
\begin{document}
Imaginary Unit: $i$

\[ i^2 = -1, \quad (1 + i)^2 = 2i \]
\end{document}

Related symbols

All Complex Numbers →

Frequently asked questions

How do I write Imaginary Unit in LaTeX?
Type i in math mode, for example $i^2 = -1, \quad (1 + i)^2 = 2i$. It works in plain LaTeX without loading any package.
Which package do I need for i?
None. i is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use i in text mode, or only in math mode?
Both. i compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers