# How can I align 4 equations in a 2 by 2 layout while having them separately numbered?

I have four equations that I want to present in a 2 by 2 layout.

I found this thread, but I would like to be able to \cref each equation separately and have them numbered like in this image below but aligned nicely:

Is there a way to do this or am I better off just having 4 equations below each other?

• The numbers you show are a bit confusing. Do you want them to go (1) and then (2) in the first row, and then (3) and (4) in the second row, or (1) and then (2) in the left column and then (3) and then (4) in the right column? (The latter is easier.) May 10 at 15:41
• Yes the last reference is supposed to be (4) May 10 at 15:44
• It wasn't a yes or no question, and both options would lead to the "last reference" being (4), so can you clarify please? May 10 at 15:44
• Oh wow my bad. The latter is fine as well if it's easier. May 10 at 15:47
• Now that you have seen how to do this, I recommend you to think again if it is a good thing to do. It is breaking the logical structure of right-aligned equation numbers, and potential give the reader a headache, isn't it? May 10 at 18:41

## 1 Answer

You can do this with two minipages, each with its own align environment.

I made the left minipage 40% of \textwidth and the right 60%, but you can adjust that how you like. For example, with .5\textwidth on both minipages it looks like this:

\documentclass{article}

\usepackage{amsmath,lipsum}

\begin{document}
\lipsum[1]

\noindent\begin{minipage}{.4\textwidth}
\begin{align}
x&=1 \\
y&=1
\end{align}
\end{minipage}% <-- % symbol necessary
\begin{minipage}{.6\textwidth}
\begin{align}
z&=1\\
w&=1
\end{align}
\end{minipage}

\vspace{\baselineskip}

\lipsum[2]

\end{document}


Also, as @frabjous suggested in the comments, you could make smaller minipages and center them to get the labels closer:

\noindent\begin{center}\begin{minipage}{.3\textwidth}
\begin{align}
x&=1 \\
y&=1
\end{align}
\end{minipage}\hspace{1cm}% <-- % symbol necessary
\begin{minipage}{.3\textwidth}
\begin{align}
z&=1\\
w&=1
\end{align}
\end{minipage}\end{center}

• Just to add to this, if you want the sets closer together (as in the image in the question), you could make the minipages smaller and put both inside a \begin{center} ... \end{center} environment. May 10 at 15:56
• I know the OP said this numbering was OK in the comments, but it's got me curious anyway. Can you think of an easy way to do the numbering horizontally, (1) (2) in the first row and (3) and (4) in the bottom row? Surprisingly it's not obvious to me how to do that easily and without manually adjusting the counter. May 10 at 16:19
• @frabjous: You could do this with 4 minipages and equations instead of aligns. But it requires some \phantoms if the equations have different widths to keep the alignment at the = signs. May 10 at 16:24
• It's not as easy as it sounds. Look at this output that comes from this code. With a lot (feels like too much) of manual intervention I got the horizontal alignments right, but the vertical alignment is also off. I could move the second row up with a negative length after \\ (more manual intervention!), but why is (7) lower than (8)? May 10 at 17:12
• @frabjous: It's because the minipages are center aligned (vertically). Use \begin{minipage}[b]. But you're right—that's a lot of work. May 10 at 18:12