Space in array system equations












5















I need to make some system equations but when I place them on one row I have this problem. Space between | and x. How to remove it?
enter image description here



begin{document}
Example 1:
\
$left| begin{array}{@{}*{4}{c@{,}}l}
2x+3y-cancel{z}=4 \
3x+2y+2=6
end{array}right.$
textrightarrow
$; 5x+5y=10$ textrightarrow
$; x+y=2;$
$;$ % Space
$left| begin{array}{@{}*{4}{c@{,}}l}
x-y+2z=2 \
3x+2y-z=4 | .2
end{array}right.$
textrightarrow
end{document}









share|improve this question



























    5















    I need to make some system equations but when I place them on one row I have this problem. Space between | and x. How to remove it?
    enter image description here



    begin{document}
    Example 1:
    \
    $left| begin{array}{@{}*{4}{c@{,}}l}
    2x+3y-cancel{z}=4 \
    3x+2y+2=6
    end{array}right.$
    textrightarrow
    $; 5x+5y=10$ textrightarrow
    $; x+y=2;$
    $;$ % Space
    $left| begin{array}{@{}*{4}{c@{,}}l}
    x-y+2z=2 \
    3x+2y-z=4 | .2
    end{array}right.$
    textrightarrow
    end{document}









    share|improve this question

























      5












      5








      5








      I need to make some system equations but when I place them on one row I have this problem. Space between | and x. How to remove it?
      enter image description here



      begin{document}
      Example 1:
      \
      $left| begin{array}{@{}*{4}{c@{,}}l}
      2x+3y-cancel{z}=4 \
      3x+2y+2=6
      end{array}right.$
      textrightarrow
      $; 5x+5y=10$ textrightarrow
      $; x+y=2;$
      $;$ % Space
      $left| begin{array}{@{}*{4}{c@{,}}l}
      x-y+2z=2 \
      3x+2y-z=4 | .2
      end{array}right.$
      textrightarrow
      end{document}









      share|improve this question














      I need to make some system equations but when I place them on one row I have this problem. Space between | and x. How to remove it?
      enter image description here



      begin{document}
      Example 1:
      \
      $left| begin{array}{@{}*{4}{c@{,}}l}
      2x+3y-cancel{z}=4 \
      3x+2y+2=6
      end{array}right.$
      textrightarrow
      $; 5x+5y=10$ textrightarrow
      $; x+y=2;$
      $;$ % Space
      $left| begin{array}{@{}*{4}{c@{,}}l}
      x-y+2z=2 \
      3x+2y-z=4 | .2
      end{array}right.$
      textrightarrow
      end{document}






      arrays






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 9 hours ago









      Simeon SimeonovSimeon Simeonov

      4117




      4117






















          4 Answers
          4






          active

          oldest

          votes


















          4














          You can better exploit array:



          documentclass{article}
          usepackage{amsmath,array,cancel}

          newenvironment{system}[1]
          {%
          left|setlength{arraycolsep}{0pt}
          begin{array}{ @{} *{numexpr2*#1relax}{ >{{}} r <{{}} } l @{} }%
          }
          {end{array}right.}

          begin{document}

          $begin{system}{3}
          2x &+& 3y &-& cancel{z} &=& 4 \
          3x &+& 2y &+& cancel{z} &=& 6
          end{system}
          rightarrow
          5x+5y=10
          rightarrow
          x+y=2
          rightarrow
          begin{system}{3}
          x &-& y &+& 2z &=& 2 \
          3x &+& 2y &-& z &=&4 mid .2
          end{system}$

          end{document}


          This way the unknowns are perfectly aligned to each other. The argument to system specifies the number of unknowns.



          enter image description here






          share|improve this answer































            3














            Rather than eliminating the space, I propose working instead to align columns in the systems of equations. Also, by making it one big math expression, the spacing also takes on a more natural appearance.



            documentclass{article}
            usepackage{array,amsmath,cancel,tabstackengine}
            setstacktabulargap{0pt}
            TABstackMath
            begin{document}
            noindent Example 1:
            \
            $left| tabularCenterstack{rrrl}{
            2x+&3y-&cancel{z}=&4 \
            3x+&2y+&cancel{z}=&6
            }right.
            rightarrow
            5x+5y=10 rightarrow
            x+y=2;
            left| tabularCenterstack{rrrl}{
            x-&y+&2z=&2 \
            3x+&2y-&z=&4 | .2
            }right.
            rightarrow$
            end{document}


            enter image description here






            share|improve this answer

































              2














              It is quite simple to type it with the systeme package:



              documentclass{article}
              usepackage{amsmath, cancel, systeme}

              begin{document}

              [ sysdelim | .
              systeme{2x + 3y-cancel z = 4,3x + 2y + z = 6} longrightarrow 5x + 5y = 10 longrightarrow x + y = 20 longrightarrow systeme{x-y + 2z = 2, 3x + 2y - z = 4|. 2} ]%

              end{document}


              enter image description here






              share|improve this answer































                1














                I suggest you load the mathtools package and use its matrix* environment instead of the second array, along with three well-placed phantom instructions. I would also replace .2 with cdot2.



                enter image description here



                documentclass{article}
                usepackage{cancel,mathtools}
                newcommandwideto{quadtoquad}

                begin{document}
                noindent
                Example 1:
                begin{align*}
                renewcommandarraystretch{1.333}
                &leftvertbegin{matrix}
                2x+3y-cancel{z}=4 \
                3x+2y+cancel{z}=6
                end{matrix}right.
                wideto
                5x+5y=10
                wideto
                x+y=2
                ; \
                &leftvertbegin{matrix*}[l]
                phantom{3}x-phantom{2}y+2z=2 \
                3x+2y-phantom{2}z=4 ;| cdot2, {}+{}
                end{matrix*}right.
                wideto
                7x+3y=10
                wideto
                x+tfrac{3}{7}y=tfrac{10}{7};
                end{align*}
                end{document}





                share|improve this answer

























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "85"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479129%2fspace-in-array-system-equations%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  4














                  You can better exploit array:



                  documentclass{article}
                  usepackage{amsmath,array,cancel}

                  newenvironment{system}[1]
                  {%
                  left|setlength{arraycolsep}{0pt}
                  begin{array}{ @{} *{numexpr2*#1relax}{ >{{}} r <{{}} } l @{} }%
                  }
                  {end{array}right.}

                  begin{document}

                  $begin{system}{3}
                  2x &+& 3y &-& cancel{z} &=& 4 \
                  3x &+& 2y &+& cancel{z} &=& 6
                  end{system}
                  rightarrow
                  5x+5y=10
                  rightarrow
                  x+y=2
                  rightarrow
                  begin{system}{3}
                  x &-& y &+& 2z &=& 2 \
                  3x &+& 2y &-& z &=&4 mid .2
                  end{system}$

                  end{document}


                  This way the unknowns are perfectly aligned to each other. The argument to system specifies the number of unknowns.



                  enter image description here






                  share|improve this answer




























                    4














                    You can better exploit array:



                    documentclass{article}
                    usepackage{amsmath,array,cancel}

                    newenvironment{system}[1]
                    {%
                    left|setlength{arraycolsep}{0pt}
                    begin{array}{ @{} *{numexpr2*#1relax}{ >{{}} r <{{}} } l @{} }%
                    }
                    {end{array}right.}

                    begin{document}

                    $begin{system}{3}
                    2x &+& 3y &-& cancel{z} &=& 4 \
                    3x &+& 2y &+& cancel{z} &=& 6
                    end{system}
                    rightarrow
                    5x+5y=10
                    rightarrow
                    x+y=2
                    rightarrow
                    begin{system}{3}
                    x &-& y &+& 2z &=& 2 \
                    3x &+& 2y &-& z &=&4 mid .2
                    end{system}$

                    end{document}


                    This way the unknowns are perfectly aligned to each other. The argument to system specifies the number of unknowns.



                    enter image description here






                    share|improve this answer


























                      4












                      4








                      4







                      You can better exploit array:



                      documentclass{article}
                      usepackage{amsmath,array,cancel}

                      newenvironment{system}[1]
                      {%
                      left|setlength{arraycolsep}{0pt}
                      begin{array}{ @{} *{numexpr2*#1relax}{ >{{}} r <{{}} } l @{} }%
                      }
                      {end{array}right.}

                      begin{document}

                      $begin{system}{3}
                      2x &+& 3y &-& cancel{z} &=& 4 \
                      3x &+& 2y &+& cancel{z} &=& 6
                      end{system}
                      rightarrow
                      5x+5y=10
                      rightarrow
                      x+y=2
                      rightarrow
                      begin{system}{3}
                      x &-& y &+& 2z &=& 2 \
                      3x &+& 2y &-& z &=&4 mid .2
                      end{system}$

                      end{document}


                      This way the unknowns are perfectly aligned to each other. The argument to system specifies the number of unknowns.



                      enter image description here






                      share|improve this answer













                      You can better exploit array:



                      documentclass{article}
                      usepackage{amsmath,array,cancel}

                      newenvironment{system}[1]
                      {%
                      left|setlength{arraycolsep}{0pt}
                      begin{array}{ @{} *{numexpr2*#1relax}{ >{{}} r <{{}} } l @{} }%
                      }
                      {end{array}right.}

                      begin{document}

                      $begin{system}{3}
                      2x &+& 3y &-& cancel{z} &=& 4 \
                      3x &+& 2y &+& cancel{z} &=& 6
                      end{system}
                      rightarrow
                      5x+5y=10
                      rightarrow
                      x+y=2
                      rightarrow
                      begin{system}{3}
                      x &-& y &+& 2z &=& 2 \
                      3x &+& 2y &-& z &=&4 mid .2
                      end{system}$

                      end{document}


                      This way the unknowns are perfectly aligned to each other. The argument to system specifies the number of unknowns.



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 9 hours ago









                      egregegreg

                      726k8819193228




                      726k8819193228























                          3














                          Rather than eliminating the space, I propose working instead to align columns in the systems of equations. Also, by making it one big math expression, the spacing also takes on a more natural appearance.



                          documentclass{article}
                          usepackage{array,amsmath,cancel,tabstackengine}
                          setstacktabulargap{0pt}
                          TABstackMath
                          begin{document}
                          noindent Example 1:
                          \
                          $left| tabularCenterstack{rrrl}{
                          2x+&3y-&cancel{z}=&4 \
                          3x+&2y+&cancel{z}=&6
                          }right.
                          rightarrow
                          5x+5y=10 rightarrow
                          x+y=2;
                          left| tabularCenterstack{rrrl}{
                          x-&y+&2z=&2 \
                          3x+&2y-&z=&4 | .2
                          }right.
                          rightarrow$
                          end{document}


                          enter image description here






                          share|improve this answer






























                            3














                            Rather than eliminating the space, I propose working instead to align columns in the systems of equations. Also, by making it one big math expression, the spacing also takes on a more natural appearance.



                            documentclass{article}
                            usepackage{array,amsmath,cancel,tabstackengine}
                            setstacktabulargap{0pt}
                            TABstackMath
                            begin{document}
                            noindent Example 1:
                            \
                            $left| tabularCenterstack{rrrl}{
                            2x+&3y-&cancel{z}=&4 \
                            3x+&2y+&cancel{z}=&6
                            }right.
                            rightarrow
                            5x+5y=10 rightarrow
                            x+y=2;
                            left| tabularCenterstack{rrrl}{
                            x-&y+&2z=&2 \
                            3x+&2y-&z=&4 | .2
                            }right.
                            rightarrow$
                            end{document}


                            enter image description here






                            share|improve this answer




























                              3












                              3








                              3







                              Rather than eliminating the space, I propose working instead to align columns in the systems of equations. Also, by making it one big math expression, the spacing also takes on a more natural appearance.



                              documentclass{article}
                              usepackage{array,amsmath,cancel,tabstackengine}
                              setstacktabulargap{0pt}
                              TABstackMath
                              begin{document}
                              noindent Example 1:
                              \
                              $left| tabularCenterstack{rrrl}{
                              2x+&3y-&cancel{z}=&4 \
                              3x+&2y+&cancel{z}=&6
                              }right.
                              rightarrow
                              5x+5y=10 rightarrow
                              x+y=2;
                              left| tabularCenterstack{rrrl}{
                              x-&y+&2z=&2 \
                              3x+&2y-&z=&4 | .2
                              }right.
                              rightarrow$
                              end{document}


                              enter image description here






                              share|improve this answer















                              Rather than eliminating the space, I propose working instead to align columns in the systems of equations. Also, by making it one big math expression, the spacing also takes on a more natural appearance.



                              documentclass{article}
                              usepackage{array,amsmath,cancel,tabstackengine}
                              setstacktabulargap{0pt}
                              TABstackMath
                              begin{document}
                              noindent Example 1:
                              \
                              $left| tabularCenterstack{rrrl}{
                              2x+&3y-&cancel{z}=&4 \
                              3x+&2y+&cancel{z}=&6
                              }right.
                              rightarrow
                              5x+5y=10 rightarrow
                              x+y=2;
                              left| tabularCenterstack{rrrl}{
                              x-&y+&2z=&2 \
                              3x+&2y-&z=&4 | .2
                              }right.
                              rightarrow$
                              end{document}


                              enter image description here







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 9 hours ago

























                              answered 9 hours ago









                              Steven B. SegletesSteven B. Segletes

                              158k9204411




                              158k9204411























                                  2














                                  It is quite simple to type it with the systeme package:



                                  documentclass{article}
                                  usepackage{amsmath, cancel, systeme}

                                  begin{document}

                                  [ sysdelim | .
                                  systeme{2x + 3y-cancel z = 4,3x + 2y + z = 6} longrightarrow 5x + 5y = 10 longrightarrow x + y = 20 longrightarrow systeme{x-y + 2z = 2, 3x + 2y - z = 4|. 2} ]%

                                  end{document}


                                  enter image description here






                                  share|improve this answer




























                                    2














                                    It is quite simple to type it with the systeme package:



                                    documentclass{article}
                                    usepackage{amsmath, cancel, systeme}

                                    begin{document}

                                    [ sysdelim | .
                                    systeme{2x + 3y-cancel z = 4,3x + 2y + z = 6} longrightarrow 5x + 5y = 10 longrightarrow x + y = 20 longrightarrow systeme{x-y + 2z = 2, 3x + 2y - z = 4|. 2} ]%

                                    end{document}


                                    enter image description here






                                    share|improve this answer


























                                      2












                                      2








                                      2







                                      It is quite simple to type it with the systeme package:



                                      documentclass{article}
                                      usepackage{amsmath, cancel, systeme}

                                      begin{document}

                                      [ sysdelim | .
                                      systeme{2x + 3y-cancel z = 4,3x + 2y + z = 6} longrightarrow 5x + 5y = 10 longrightarrow x + y = 20 longrightarrow systeme{x-y + 2z = 2, 3x + 2y - z = 4|. 2} ]%

                                      end{document}


                                      enter image description here






                                      share|improve this answer













                                      It is quite simple to type it with the systeme package:



                                      documentclass{article}
                                      usepackage{amsmath, cancel, systeme}

                                      begin{document}

                                      [ sysdelim | .
                                      systeme{2x + 3y-cancel z = 4,3x + 2y + z = 6} longrightarrow 5x + 5y = 10 longrightarrow x + y = 20 longrightarrow systeme{x-y + 2z = 2, 3x + 2y - z = 4|. 2} ]%

                                      end{document}


                                      enter image description here







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 6 hours ago









                                      BernardBernard

                                      173k776204




                                      173k776204























                                          1














                                          I suggest you load the mathtools package and use its matrix* environment instead of the second array, along with three well-placed phantom instructions. I would also replace .2 with cdot2.



                                          enter image description here



                                          documentclass{article}
                                          usepackage{cancel,mathtools}
                                          newcommandwideto{quadtoquad}

                                          begin{document}
                                          noindent
                                          Example 1:
                                          begin{align*}
                                          renewcommandarraystretch{1.333}
                                          &leftvertbegin{matrix}
                                          2x+3y-cancel{z}=4 \
                                          3x+2y+cancel{z}=6
                                          end{matrix}right.
                                          wideto
                                          5x+5y=10
                                          wideto
                                          x+y=2
                                          ; \
                                          &leftvertbegin{matrix*}[l]
                                          phantom{3}x-phantom{2}y+2z=2 \
                                          3x+2y-phantom{2}z=4 ;| cdot2, {}+{}
                                          end{matrix*}right.
                                          wideto
                                          7x+3y=10
                                          wideto
                                          x+tfrac{3}{7}y=tfrac{10}{7};
                                          end{align*}
                                          end{document}





                                          share|improve this answer






























                                            1














                                            I suggest you load the mathtools package and use its matrix* environment instead of the second array, along with three well-placed phantom instructions. I would also replace .2 with cdot2.



                                            enter image description here



                                            documentclass{article}
                                            usepackage{cancel,mathtools}
                                            newcommandwideto{quadtoquad}

                                            begin{document}
                                            noindent
                                            Example 1:
                                            begin{align*}
                                            renewcommandarraystretch{1.333}
                                            &leftvertbegin{matrix}
                                            2x+3y-cancel{z}=4 \
                                            3x+2y+cancel{z}=6
                                            end{matrix}right.
                                            wideto
                                            5x+5y=10
                                            wideto
                                            x+y=2
                                            ; \
                                            &leftvertbegin{matrix*}[l]
                                            phantom{3}x-phantom{2}y+2z=2 \
                                            3x+2y-phantom{2}z=4 ;| cdot2, {}+{}
                                            end{matrix*}right.
                                            wideto
                                            7x+3y=10
                                            wideto
                                            x+tfrac{3}{7}y=tfrac{10}{7};
                                            end{align*}
                                            end{document}





                                            share|improve this answer




























                                              1












                                              1








                                              1







                                              I suggest you load the mathtools package and use its matrix* environment instead of the second array, along with three well-placed phantom instructions. I would also replace .2 with cdot2.



                                              enter image description here



                                              documentclass{article}
                                              usepackage{cancel,mathtools}
                                              newcommandwideto{quadtoquad}

                                              begin{document}
                                              noindent
                                              Example 1:
                                              begin{align*}
                                              renewcommandarraystretch{1.333}
                                              &leftvertbegin{matrix}
                                              2x+3y-cancel{z}=4 \
                                              3x+2y+cancel{z}=6
                                              end{matrix}right.
                                              wideto
                                              5x+5y=10
                                              wideto
                                              x+y=2
                                              ; \
                                              &leftvertbegin{matrix*}[l]
                                              phantom{3}x-phantom{2}y+2z=2 \
                                              3x+2y-phantom{2}z=4 ;| cdot2, {}+{}
                                              end{matrix*}right.
                                              wideto
                                              7x+3y=10
                                              wideto
                                              x+tfrac{3}{7}y=tfrac{10}{7};
                                              end{align*}
                                              end{document}





                                              share|improve this answer















                                              I suggest you load the mathtools package and use its matrix* environment instead of the second array, along with three well-placed phantom instructions. I would also replace .2 with cdot2.



                                              enter image description here



                                              documentclass{article}
                                              usepackage{cancel,mathtools}
                                              newcommandwideto{quadtoquad}

                                              begin{document}
                                              noindent
                                              Example 1:
                                              begin{align*}
                                              renewcommandarraystretch{1.333}
                                              &leftvertbegin{matrix}
                                              2x+3y-cancel{z}=4 \
                                              3x+2y+cancel{z}=6
                                              end{matrix}right.
                                              wideto
                                              5x+5y=10
                                              wideto
                                              x+y=2
                                              ; \
                                              &leftvertbegin{matrix*}[l]
                                              phantom{3}x-phantom{2}y+2z=2 \
                                              3x+2y-phantom{2}z=4 ;| cdot2, {}+{}
                                              end{matrix*}right.
                                              wideto
                                              7x+3y=10
                                              wideto
                                              x+tfrac{3}{7}y=tfrac{10}{7};
                                              end{align*}
                                              end{document}






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited 7 hours ago

























                                              answered 9 hours ago









                                              MicoMico

                                              282k31386774




                                              282k31386774






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479129%2fspace-in-array-system-equations%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                                                  Alcedinidae

                                                  Can an atomic nucleus contain both particles and antiparticles? [duplicate]