Possible Duplicate:
What is the “correct” way of embedding text into math mode?
What formatting is perfect for word in an equation? Is \text{ text is here } the best way? For example,
a = x_j \text{ for } i = 1, 2, \dots, M
Possible Duplicate:
What is the “correct” way of embedding text into math mode?
What formatting is perfect for word in an equation? Is \text{ text is here } the best way? For example,
a = x_j \text{ for } i = 1, 2, \dots, M
Not sure whether this is an answer...
Spaces are gobbles and replaced with appropriate math spacing when in math mode. However, forced spacing always sets the same; there is no difference in the spacing between the following alternatives:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$a = x_j \text{ for } i = 1, 2, \dots, M$ \par
$a = x_j\ \text{for } i = 1, 2, \dots, M$ \par
$a = x_j \text{ for}\ i = 1, 2, \dots, M$ \par
$a = x_j\ \text{for}\ i = 1, 2, \dots, M$ \par
$a = x_j \text{~for~} i = 1, 2, \dots, M$ \par
$a = x_j~\text{for~} i = 1, 2, \dots, M$ \par
$a = x_j \text{~for}~i = 1, 2, \dots, M$ \par
$a = x_j~\text{for}~i = 1, 2, \dots, M$
\end{document}
As such, it may be left up to user preference. That is, whether you consider the space before/after the text to form part of the text or not and what kind of spacing you use.
\mbox{ text is here }, but this will not scale to where it's used. Some also use\ \text{text is here}\. – Werner Oct 10 '12 at 05:46\there to fix that? – qazwsx Oct 10 '12 at 05:50\is there to add additional space, but I think$a = x_j \text{, for } i = ...is better, but really up to you which to use. – Peter Grill Oct 10 '12 at 06:04