Gamma function in LaTeX (\Gamma(z))
- LaTeX command
\Gamma(z)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Gamma function, the extension of the factorial to complex numbers with Gamma(n) = (n-1)!.
Defined by \Gamma(z) = \int_0^\infty t^{z-1} e^{-t}\,dt for \operatorname{Re} z > 0, it satisfies \Gamma(z+1) = z\Gamma(z) and \Gamma(1/2) = \sqrt{\pi}. The reflection formula \Gamma(z)\Gamma(1-z) = \pi/\sin(\pi z) and Stirling's approximation are standard tools. \Gamma typesets an upright capital gamma, the usual style; \varGamma gives an italic variant. It appears in normalizing constants of the gamma, beta, chi-squared, and Student t distributions. Use \, before dt in the integral. Do not confuse the function with \gamma, the Euler-Mascheroni constant.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Gamma function: $\Gamma(z)$
\[ \Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t}\, dt, \quad \Gamma(n) = (n-1)! \]
\end{document}Related symbols
- Beta function
B(x, y) - Riemann zeta function
\zeta(s) - Error Function
\text{erf}(x) - Complementary Error
\text{erfc}(x) - Bessel J
J_n(x) - Bessel Y
Y_n(x)
Frequently asked questions
- How do I write Gamma function in LaTeX?
- Type \Gamma(z) in math mode, for example $\Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t}\, dt, \quad \Gamma(n) = (n-1)!$. It works in plain LaTeX without loading any package.
- Which package do I need for \Gamma(z)?
- None. \Gamma(z) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \Gamma(z) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\Gamma(z)$ in running text.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث