How can I make the symbol of product operator (pi caps) making the extremes remain the same above and below the symbol? (I do not want the extremes on the right side of the symbol) I wanna write this symbol with that conditions in the simplest possible way.
2 Answers
Please be aware that the default behaviour in displaymath mode is for the limits to appear above and below the symbol:
\[
\prod_{i = 1}^{n} a_{i} \quad \sum_{i = 1}^{n} a_{i} \quad \lim_{n
\to \infty} n^{2}
\]
The only exception to this is integrals:
\[
\int_{0}^{\infty} x^{2} \, dx
\]
The default behaviour in inline math mode is for the limits to appear to the side, e.g.
$\prod_{i = 1}^{n} a_{i} \quad \sum_{i = 1}^{n} a_{i} \quad \lim_{n
\to \infty} n^{2}$
The reason for this is to avoid irregular spacing between lines and excessive white space.
Compare:
With:
However, to force the limits to appear above and below in inline math
mode you can use \limits
as suggested by Christian Hupfer.
$\prod\limits_{i = 1}^{n} a_{i} \quad \sum\limits_{i = 1}^{n} a_{i}
\quad \lim\limits_{n \to \infty} n^{2}$
And to force the limits to appear to the side in displaymath mode, you can use \nolimits
\[
\prod\nolimits_{i = 1}^{n} a_{i} \quad \sum\nolimits_{i = 1}^{n}
a_{i} \quad \lim\nolimits_{n \to \infty} n^{2}
\]
Do you mean this (which is mathematical a little bit incorrect ;-))
The usage of \prod\limits^{upper}_{lower}
will produce the product operator with the limits set below and above. Omitting \limits
will generate the limits set aside, if \displaystyle
isn't used. In displayed equations
the limits are set below and above in amsmath
, since the sumlimits
option is set by default. If this is not desired, use nosumlimits
(valid for \sum
, \prod
, \coprod
,\bigoplus
and \bigotimes
etc operators, but not for integrals)
The 'correct' usage should follow the guideline that limits above and below should be used only in purely mathematical context, not inline with other text, since the line height is stretched here.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
$n! = \prod\limits^{n}_{k=1} k$ versus $n! = \prod^{n}_{k=1} k$
However $n!=\displaystyle\prod^{n-1}_{k=0} (n-k)$ is the better definition
\end{document}
-
2
-
@GustavoMezzetti: Oh, yes, of course.– user31729Mar 31, 2016 at 10:51
extremes
the limits of the operator\textstyle
) math puts limits on upper and lower right, as opposed to equation (or\displaystyle
) math which places limites above/below. You can override the default configuration by explicitly adding\textstyle
or\displaystyle
to your math expression.\displaystyle
declaration in line will also give the larger\prod
symbol, which will further destroy good line spacing