\binom is the amsmath command and is what KaTeX supports. The older \choose is a plain-TeX primitive that still works in LaTeX but is discouraged because it needs the enclosing braces to behave.
All ways to write it
| Command | Use | Package | Copy |
|---|---|---|---|
\binom{n}{k} | — | amsmath | |
{n \choose k} | old TeX form, still works | none | |
\dbinom{n}{k} | display size | amsmath | |
\tbinom{n}{k} | text size | amsmath | |
C(n, k) | function notation | none | |
{}^{n}C_{k} | prescript notation | none |
Commands marked with a package need that \usepackage line in a LaTeX document.
Example
(x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^{n-k} y^{k}The binomial theorem.
Questions
Does \choose work in KaTeX?
Yes, both \binom and {n \choose k} render in KaTeX and MathJax.
Related symbols
- Fractions ½
\frac{a}{b} - Summation ∑
\sum_{i=1}^{n} - Product ∏
\prod_{i=1}^{n}
Using choose in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \binom{n}{k} and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.