Binomial Coefficient in LaTeX (\binom{n}{k})
- LaTeX command
\binom{n}{k}- Package
- Add to your preamble:
\usepackage{amsmath} - Mode
- Math mode only
Where it is used
Binomial coefficient n choose k, the number of k-element subsets of an n-element set.
It appears in the binomial theorem (x+y)^n = \sum_k \binom{n}{k} x^k y^{n-k}, in Pascal's rule and in the binomial distribution P(X = k) = \binom{n}{k}p^k(1-p)^{n-k}. \binom sizes itself to the current style; force the large form with \dbinom inline or the small one with \tbinom in display. The older {n \choose k} syntax still works in plain TeX style but is discouraged in LaTeX documents. Some texts write C(n,k) or a prefixed nCk instead; the parenthesized stack is the standard in research writing.
Also listed under: 組み合わせ論
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Binomial Coefficient: $\binom{n}{k}$
\[ (x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k} \]
\end{document}Related symbols
All 確率・統計 →Frequently asked questions
- How do I write Binomial Coefficient in LaTeX?
- Type \binom{n}{k} in math mode, for example $(x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k}$. Load amsmath first with \usepackage{amsmath}.
- Which package do I need for \binom{n}{k}?
- \binom{n}{k} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
- Can I use \binom{n}{k} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\binom{n}{k}$ in running text.