47

I've never had to typeset complex numbers before and I'm finding that I'm uncertain about what best-practices are. My question is really about typesetting just i. (Hence my title referring to imaginary as opposed to complex numbers.)

I would like to be consistent with the textbook which uses a slantstyle. But aside from the choices of the textbook, I'm curious about what others think: Should it be upright? Should it be italic like a variable name?

When I use the default math style, I don't like the appearance, particularly in conjunction with exponents. It looks too crowded and busy to me. Is this just because I'm not used to typesetting for complex numbers? Or, is there some kind of italic correction I could do that would fix things: \/ seems to be ignored in math mode.

Here's my minimal working example:

\documentclass{article}
\usepackage{amsmath}
\pagestyle{empty}
\usepackage[margin=2.25in]{geometry}
\setlength{\parindent}{0pt}
%%
\newcommand{\mi}{\mathrm{i}} %% roman "i"
\newcommand{\di}{i}          %% default math "i"
\begin{document}

    \verb=\mathrm= style: (not consistent with font choice of textbook)
        \begin{align*}
        \mi^0 &= 1     \\
        \mi^1 &= \mi   \\
        \mi^2 &= -1    \\        
        \mi^3 &= -\mi 
        \end{align*}

    Default math style: (better matches the style of the textbook, but already looking crowded.)
        \renewcommand{\di}{i}
        \begin{align*}
        \di^0 &= 1     \\
        \di^1 &= \di   \\
        \di^2 &= -1    \\        
        \di^3 &= -\di 
        \end{align*}
    Whichever choice, the following looks too busy. 
    \begin{align*}
        \mi^n &= \mi^{4\times k + r} = \mi^{4\times k} \times \mi^4 = (\mi^4)^k \times \mi^r = 1^k \mi^r = \mi^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 if I change the \verb=\times= to \verb=\cdot= it looks even worse:
    \[
        \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{document}

I know I could completely drop using \times or \cdot but for my particular audience I want to emphasize the multiplication.

I think it's the dot on the $i$ my eye is visually objecting to (in which case there's not much to do about it, I guess).

enter image description here

19
  • 8
    Somebody prescribes it has to be upright (because it's a constant; I don't agree by any means). You can try \newcommand{\di}{{i\mkern1mu}} to give some room.
    – egreg
    Commented Dec 8, 2012 at 16:48
  • 2
    If you want to quit the dot of the i you can use \imath, to get more freedom.
    – Manuel
    Commented Dec 8, 2012 at 16:50
  • 2
    @A.Ellett The exponent is to the whole subformula {i\mkern1mu}; otherwise i\mkern1mu^2 would have the exponent to an empty subformula.
    – egreg
    Commented Dec 8, 2012 at 17:03
  • 17
    Unrelated suggestion: define \def\I{i} and simply use \I everywhere in your math. You can fix your one macro later, after finishing your manuscript. After many similar problems, I found this helps me maintain productivity. Commented Dec 8, 2012 at 20:33
  • 3
    It should be upright (because it is a constant) and purple (because it is a complex number). The reason it isn't typeset like this in mathematics texts is because very few people know how to make this work automatically and so laziness wins over correctness. Commented Dec 11, 2012 at 8:58

9 Answers 9

24

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

5
  • 1
    Personally I do not see any visual clash.
    – yannisl
    Commented Dec 11, 2012 at 8:00
  • @YiannisLazarides Neither do I, but it's a personal opinion and is as respectable as A.Ellett's. :)
    – egreg
    Commented Dec 11, 2012 at 8:04
  • 2
    I don't think mathematicians should conform to the ISO standard. That would be silly, just as it's silly to suggest scientists and engineers should conform to notation you call 'traditional'. Hell, even within mathematics, there is a diversity of notation. And if you read any papers that are more than 100 years old, you would discover that even mathematical conventions have evolved.
    – Timtro
    Commented Mar 17, 2017 at 19:33
  • 1
    I (math student) really don't understand why the upright version of "i" is not the standard. Any other notation might introduce a certain ambiguity and one always has to explicitly state that the "i" one uses refers to the imaginary unit and is hence not treated as a variable. Same applies to the constant "e".
    – Jacob
    Commented Dec 7, 2021 at 16:39
  • 1
    @Jacob Since it hasn't introduced ambiguities for a few centuries, I don't see why it should now.
    – egreg
    Commented Dec 7, 2021 at 16:48
18

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.)

3
  • see my comment to the original question regarding a reference concerning the differential "d". i wouldn't use the mathematica notation for anything other than mathematica, where it does make a difference. Commented Apr 11, 2016 at 17:31
  • 1
    Can this symbol be implemented in LaTeX? Commented Feb 22, 2017 at 14:40
  • 2
    @H.R. (ⅈ) should be in any unicode math font so any font usable with unicode-math in luatex or xetex, or with pdftex it will be available with the stix package or if you have any other font that has lowercase italic black board bold. Commented Feb 22, 2017 at 14:43
15

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}
9
  • 4
    the point i'm trying to make is that, for pure mathematicians, the iso standard is simply misguided -- i doubt any mathematicians were involved in developing the standard. the overwhelming majority of participants in formal standards bodies are computer folk and engineers. (having participated in ansi and iso working groups for about ten years, i'm familiar with their makeup. it's too expensive for math societies to become full members. mostly computer manufacturers at the time i was active.) Commented Mar 17, 2017 at 19:53
  • 1
    @barbarabeeton While I resent the word misguided, I don't disagree with you. I wouldn't expect pure mathematicians to conform to the ISO standard, and don't think I ever suggested it would even be a good idea if they did. I could say you've won the argument, but I don't think that we had one to begin with. I'm happy for a bit of friendly back-and-forth though. Thanks.
    – Timtro
    Commented Mar 18, 2017 at 4:51
  • 3
    i didn't mean "misguided" in the sense of "completely wrong". i think it's actually a quite reasonable directive for engineers. what i feel was left out is a consideration of the scope, and failure to recognize the accepted practice of a different, well defined, subset of users. it really wouldn't have been too difficult to include a statement to that effect in the introduction to the standard. (thanks to you too for the civil discussion -- at least, i hope i've been civil about it.) Commented Mar 18, 2017 at 12:15
  • 1
    Ha, for me as a physicist - halfway between mathematicians and engineers - it would be interesting to know where the fault line is. I am very familiar with ISO 80000 (I strictly adhere to it when writing books) and find the demands therein very reasonable from a physicist's point of view. But perhaps physicists on the far theoretical side have a different opinion.
    – Pygmalion
    Commented Mar 18, 2023 at 14:33
  • 1
    As I see it, ISO 80000 wants to distinguish physical quantities from the rest by using italics for the former - which is a very important distinction, possibly the most important in physics (having for example units that must be regular font). And because mathematicians do not deal with these quantities, this makes no sense to them.
    – Pygmalion
    Commented Mar 18, 2023 at 14:41
9

If you're looking for conventions then Elsevier, (a huge publisher) has guidelines: "Preparing Articles in LaTeX", which state (page 11 of PDF, 10 of guidelines) when i is used as an imaginary it is conventionally typeset in a Roman typeface. The example they give has the dot on the i, Roman typeface makes the i upright.

5
  • But they have different instructions for different journals. Commented Dec 9, 2012 at 10:21
  • "Elsevier publishes 250,000 articles a year in 2,000 journals" and "In 2003 its publishing accounted for 25% of the world market in science, technology, and medical publishing". That's a huge influence.See here too.
    – DJP
    Commented Dec 9, 2012 at 16:15
  • I am not disputing that. But different subject areas, have different conventions and Elsevier follows that to some extent. E.g. the journal Differential Geometry and its Applications does not force upright i's on authors as that is not the convention in pure mathematics (see e.g. vol 26(5) page 563 near the top). Commented Dec 9, 2012 at 18:00
  • ISO 80000-2:2009, Quantities and units---part2: Mathematical signs and symbols to be used in the natural sciences and technology would agree with Elsevier in this matter.
    – Timtro
    Commented Apr 11, 2016 at 15:15
  • 1
    Here is an image (click here) of the paper Andrew Swann is referring to (cropped to avoid copyright issues).
    – egreg
    Commented Mar 17, 2017 at 13:59
8

Well, based on your comment:

it's the dot on the $i$ my eye is visually objecting to ...

you could use what I have been using which is a dotless i:

enter image description here

Code:

\documentclass{article}
\newcommand*{\I}{\imath}%
\begin{document}
    $\I^2=-1$
\end{document}
2
  • 2
    What does this dotless i represent in math?
    – zyy
    Commented Oct 19, 2018 at 19:41
  • 3
    @zyy: Well, as many answers on Math.SE say "you can use any symbol to represent whatever you want as long as you define it". It is obvious here what I am using it to denote and was based on the OP objecting to the dot in the "i". However, I would recommend using whatever is consistent in the applicable field, or following some standard. Commented Oct 19, 2018 at 19:57
7

Der Brockhaus Naturwissenschaft und Technik Band 2 (2003) (famous german Encyclopedia on Science) uses upright i

Bergmann Scheafer Lehrbuch der Experimantalphysik (2010) (very famous and rich books on physiks) uses upright i (as fa as i remember)

One possible explanation is, that i is not a variable which usually are typeset in italic. According to a DIN (german industry standard) j for imaginary numbers is allowed in electronic engineering.

2
  • 5
    Math papers usually have an italic "i"; however in applied mathematics it is common to find the upright "i", which is also prescribed in ISO norms. Mathematicians have used the italic "i" for a more than a couple of centuries, and ISO norms won't bother them. ;-)
    – egreg
    Commented Dec 8, 2012 at 20:25
  • 1
    Well the thing is here, i think, that a author should ask himself whether his readers can or should understand what is meant even when it's not written down somewhere. Anyhow the i looks like, mixing imaginary i and variable i without difference in formatting would lead to a very poor result.
    – bloodworks
    Commented Dec 8, 2012 at 20:52
6

To paraphrase Paul J. Nahin who wrote a book on the history of i, it would be no small job to do it well from the Hindus downwards. Here is an Engineers perspective.

In Engineering we have used an i (in all topics, such as thermodynamics, mechanics etc) with the exception of Electrical Engineering, where we use a j and for a good reason as the i is normally used to denote the current. A math italic is the best notation and clear across all disciplines.

enter image description here

As a matter of good practice, use what is most common in your field. If you worried about confusion and want to take the dot out of the i, please don't, as anyone that is confused with such a simple matter is unlikely to spot that the "i" is a dotless "i", not to mention the confusion of Turkish mathematicians. David's suggestion of U+2148 (ⅈ), just looks ugly.

1
  • 1
    This conflicts with ISO 80000-2:2009, Quantities and units---part2: Mathematical signs and symbols to be used in the natural sciences and technology. You could argue that we don't need to follow standards, but the confusion my students feel and the massive cost of accidents from misunderstandings related to notation and convention, demonstrates empirically that this isn't true. You could argue that it doesn't have to be the ISO standard, but it is already in wide use, and makes good choices in places where the only argument for convention would be an emotionally biased one.
    – Timtro
    Commented Apr 11, 2016 at 15:06
2

Today I was reading Kendall and Stewart's The Advanced Theory of Statistics Vol 1. and came across a sentence that echoes the remark by @egreg in the accepted answer:

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.

Kendal and Stewart are writing about the use of Greek versus roman letters for various things but there concluding sentence seems equally apposite to the matter of how to typeset the imaginary constant, i ...

Complete notational consistency can only be achieved at the expense of jettisoning a great deal of accepted statistical usage, and even then would probably result in some cumbrous symbols!

0

I sometimes use the i from Computer Modern Upright Italic, or Euler, both of which are unslanted fonts that match the italic math alphabet well.

An example of Euler’s identities, with the constants typeset in Euler, and the remaining text in (clones of) Palatino. Optima is a sans-serif font that also matches well; all three were created by Hermann Zapf. This sample uses unicode-math, but it can also be modified to work with PDFLaTeX, or several other variations.

\documentclass{article}

\usepackage{unicode-math}

\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}[
  Scale=1.0,
  Ligatures={Common, Discretionary, TeX}]
\setmathfont{Asana Math}
\setmathfont[range={up/{Latin,latin,Greek,greek},
                    bfup/{Latin,latin,Greek,greek},
                    cal, bfcal, frak, bffrak},
              script-features={},
              sscript-features={}
            ]{Neo Euler}

\newcommand\upi{\symup{i}}
\newcommand\upe{\symup{e}}

\begin{document}
\begin{align*}
  \upe^{\upi x} &= \cos{x} + \upi \sin{x} \\
  \upe^{\upi \uppi} + 1 &= 0
\end{align*}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .