Equations – Aligning Equations on Two Lines in LaTeX

alignequations

I have an equation of this kind:

\begin{equation*}
A_1 \rightarrow A_2 \rightarrow \dots \rightarrow A_N 
\end{equation*}

And I would like to add a $B_1$ under $A_1$, $B_2$ under $A_2$ and $B_N$ under $A_N$. My idea was to use the environment align:

\begin{align*}
&A_1 \rightarrow &A_2 \rightarrow \dots &\rightarrow A_N \\
&B_1 &B_2 &B_3
\end{align*}

However it does not work as I was imagined. I would like to find a way to keep the equation above unchanged somehow.

Any help will be very much appreciated!

Best Answer

I'd keep the equation* environment and use bespoke array environments to place B_1 below A_1, B_2 below A_2, etc.

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage{amsmath} % for 'equation*' env.
%% macro with a bespoke 'array' env.:
\newcommand\mybox[2]{\begin{array}[t]{@{}c@{}}
                        \displaystyle #1 \\ \displaystyle #2 
                     \end{array}}

\begin{document}

\begin{equation*}
A_1 \rightarrow A_2 \rightarrow \dots \rightarrow A_N 
\end{equation*}

\begin{equation*}
\mybox{A_1}{B_1} \to \mybox{A_2}{B_2} \to \dots \to \mybox{A_N}{B_N}
\end{equation*}

\end{document}