Eqnarray – How to Align Equations in Two Columns Using Eqnarray

eqnarray

Here is my code:

\begin{eqnarray}\label{eq:diff_inv}‎ 
‎&\mathcal{D}_1 I_{10}=I_{20}-\frac{3}{2}I_{01},\qquad &\mathcal{D}_2 I_{10}=I_{11}-\frac{3}{2}I_{10}I_{01},\\‎ 
‎&\mathcal{D}_1 I_{01}=I_{11}-\frac{5}{2}I_{10}I_{01},\qquad &\mathcal{D}_2 I_{01}=I_{02}-\frac{5}{2}I_{01}^2‎, ‎\nonumber\\‎ 
‎&\mathcal{D}_1 I_{10}=I_{20},\qquad &\mathcal{D}_2 I_{10}=I_{11},\label{eq:diff_inv_55}\\‎ 
‎&\mathcal{D}_1 I_{01}=I_{11}+\alpha\,I_{01}I_{01},\qquad &\mathcal{D}_2 I_{01}=I_{02}+I_{01}^2‎, ‎\nonumber‎
‎\end{eqnarray}‎ 

and here is the result:

enter image description here

But I want this alignment:

enter image description here

Best Answer

Either align or alignat{n} are meant for this kind of equations

enter image description here

The pattern is following: groups consist of right & left aligned elements and each group is separated by another ampersand &. For instance, there are two groups in your example

  right & left   &   right & left \\

alignat{n} is similar but does not add extra space between columns. n is mandatory and denotes a number of groups, in your case 2

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align}
  \mathcal{D}_1 I_{10} &= I_{20} - \frac{3}{2}I_{01},
        & \mathcal{D}_2 I_{10} &= I_{11} - \frac{3}{2}I_{10 }I_{01}, \\
  \mathcal{D}_1 I_{01} &= I_{11} - \frac{5}{2}I_{10}I_{01},
        & \mathcal{D}_2 I_{01} &= I_{02} - \frac{5}{2}I_{01}^2,      \nonumber \\
  \mathcal{D}_1 I_{10} &= I_{20},
        & \mathcal{D}_2 I_{10} &= I_{11},                            \label{eq:diff_inv_55} \\
  \mathcal{D}_1 I_{01} &= I_{11} + \alpha\,I_{01}I_{01},
        & \mathcal{D}_2 I_{01} &= I_{02} + I_{01}^2,                 \nonumber
\end{align}

\end{document}
Related Question