[Tex/LaTex] How to show two groups of equations side by side: one implies the other

amsmathequations

I would like to show a bunch of equations can imply another bunch of equations, with double right arrow in between. Here are two trials of mine: one is to use another level of math mode to enclose the two groups of equations, and the other is to use a table with each group of equation being in a cell.

The first one

$$
\begin{align*}
\nabla f(x) -\mu X^{-1} e + A(x) \lambda - z = 0, 
\\ c(x) = 0, 
\\ -\mu X^{-1} e + z = 0, 
\\ x > 0
\\ z > 0
\end{align*} 
\quad \Longrightarrow \quad
\begin{align*}
\nabla f(x) + A(x) \lambda - 2z = 0, 
\\ c(x) = 0, 
\\ -\mu X^{-1} e + z = 0, 
\\ x > 0
\\ z > 0
\\
\end{align*}
$$

This one will leads to error

amsmath: Erroneous nesting of equation structures;(amsmath) trying to
recover with `aligned'. \end{align*}

Another is using tabular:

\begin{tabular*}{c c c}
\begin{align*}
\nabla f(x) -\mu X^{-1} e + A(x) \lambda - z = 0, 
\\ c(x) = 0, 
\\ -\mu X^{-1} e + z = 0, 
\\ x > 0
\\ z > 0
\end{align*} 
& $\Longrightarrow$ &
\begin{align*}
\nabla f(x) + A(x) \lambda - 2z = 0, 
\\ c(x) = 0, 
\\ -\mu X^{-1} e + z = 0, 
\\ x > 0
\\ z > 0
\\
\end{align*}
\end{tabular*}

It doesn't compile either.

I wonder how to make the two approaches workable, and if there are other better ways?

Best Answer

Here is another approach, with some braces added to "combine" the separate equation sets. Of course, these can be removed if needed. Each equation set is aligned along the binary relations in an rcl (right-center-left) fashion with the appropriate spacing.

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
  \left.\begin{array}{r@{\mskip\thickmuskip}l}
    \nabla f(x) -\mu X^{-1} e + A(x) \lambda - z &= 0, \\
    c(x) &= 0, \\
    -\mu X^{-1} e + z &= 0, \\
    x &> 0 \\
    z &> 0
  \end{array} \right\}
  \quad \implies \quad
  \left\{\begin{array}{r@{\mskip\thickmuskip}l}
    \nabla f(x) + A(x) \lambda - 2z &= 0, \\
    c(x) &= 0, \\
    -\mu X^{-1} e + z &= 0, \\
    x &> 0 \\
    z &> 0
  \end{array}\right.
\end{align*}
\end{document}