# How do I get this set of equations aligned?

I have tried using aligned and alignedat but both of them are not giving satisfactory results. The gap between the three columns is not coming out right. I am open to any other approach as well. Also, how to get the alphabetic list in the equations, right now I am using the math-mode, but can this be done using enumerate environment with \alph*? Also can someone explain the use of & and && in the aligned equations.

MWE

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{alignat*}{4}%
(a) \,\, m_{1} & < m_{2} \quad 0 & < \theta_{1} \leqslant \pi & \Theta > \pi/2 \\
(b) \,\, m_{1} & = m_{2} \quad 0 & < \theta_{1} \leqslant \pi/2 & \Theta = \pi/2 \\
(c) \,\, m_{1} & > m_{2} \quad 0 & < \theta_{1} \leqslant \theta_{1\,\,\mathrm{max}} & \Theta < \pi/2 \\
\end{alignat*}

\begin{align*}%
(a) \,\, m_{1} & < m_{2} \quad 0 < \theta_{1} \leqslant \pi && \Theta > \pi/2 \\
(b) \,\, m_{1} & = m_{2} \quad 0 < \theta_{1} \leqslant \pi/2 && \Theta = \pi/2 \\
(c) \,\, m_{1} & > m_{2} \quad 0 < \theta_{1} \leqslant \theta_{1\,\,\text{max}} && \Theta < \pi/2 \\
\end{align*}

\end{document}


Your attempt with alignat is almost to the point. However, in this particular case, I'd probably go with flalign.

A tip: if you do \renewcommand{\leq}{\leqslant} and always use \leq, you don't risk to mix the two symbols and it would be easy to switch back to the unslanted symbol in case your coauthor or supervisor doesn't like the slanted one.

Another important tip: never use a trailing \\ in alignment environments, because it produces an unwanted blank line (with its number if the *-variant is not used).

I'd not use math mode for the labels on the left.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{lipsum}% for context

% so you can switch back easily
\renewcommand{\leq}{\leqslant}

\begin{document}

\lipsum[1][1-3]
\begin{alignat*}{4}
%% first pair of columns
%% second pair of columns
& m_{1} & < m_{2} \qquad
%% third pair of columns
& 0 & < \theta_{1} \leq \pi \qquad
%% fourth pair of columns
& \Theta &> \pi/2
\\
& m_{1} & = m_{2} \qquad
& 0 & < \theta_{1} \leq \pi/2 \qquad
& \Theta &= \pi/2
\\
& m_{1} & > m_{2} \qquad
& 0 & < \theta_{1} \leq \theta_{1\,\,\mathrm{max}} \qquad
& \Theta &< \pi/2
\end{alignat*}
\lipsum[2][1-3]
\begin{flalign*}
&\text{(a)}
& m_{1} & < m_{2}
& 0 & < \theta_{1} \leq \pi
& \Theta &> \pi/2
& \\
&\text{(b)}
& m_{1} & = m_{2}
& 0 & < \theta_{1} \leq \pi/2
& \Theta &= \pi/2
& \\
&\text{(c)}
& m_{1} & > m_{2}
& 0 & < \theta_{1} \leq \theta_{1\,\,\mathrm{max}}
& \Theta &< \pi/2
\end{flalign*}
\lipsum[3][1-3]

\end{document}


• thanks. could you also tell the difference between \mathrm and \text for adding intermittent text in math mode? Does it make a difference? Or are they equivalent? Aug 13, 2023 at 9:54
• @Damitr \mathrm is for textual subscripts and doesn't respect spaces; \text does and will use the prevailing font before the display. Aug 13, 2023 at 10:41

As I understand,

& aligns with the character anchored right after it.

&& aligns but with some space between (imagine you have a \vfill between the 2 &s).

I changed your code a bit for better spacing.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{alignat*}{4}%
(a) \,\, m_{1} & < m_{2} \quad &&0  < \theta_{1} \leqslant \pi && \Theta > \pi/2 \\
(b) \,\, m_{1} & = m_{2} \quad &&0  < \theta_{1} \leqslant \pi/2 && \Theta = \pi/2 \\
(c) \,\, m_{1} & > m_{2} \quad &&0  < \theta_{1} \leqslant \theta_{1\,\,\mathrm{max}}\quad \ && \Theta < \pi/2 \\
\end{alignat*}

\begin{align*}%
(a) \,\, m_{1} & < m_{2} \quad &&0 < \theta_{1} \leqslant \pi && \Theta > \pi/2 \\
(b) \,\, m_{1} & = m_{2} \quad &&0 < \theta_{1} \leqslant \pi/2 && \Theta = \pi/2 \\
(c) \,\, m_{1} & > m_{2} \quad &&0 < \theta_{1} \leqslant \theta_{1\,\,\text{max}} && \Theta < \pi/2 \\
\end{align*}

\end{document}


I think it works similarly to \quad and \qquad.

• your description of & and && is very misleading, & in align is the same as & in tabular and separates the cells. there is no special behaviour for && it is the same as & & just has nothing in one cell of the alignment. Aug 13, 2023 at 7:31