Permutation (nPr) in LaTeX (P(n, k))

P(n,k)P(n, k)
LaTeX command
P(n, k)
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Number of ordered arrangements of k items chosen from n distinct items, read n permute k.

Permutations count ordered selections: P(n, k) = \frac{n!}{(n-k)!} = n(n-1)\cdots(n-k+1), so P(5, 2) = 20. It equals the falling factorial (n)_k or n^{\underline{k}}, and relates to combinations by P(n, k) = k!\,C(n, k). Alternatives you will see include nPr, {}^nP_k, and A^k_n (arrangements) in French and Chinese texts. Because P(\cdot) also denotes probability, a reader may misread P(n, k) in a probability chapter; switching to (n)_k or n^{\underline{k}} avoids that. Use \cdots between factors in a product.

Minimal compilable example

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

P(n,k)=n!(n−k)!=n(n−1)⋯(n−k+1)P(n, k) = \frac{n!}{(n-k)!} = n(n-1)\cdots(n-k+1)
\documentclass{article}
\begin{document}
Permutation (nPr): $P(n, k)$

\[ P(n, k) = \frac{n!}{(n-k)!} = n(n-1)\cdots(n-k+1) \]
\end{document}

Related symbols

All Combinatoriek →

Frequently asked questions

How do I write Permutation (nPr) in LaTeX?
Type P(n, k) in math mode, for example $P(n, k) = \frac{n!}{(n-k)!} = n(n-1)\cdots(n-k+1)$. It works in plain LaTeX without loading any package.
Which package do I need for P(n, k)?
None. P(n, k) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use P(n, k) in text mode, or only in math mode?
Both. P(n, k) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSchrijf LaTeX met AI

Beste AI LaTeX Editor, Overleaf Alternatief

Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI

  • Genereer mooie TikZ-diagrammen met AI
  • Upload afbeelding en converteer naadloos naar LaTeX
  • Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen