Why does align character & remove horizontal space

alignhorizontalspacing

This is something I've been wondering and annoyed about for a long time but cannot find an answer to.

Assume that I have a chain of equations:

\begin{align*}
    a &= b \\
      &= c
\end{align*}

looking like

Now assume that the terms in a and b are just too long to put both of them into one line.
Therefore, I would like to break the line after a, continue with the equals sign in the next line, and have a, b and c aligned – so I try:

\begin{align*}
      &a \\
    = &b \\
    = &c
\end{align*}

However, this produces the output

so that the horizontal space between the equals sign and the terms is too small. It seems to me that this is because I try to use the align character & to the right side of the equals sign instead of the left side, because it works fine like this:

\begin{align*}
    &= a \\
    &= b \\
    &= c
\end{align*}

produces

My only idea for a workaround to get rid of the equals sign in the first line was to just add a phantom:

\begin{align*}
    &\hphantom{=} a \\
    &= b \\
    &= c
\end{align*}

but firstly it does not work anyway (why??):

and secondly, if I start to use different characters (<, \Leftrightarrow, …) that have different sizes, I need to to put different phantoms all over the place, which is pretty cumbersome. Also, I'd like to avoid any way of manual spacing, like \;, \, etc., because I don't know which one would be the right one and it also seems to be a dirty workaround rather than the optimal solution.

What is the underlying problem here, and how can I solve it? I'd appreciate any help, thanks in advance.

Best Answer

This is not directly related to & you see this in an example just using inline math

enter image description here

\documentclass{article}

\begin{document}

1 $a=b$

2 {$a=$}{$b$}

3 {$a={}$}{$b$}

4 {$a$}{${}=b$}

\end{document}

In an AMS alignment, odd numbered columns are set as \hfil$\displaystyle#$ so right aligned displaystyle math. Even numbered columns are set as $\displaystyle{}#$\hfil so left aligned, but with a leading {} so that &= aligns on = while keeping the \mathrel spacing.

So, to align after the operator, you need to add the {}, and use ={}&

Related Question