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: ゲーム理論

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 複素数 →

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 poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得