Imaginary Unit in LaTeX (i)
- 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.
\documentclass{article}
\begin{document}
Imaginary Unit: $i$
\[ i^2 = -1, \quad (1 + i)^2 = 2i \]
\end{document}Related symbols
- Imaginary Unit (Engineering)
j - Complex Numbers
\mathbb{C} - Complex Number
z = a + bi - Real Part
\Re(z) - Imaginary Part
\Im(z) - Complex Conjugate
\bar{z}
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.