\displaystyle \lim_{n \to \infty}
The position of sub- and superscripts of operators depends on whether this is a display or an inline formula. In an inline formula, limits are placed in the usual sub- and superscript position, while in a display formula they are usually place below or above the operator, though this depends on the operator. The commands \displaystyle and \textstyle force the display or inline math mode. Thus, we have , in text mode and , in display mode.
Regardless of text and display modes, the placement of limits can be forced by saying \limits or \nolimits after an operator. Thus we have and . There is also \displaylimits that acts as \limits only in display mode; this is the default behavior.
There are also commands to add limits to things other than operators (sums, integrals, etc.). These are \stackrel to put something above a relation and \overset, \underset, which also work with ordinary symbols and binary operators, e.g., and
Finally, one can have multi-line limits using the command \substack and the environment subarray: .