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: Penjumlahan & Hasil Darab

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 Simbol Matematik →

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 poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan