How should imaginary numbers be typeset?

I'd always use a math italic i. But conventions vary Many engineering disciplines use j rather than i. Unicode has a specific slot U+2148 (ⅈ) which is a double struck italic i. This is the ⅈ (ⅈ) entity in MathML and HTML5. (The convention started with Mathematica, I can't say I like it much, but it's there if you want an unambiguous notation.)


The possible visual clash of the dot with the exponent can be cured by adding a small kern:

\newcommand{\iu}{{i\mkern1mu}}

Experiment also with smaller kerns and note that the setting depends on the font used, so it can't be a universal recipe. Here's an example: left the kerned version, right the unkerned one.

enter image description here

Some people maintain that mathematicians should conform to ISO standards (see Timtro's answer), but my opinion is that ISO standards should conform to centuries long tradition of mathematical typesetting in the first place. We can look at an article by Sophie Kowalewski published by the Acta Matemathica, one of the journals that set the highest standards for math typesetting. On the first page we see

enter image description here

and on page 89

enter image description here

There is no doubt whatsoever for the meaning of “i” and “d”.

Maybe this is considered too old fashioned. Here is an example from a big publisher, with considerably high standards. It's an excerpt from a paper in “Differential Geometry and its Applications”, volume 26(5) 2008, pages 553–565 (top of page 563). Access is restricted, so I provide a cropped image showing just the important graphic part and no complete text.

enter image description here


According to ISO 80000-2:2009, Quantities and units---part2: Mathematical signs and symbols to be used in the natural sciences and technology, the upright i is the correct choice. Quantities which are not variable across time or context (such as immutable constants of nature) are upright while variables, contextual constants, running numbers (dummies), are italic. This is common practice for functions too, and is mostly why we use $\sin(x)$ and not $sin(x)$. (We also wouldn't write $sin(x)$ because the interpreter has no way of knowing the letters sin are not three consecutive variables.)

I sometimes define \newcommand{\iu}{\mathrm{i}\mkern1mu} for my documents. However, it look good without the kern too with LuaLaTeX and unicode-math. In fact, I sometimes find it a bit odd with the kern because there seems to be an imbalance before and after the exponent, which you can see from your 'busy' example.

An example comparing upright i with and without a kern

produced from

%!TEX program = lualatex
%
\documentclass{article}
\usepackage{amsmath}
\pagestyle{empty}
\usepackage[margin=2.25in]{geometry}
\setlength{\parindent}{0pt}
%%
\usepackage[math-style=ISO, partial=upright]{unicode-math}
\usepackage{lualatex-math}

\begin{document}

\newcommand{\iu}{\mathrm{i}\mkern1mu}
   \verb=\mathrm= style, conforming with ISO 80000-2:2009 :
        \begin{align*}
        \iu^0 &= 1     \\
        \iu^1 &= \iu   \\
        \iu^2 &= -1    \\
        \iu^3 &= -\iu
        \end{align*}

\newcommand{\di}{\mathrm{i}}
    Also conforming, but without the manual kern:
        \begin{align*}
        \di^0 &= 1     \\
        \di^1 &= \di   \\
        \di^2 &= -1    \\
        \di^3 &= -\di
        \end{align*}
    Whichever choice, the following looks busy, largely because it is quite busy :)
    \begin{align*}
        \iu^n &= \iu^{4\times k + r} = \iu^{4\times k} \times \iu^4 = (\iu^4)^k \times \iu^r = 1^k \iu^r = \iu^r \\
        \di^n &= \di^{4\times k + r} = \di^{4\times k} \times \di^4 = (\di^4)^k \times \di^r = 1^k \di^r = \di^r
    \end{align*}
    And with the \verb=\times= to \verb=\cdot=:
   \begin{align*}
        \iu^n &= \iu^{4\cdot k + r} = \iu^{4\cdot k} \cdot \iu^4 = (\iu^4)^k \cdot \iu^r = 1^k \iu^r = \iu^r\\
        \di^n &= \di^{4\cdot k + r} = \di^{4\cdot k} \cdot \di^4 = (\di^4)^k \cdot \di^r = 1^k \di^r = \di^r
   \end{align*}

\end{document}