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: Teori Permainan

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 Bilangan Kompleks →

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 poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian