[Tex/LaTex] How to systems be side by side with an arrow between them

alignequations

Here's my problem : I'd like to a write many equivalent systems of equations. Therefore, I'd like the first to be at the left, then an arrow (\Leftrightarrow, for example, since they're equivalent :)), a second one on the right, and then, the others vertically aligned with the second. Basically, I want to do the same thing that can be done with the align environment, but with systems. Nevertheless, I didn't figure it out.

Here's what I tried :

\documentclass[11pt]{article}
\usepackage{envmath}
\begin{document} 
\[
\begin{System} 
  x + y = 3 \\ 
  x - y = 1
\end{System} \Leftrightarrow 
\begin{System}
 x=2\\ 
 y=1
\end{System}
\]
\end{document}

Would you have any solution ?

Best Answer

You could use aligned and \iff which produces the correct math spacing:

enter image description here

Code:

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document} 
\[
    \left\{\begin{aligned} 
      x + y &= 3 \\ 
      x - y &= 1
    \end{aligned}\right. \iff 
    \left\{\begin{aligned}
     x &= 2\\ 
     y &= 1
    \end{aligned}\right.
\]
\end{document}