[Tex/LaTex] How to get n=1 under Product character (\prod or \Pi)

symbols

Possible Duplicate:
Show inline math as if it were display math

Whenever I try to get something below the product character, it actually puts it next to it.

The recommended code to do this is \prod_{n=1}, but contrary to the example, for me, it looks more like Nn=1 than actually below the prod character.

It does not mention a specific package though.

How can I do this?

Best Answer

In textstyle the limits (the n=1 in that case) are pushed to the right of the operator, while in displaystyle it is above and below.

The style used to display the formula depends on where it is in the text (inline in text or in an equation-like environment), and where it is in the formula (for example, in matrices or fractions, the subformulas are in text style by default).

In any case, you can use {\displaystyle \prod_{n=1}^{\infinity} a_n} to locally force the display style. Do it at your own risks, as the formula will become much taller, and is likely to break the appearance of your paragraph.

If you'd prefer a compromise, you can use the \limits command to force the limits to be placed above and below the operator, without changing the operator size (which \displaystyle does). Beware, even if the operator isn't resized, the limits will still enlarge the formula a bit and add to your line spacing.

In my humble opinion, these options are worth knowing, but should be restricted to cases where the formula has to appear correctly inside of a fraction or matrix. For inline formulas, the default text style is okay.

An example :

\documentclass{article}

\usepackage{amsmath}

\begin{document}

This is an inline formula : $\prod_{i=1}^{\infty} a_{i}$, \\
and now this is the same inline formula in display style : ${\displaystyle \prod_{i=1}^{\infty} a_{i}}$, \\
and now this is the same inline formula with limits : $\prod\limits_{i=1}^{\infty} a_{i}$

Now the same formula in an equation:
\begin{equation*}
  \prod_{i=1}^{\infty} a_{i}
\end{equation*}
or in an equation, but in a fraction :
\begin{equation*}
  \frac{\prod_{i=1}^{\infty} a_{i}}{2}
\end{equation*}
or in an equation, but in a fraction, but with forced display style :
\begin{equation*}
  \frac{\displaystyle \prod_{i=1}^{\infty} a_{i}}{2}
\end{equation*}


\end{document}

example

Related Question