# Suppressing = on a line in the align environment

How do I produce the following in align environment?

\begin{eqnarray*}& & abcd \\
&=& defg\\
&=& hijk
\end{eqnarray*}

I try

\begin{align*}&  abcd \\
&= defg\\
&= hijk
\end{align*}

But the result is not what I wanted.

• Jul 27 at 6:02

To avoid guessing about the space, you can use

\begin{align*}
&\mathrel{\phantom{=}} abcd \\
&= defg\\
&= hijk
\end{align*}
• That is the cleanest version. May 7, 2011 at 0:58
• It can get much cleaner if you define \newcommand*{\pheq}{\hphantom{{}={}}} (or with \mathrel but with h). Jul 20, 2013 at 18:27

Here you've got the fifth solution, which shows you that what you want to do is indeed slightly tricky in align.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align*}
& abcd \\
={} & defg \\
={} & hijk
\end{align*}
\end{document}

The trick: If you have the = in the left column, then you need to put something after it to get correct spacing.

This is sort of cheating, but in your example document, the following also works:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align*}
a&bcd \\
= d&efg \\
= h&ijk
\end{align*}

\end{document}

Why? Because I know that a, d, and h all have the same width. This trick is surprisingly generalizable.

Another solution gives virtually identical results as eqnarray:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation*}
\begin{aligned}
& & abcd \\
&=& defg \\
&=& hijk
\end{aligned}
\end{equation*}

\end{document}

This works because the aligned subenvironment (which must be enclosed in a larger equation or the like) shrinks to fit its contents exactly, and separates columns by a minimal amount. You can tweak this amount by redefining \minalignsep:

\renewcommand*{\minalignsep}{2em} % 10pt by default

Personally, I would go with Hendrik Vogt's method, though.

in this special case you can use the order =&, which should be by default the other way round:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
&\; abcd \\
=&\; defg\\
=&\; hijk
\end{align*}

\end{document}
\begin{align*}
&=       defg \\
&=       hijk
\end{align*}