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: Summation & Product

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 Math Symbols →

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 poweredWrite LaTeX using AI

Best AI LaTeX Editor, Overleaf Alternative

Octree helps researchers from 15+ universities write research papers faster using AI

  • Generate beautiful TikZ diagrams using AI
  • Upload image and convert it to LaTeX seamlessly
  • Get instant assistance with writing and formatting research papers