# Multiline subscripts in summation notation [duplicate]

\documentclass{amsart}
\begin{document}
$\prod_{k=0,\ k\neq i}^{n} \frac{x-c_{k}}{c_{i}-c_{k}}$
\end{document}


I would like to make the k \neq i, which is next to k=0, parallel to k = 0. I tried \\, \limits, and \begin{align*} ... \end{align*}, but somehow I did not get the desired result out of the actions.

## marked as duplicate by Mico math-mode StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 19 '15 at 4:16

You should use \substack, with which you can make a multiline subscript or superscript. Note that you need to load amsmath package to use the command.
\documentclass{amsart}
$\prod_{\substack{k=0\\ k\neq i}}^{n} \frac{x-c_{k}}{c_{i}-c_{k}}$

• @Chou I noticed you used amsart documentclass. Then, you don't need to write usepackage{amsart} in the preamble. – Merzong Jun 19 '15 at 4:08
• You should aim to make the answer code compilable and self-contained. If nothing else, that'll save you from having to address follow-up questions of the type above. In the case of your code, it would suffice to insert the instruction \documentclass{amsart} at the start of the code block. – Mico Jun 19 '15 at 4:13