0

I have the following in an align environment

\begin{align*}
{2 + 2 - 1}\choose{2 - 1} &=& {2 + 2 - 1}\choose{2} \\
{3}\choose{1} &=& {3}\choose{2} \\
3 &=& 3
\end{align*}

but there is a lot of whitespace on the righthand side of the = sign.

Is there a workaround that eliminates the whitespace?

  • 3
    the syntax for align is &= not &=& also use \binom{a}{b} not a \choose b – David Carlisle Oct 12 '21 at 22:56
  • @DavidCarlisle When I use &=, the = sign is included within the binomial coefficient instead of outside it. Also, why \binom{a}{b} over a \choose b? – compbiostats Oct 12 '21 at 22:59
  • 1
    \choose is not latex syntax (and requires some care to be used in latex without breaking things as you just commented) , you are using the amsmath package which defines \binom specifically for this use. If you do use \choose (don't) the syntax for that plain tex command is {2+2+1 \choose 2} not {2+2+1}\choose {2} if used that way it will not grab the = but \binom is the correct form – David Carlisle Oct 12 '21 at 23:06
  • 2
    It's like \frac vs. \over. It wasn't just an homage to Battlestar Gallactica. – John Kormylo Oct 12 '21 at 23:07
  • @compbiostats -- For more on the \frac vs. \over issue (and hence, indirectly, the \binom vs. \choose issue), see the posting What is the difference between \over and \frac? (Shameless self-citation alert!) – Mico Oct 13 '21 at 03:50

1 Answers1

1

enter image description here

AMS alignments are all written to use a syntax with the alignment point just to the left of the relation (unlike the deprecated eqnarray) so &= not &=&. The LaTeX syntax for a binomial coefficient is \binom{a}{b} note that \choose is a plain tex macro that should not be used in LaTeX if you do use it amsmath warns

Package amsmath Warning: Foreign command \atopwithdelims;
(amsmath)                \frac or \genfrac should be used instead
(amsmath)                 on input line 11.

Also if you use it the syntax is {2+2-1 \choose 2} not {2+2-1}\choose{2} otherwise it will pick up everything before the \choose such as the = in your example.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align} \binom{2 + 2 - 1}{2 - 1} &= \binom{2 + 2 - 1}{2} \ \binom{3}{1} &= \binom{3}{2} \ 3 &= 3 \end{align} \end{document}

David Carlisle
  • 757,742