Permutation (nPr) in LaTeX (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.
\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
- Multinomial
\binom{n}{k_1, k_2, \ldots, k_m} - Combination (nCr)
C(n, k) - Falling Factorial
(n)_k - Binomial Coefficient
\binom{n}{k} - Rising Factorial
n^{(k)} - Factorial
n!
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 poweredAI로 LaTeX 작성
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기