# Should spaces be used between "<" or ">" and numbers or letters?

Should spaces be used between "<" or ">" and numbers or letters?

For symbols, what is right? P<10, P <10, P < 10 or P< 10?
For numbers, what is right? 4>2, 4> 2, 4 > 2 or 4 >2?

Is there a rule in English typography regarding the usage of spaces around those symbols?

The AMA Manual of Style says:

Thin spaces should be used before and after the following mathematical symbols: ±, =, <, >, ≤, ≥, +, −, ÷, ×, ·, ≈, ∼, ∩, ∫, Π, Σ, and |.

a ± b a = b a + b a − b a ÷ b a × b a · b a > b a < b

Symbols are set close to numbers, superscripts and subscripts, and parentheses, brackets, and braces.

(Highlight mine)

However, this is only one (albeit popular) style guide. Check with the journal/platform/whatever you want to publish in/on what their style guide says.

I have not found a similar statement in the Wikipedia Style Guide, but they consistently also use spaces around (on both sides of) those symbols (with no regard as to what either side is, it may be a number, letter, function or else).

• In carefully typeset text, this space will usually be a narrow space instead of a regular space—both to give a visual clue that these symbols connect what’s on either side of them more closely than a space connects words, but also to avoid line breaks between numbers and symbols. Commented Jul 28, 2017 at 10:26
• @JanusBahsJacquet Yes, LaTeX for example will use narrow spaces. and the AMA Style Guide calls it thin spaces, I suppose they mean narrow spaces with that. For normal text, I suppose normal whitespaces do the trick. Commented Jul 28, 2017 at 10:28
• Thin spaces (U+2009) and narrow no-break spaces (U+202F) are different glyphs. I have no idea which would be more common in this situation. I normally use narrow spaces myself; the two can be hard to distinguish clearly in many fonts. Commented Jul 28, 2017 at 10:37

To supplement the AMA's recommendations (noted in Polygnome's answer), I offer the following style guide recommendations.

From The Chicago Manual of Style, sixteenth edition (2010):

12.15 Basic spacing in mathematics. Mathematics isn't simply read left to right in a machine-like manner, and one should be able to see the parts of an equation if it is properly set. Good mathematical spacing helps to indicate grouping: things that are more closely related should be set more tightly than things that are less closely related. Such spacing will vary according to the elements being set. In simple expressions, however, absolute spacing may be called for. Signs for binary operations (i.e., conjunctions); symbols of integration, summation, or union; and signs for binary relations (i.e., verbs) are preceded and followed by medium spaces:

[Relevant example:] xn + yn = zn

From The Oxford Guide to Style (2002):

12.6.2 Symbols Operational signs are of two types: those representing a verb (= ≈ ≠ ≥) and those representing a conjunction (+ – ∨ ×). All operational signs take a normal interword space of the line on either side ; they are not printed close up to the letters or numerals on either side of them.

From Words into Type, third edition (1974):

Spacing. Signs—plus, minus, equality, arrow—are often hair-spaced or thin-spaced, but they may be set closed with accompanying numerals or symbols. (An em dash should not be used for a minus sign.) It may be advisable to send the compositor a sample showing the amount of spacing preferred, because some compositors tend to use more than necessary.

[Relevant example:] x + 3yz = O

All three of these reference works support at least some degree of spacing on either side of operational signs in equations, although Words into Type, which was published near the end of the era of hand-compositing, seems less inclined than Chicago or Oxford to endorse a uniform approach—and even indicates that a closed-up treatment can be acceptable.

I agree with what is said in other answers, and offer some additional considerations and remarks. I think:

1. Among the question's author's proposals, those which have the space only to the left or to the right of the relational operator (here "<" or ">"), can/should (IMO) probably be excluded from the desirable choices (except for very particular cases). (See also point 5 below.)

2. As mentioned, there should be a thin space, but whether you have to insert it "by hand" / explicitly (if you are typing the document on a computer or typewriter) will depend on the font you use: some fonts already have considerable spacing around (often some but not all) binary operators. (Sometimes the same symbol even exists in several variants that only differ in the spacing/padding around the visible glyph.) So, what you really have to type in order to get a desired result (whatever be your preference or the set goal) may depend and vary when you change the font.

3. Professional typesetting systems (such as LaTeX) should/will take care of the correct spacing and produce the "correct" result independently of the entered text. (E.g., \$x=1\$ and \$ x = 1 \$ will yield the same output. I put "correct" in quotes since the details are a matter of choice and taste and may vary from one editor to the other. But once again, each editor's style files can define the desired output independently of the input.

4. My own preference, when I have to type equations in a "plain text" environment, is to usually insert a space in "displayed" / "big" equations, but sometimes to omit it in indices or where it might "tear apart" the formula too much. For example, I might write: x[n+1] = x[n] + 1, (no space in the "index")
which I might consider "nicer" (*) than either "x[n + 1] = ..." (spaces everywhere)
or "x[n+1]=x[n]+1" (no space anywhere), in spite of the general guideline that the formatting style should be uniform.
[Maybe the omission of a (full) space in indices is also reminiscent of the fact that we can imagine it typeset in a smaller size which also reduces the space. Then, if the index is displayed as a true sub/superscript, as in `<sub>`/`<sup>` HTML tags, I might leave spaces around the operators.]

5. (*) My "nicer" above refers to (1) aesthetics and (2) readability. Both are important criteria and often, but not necessarily always, equivalent.

6. In all(?) of the previous answers, the displayed examples of "thin spaces" are actually normal spaces, so...:

7. Summarizing, we say that (a) yes, "some" space should probably always be there, but (b) whether and how you enter it explicitly depends on the choices you have: LaTeX vs. plain text / rich text / HTML / fixed font / proportional font, and the design/kerning(...) of the binary operator's glyphs)