Product in LaTeX (\prod_{i=1}^{n})

∏i=1n\prod_{i=1}^{n}
LaTeX command
\prod_{i=1}^{n}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Multiplies a sequence of factors for i from 1 to n, using the capital-pi large operator.

\prod behaves like \sum: limits stack above and below in display style and sit to the side in inline text. It writes factorials as n! = \prod_{i=1}^{n} i, likelihoods L(\theta) = \prod_{i} p(x_i \mid \theta), and Euler products over primes. Do not substitute the Greek letter \Pi, which is a fixed-size ordinary symbol. The upside-down version \coprod denotes coproducts in category theory. When the product is a likelihood that you will take the log of, it is common to show the conversion to a sum explicitly, since \log turns \prod into \sum.

Also listed under: الجمع والضرب

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

L(θ)=∏i=1np(xi∣θ)L(\theta) = \prod_{i=1}^{n} p(x_i \mid \theta)
\documentclass{article}
\begin{document}
Product: $\prod_{i=1}^{n}$

\[ L(\theta) = \prod_{i=1}^{n} p(x_i \mid \theta) \]
\end{document}

Related symbols

All الرموز الرياضية →

Frequently asked questions

How do I write Product in LaTeX?
Type \prod_{i=1}^{n} in math mode, for example $L(\theta) = \prod_{i=1}^{n} p(x_i \mid \theta)$. It works in plain LaTeX without loading any package.
Which package do I need for \prod_{i=1}^{n}?
None. \prod_{i=1}^{n} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \prod_{i=1}^{n} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\prod_{i=1}^{n}$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث