Power Set in LaTeX (\mathcal{P})

P\mathcal{P}
LaTeX command
\mathcal{P}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Calligraphic P, the usual notation for the power set (the set of all subsets) of a set.

\mathcal{P}(A) is the power set, with |\mathcal{P}(A)| = 2^{|A|} for finite A, and Cantor's theorem says there is no surjection A \to \mathcal{P}(A). Some authors use \wp, the Weierstrass p, or 2^A instead. \mathcal{P} is also used for probability measures, partitions, or the class P in complexity theory, so context matters. The calligraphic alphabet covers uppercase letters only. For a more script-like P, a script font command such as \mathscr from an extra package is an alternative.

Minimal compilable example

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

∣P(A)∣=2∣A∣|\mathcal{P}(A)| = 2^{|A|}
\documentclass{article}
\begin{document}
Power Set: $\mathcal{P}$

\[ |\mathcal{P}(A)| = 2^{|A|} \]
\end{document}

Related symbols

All نظرية المجموعات →

Frequently asked questions

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

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

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

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