# Removing spaces between “words” in math mode

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how?

E.g., what I get is:

1024 x 768

and what I want is:

1024x768

-
It's not clear why you want this. Normally, math expressions should use the proper math operators with their predefined spacing. Some authors suggest using 1024 x 768 for dimensions of paintings and similar expressions. (So they suggest you use an x, not a \times.) – Marc van Dongen Apr 21 '13 at 3:18
@Marc, I want it because it looks better that way IMO. Not sure why anyone would want the letter x... that looks pretty sloppy. – Reid Apr 21 '13 at 3:49

Math binary operators and relations automatically add appropriate spaces between the symbol and their operands. If you want to remove this space, you can turn the operator into a regular symbol by enclosing it in braces. For example

$1024 {\times} 768$


If you will be using this often you can also define a new command and say something like

\newcommand{\stimes}{{\times}}
$1024 \stimes 768$


where \stimes is a symbol version of the \times operator.

-
Win! Thanks so much. – Reid Aug 2 '10 at 23:16
Good answer, I'd only add 'however, you really shouldn't be doing this!' – Joseph Wright Aug 3 '10 at 7:19
That's what I tried to say with "appropriate spaces" in the first sentence, but I probably was't explicit enough. :P – Juan A. Navarro Aug 3 '10 at 7:28
@Joseph, you don't have to use it in your documents. I write documents that look the best I can make them, not ones that follow "the rules". I deliberately left out extraneous explanations and context, but it's a deliberate choice and it looks way better in my context. – Reid Apr 21 '13 at 3:51

These answers seem overly complicated to me. I personally just use \! between symbols as in:

$W \! \rightarrow \! \mu$


This brings the symbols closer together. You can also use multiple in a row

$W \! \! \! \rightarrow \! \mu$

-

It seems to me that what you really want is a multiplication sign that works in text mode. You can get this by writing $\times$ or, to answer your whole question 1024$\times$768.

By the way, nice question. This is a good example of where it makes sense not to use normal math typography.

-

Perhaps defining it as an ordinary math symbol might be better than just enclose it in braces and expect that would do it now and in the future. So, I would use \mathord:

$1024\mathord{\times}768$

-
As Knuth points out in the TeXbook, \mathord is strictly unnecessary in TeX, since braces do the same thing. Unless you're planning on not using TeX in the future, I don't see why you would not expect it to work in the future. – TH. Sep 19 '10 at 11:28
Generally, I prefer a clear command like \mathord over that effect of braces which a reader perhaps might not recognize. Though you're right, this effect should not be changed in the future since subformulas should remain ordinary symbols. I just don't rely on side effects. – Stefan Kottwitz Sep 19 '10 at 20:54