Pi in LaTeX (\pi)

π\pi
LaTeX command
\pi
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
πU+03C0

Where it is used

Lowercase Greek pi, the circle constant 3.14159…, also used for permutations and policies.

\pi is the ratio of a circle's circumference to its diameter, appearing in A = \pi r^2, e^{i\pi} + 1 = 0, and radian angles like \pi/2. Reinforcement learning uses \pi for a policy \pi(a \mid s), combinatorics uses it for a permutation, and number theory writes \pi(x) for the prime-counting function. The variant \varpi is a different glyph. When pi is a constant some style guides prefer an upright form, but standard LaTeX gives an italic \pi. Do not use the large operator \prod in place of \pi, or vice versa.

Also listed under: 삼각함수, 기하학

Minimal compilable example

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

eiπ+1=0,A=πr2e^{i\pi} + 1 = 0, \quad A = \pi r^2
\documentclass{article}
\begin{document}
Pi: $\pi$

\[ e^{i\pi} + 1 = 0, \quad A = \pi r^2 \]
\end{document}

Related symbols

All 그리스 기호 →

Frequently asked questions

How do I write Pi in LaTeX?
Type \pi in math mode, for example $e^{i\pi} + 1 = 0, \quad A = \pi r^2$. It works in plain LaTeX without loading any package.
Which package do I need for \pi?
None. \pi is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \pi in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\pi$ in running text. If you only need the glyph in text, paste the Unicode character π instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기