multiline equation inside a matrix that is a part of multiline equationMultiline equation and textMultiline equation with LHS alone on first line?Multiline equation without numbermultiline equation inside newglossaryentryAligning equation including multiline expressionsAligning Multiline Matrix EquationsMultiline equation inside a split environmentWriting matrix inside an equationSplitting a long text in an equationProblem splitting/fitting equation

Why use a retrograde orbit?

How can I fix the label locations on my tikzcd diagram?

Is Big Ben visible from the British museum?

Capital gains on stocks sold to take initial investment off the table

How do Ctrl+C and Ctrl+V work?

Why is so much ransomware breakable?

Deleting the same lines from a list

How can I make dummy text (like lipsum) grey?

A person lacking money who shows off a lot

What dog breeds survive the apocalypse for generations?

Why did the soldiers of the North disobey Jon?

Have there been any examples of re-usable rockets in the past?

Why is the A380’s with-reversers stopping distance the same as its no-reversers stopping distance?

What kind of environment would favor hermaphroditism in a sentient species over regular, old sexes?

Does Cersei deserve to be called a tyrant?

I recently started my machine learning PhD and I have absolutely no idea what I'm doing

When the match time is called, does the current turn end immediately?

Would life always name the light from their sun "white"

Polynomial division: Is this trick obvious?

What is the conversion rate for Sorcery Points to Spell Points?

​Cuban​ ​Primes

Can a person still be an Orthodox Jew and believe that the Torah contains narratives that are not scientifically correct?

How was the blinking terminal cursor invented?

Omit property variable when using object destructuring



multiline equation inside a matrix that is a part of multiline equation


Multiline equation and textMultiline equation with LHS alone on first line?Multiline equation without numbermultiline equation inside newglossaryentryAligning equation including multiline expressionsAligning Multiline Matrix EquationsMultiline equation inside a split environmentWriting matrix inside an equationSplitting a long text in an equationProblem splitting/fitting equation













1















I have an equation split to multiple lines.
But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
How do I further split the equations in the vector so that they do go over margin and look visually pleasing?



beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
&=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
endsplit
endequation


Current output looks like below where good portion of equations go over margin:
enter image description here



Any help will be greatly appreciated










share|improve this question


























    1















    I have an equation split to multiple lines.
    But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
    How do I further split the equations in the vector so that they do go over margin and look visually pleasing?



    beginequation labeleq:7
    beginsplit
    mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
    &=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
    endsplit
    endequation


    Current output looks like below where good portion of equations go over margin:
    enter image description here



    Any help will be greatly appreciated










    share|improve this question
























      1












      1








      1








      I have an equation split to multiple lines.
      But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
      How do I further split the equations in the vector so that they do go over margin and look visually pleasing?



      beginequation labeleq:7
      beginsplit
      mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
      &=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
      endsplit
      endequation


      Current output looks like below where good portion of equations go over margin:
      enter image description here



      Any help will be greatly appreciated










      share|improve this question














      I have an equation split to multiple lines.
      But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
      How do I further split the equations in the vector so that they do go over margin and look visually pleasing?



      beginequation labeleq:7
      beginsplit
      mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
      &=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
      endsplit
      endequation


      Current output looks like below where good portion of equations go over margin:
      enter image description here



      Any help will be greatly appreciated







      equations split multline






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      user32147user32147

      1361




      1361




















          3 Answers
          3






          active

          oldest

          votes


















          4














          You can break lines within a matrix by useing of multlined from the mathtools package:



          documentclassarticle
          usepackagegeometry
          usepackagemathtools

          begindocument
          beginequation labeleq:7
          beginsplit
          mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
          & = beginbmatrix
          beginmultlined
          tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
          + w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
          endmultlined \[4ex]
          %
          beginmultlined
          tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
          + w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
          endmultlined
          endbmatrix.
          endsplit
          endequation
          enddocument


          note: I try to fix of use Big( and big(. More correct is Bigl( and bigl( and Bigr) and bigr). most of the math operators are defined, so instead ˙tanh you should use tanh which write it correct mathrm font. I also reduce width of cdots enclosing them in curly braces. Do you really need them?



          enter image description here






          share|improve this answer
































            2














            I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdots (unnecessary, from my point of view) and used the mmatrix (medium-size matrix) environment from nccmath, and the fleqn environment (same package). This size remains readable, as it is ~80 % of displaystyle.



            documentclassarticle
            usepackage[showframe]geometry
            usepackagemathtools, nccmath

            begindocument
            vspace*1cm
            beginfleqn

            beginequation
            beginaligned[b] labeleq:7
            &mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
            & beginmmatrix beginbmatrix
            tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
            + w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
            \
            %
            tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
            + w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
            endbmatrix
            endmmatrix
            endaligned
            endequation
            endfleqn

            enddocument


            enter image description here






            share|improve this answer






























              0














              Here there is my proposal:



              enter image description here



              documentclass[a4paper,12pt]article
              usepackagemathtools,amssymb
              usepackage[left=1in,right=.3in]geometry

              begindocument
              beginequation labeleq:7
              beginaligned
              mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
              &=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
              tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
              endaligned
              endequation

              where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
              enddocument





              share|improve this answer

























              • i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                – Zarko
                2 hours ago











              • @Zarko I have edited my code. Maybe this one's better.

                – Sebastiano
                17 mins ago











              • To the downvoter: what is the reason for your negative vote?

                – Sebastiano
                15 mins ago











              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%2f491032%2fmultiline-equation-inside-a-matrix-that-is-a-part-of-multiline-equation%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              You can break lines within a matrix by useing of multlined from the mathtools package:



              documentclassarticle
              usepackagegeometry
              usepackagemathtools

              begindocument
              beginequation labeleq:7
              beginsplit
              mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
              & = beginbmatrix
              beginmultlined
              tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
              + w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
              endmultlined \[4ex]
              %
              beginmultlined
              tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
              + w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
              endmultlined
              endbmatrix.
              endsplit
              endequation
              enddocument


              note: I try to fix of use Big( and big(. More correct is Bigl( and bigl( and Bigr) and bigr). most of the math operators are defined, so instead ˙tanh you should use tanh which write it correct mathrm font. I also reduce width of cdots enclosing them in curly braces. Do you really need them?



              enter image description here






              share|improve this answer





























                4














                You can break lines within a matrix by useing of multlined from the mathtools package:



                documentclassarticle
                usepackagegeometry
                usepackagemathtools

                begindocument
                beginequation labeleq:7
                beginsplit
                mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
                & = beginbmatrix
                beginmultlined
                tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                + w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
                endmultlined \[4ex]
                %
                beginmultlined
                tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                + w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
                endmultlined
                endbmatrix.
                endsplit
                endequation
                enddocument


                note: I try to fix of use Big( and big(. More correct is Bigl( and bigl( and Bigr) and bigr). most of the math operators are defined, so instead ˙tanh you should use tanh which write it correct mathrm font. I also reduce width of cdots enclosing them in curly braces. Do you really need them?



                enter image description here






                share|improve this answer



























                  4












                  4








                  4







                  You can break lines within a matrix by useing of multlined from the mathtools package:



                  documentclassarticle
                  usepackagegeometry
                  usepackagemathtools

                  begindocument
                  beginequation labeleq:7
                  beginsplit
                  mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
                  & = beginbmatrix
                  beginmultlined
                  tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                  + w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
                  endmultlined \[4ex]
                  %
                  beginmultlined
                  tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                  + w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
                  endmultlined
                  endbmatrix.
                  endsplit
                  endequation
                  enddocument


                  note: I try to fix of use Big( and big(. More correct is Bigl( and bigl( and Bigr) and bigr). most of the math operators are defined, so instead ˙tanh you should use tanh which write it correct mathrm font. I also reduce width of cdots enclosing them in curly braces. Do you really need them?



                  enter image description here






                  share|improve this answer















                  You can break lines within a matrix by useing of multlined from the mathtools package:



                  documentclassarticle
                  usepackagegeometry
                  usepackagemathtools

                  begindocument
                  beginequation labeleq:7
                  beginsplit
                  mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
                  & = beginbmatrix
                  beginmultlined
                  tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                  + w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
                  endmultlined \[4ex]
                  %
                  beginmultlined
                  tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
                  + w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
                  endmultlined
                  endbmatrix.
                  endsplit
                  endequation
                  enddocument


                  note: I try to fix of use Big( and big(. More correct is Bigl( and bigl( and Bigr) and bigr). most of the math operators are defined, so instead ˙tanh you should use tanh which write it correct mathrm font. I also reduce width of cdots enclosing them in curly braces. Do you really need them?



                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 2 hours ago

























                  answered 2 hours ago









                  ZarkoZarko

                  134k872178




                  134k872178





















                      2














                      I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdots (unnecessary, from my point of view) and used the mmatrix (medium-size matrix) environment from nccmath, and the fleqn environment (same package). This size remains readable, as it is ~80 % of displaystyle.



                      documentclassarticle
                      usepackage[showframe]geometry
                      usepackagemathtools, nccmath

                      begindocument
                      vspace*1cm
                      beginfleqn

                      beginequation
                      beginaligned[b] labeleq:7
                      &mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
                      & beginmmatrix beginbmatrix
                      tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                      + w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
                      \
                      %
                      tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                      + w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
                      endbmatrix
                      endmmatrix
                      endaligned
                      endequation
                      endfleqn

                      enddocument


                      enter image description here






                      share|improve this answer



























                        2














                        I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdots (unnecessary, from my point of view) and used the mmatrix (medium-size matrix) environment from nccmath, and the fleqn environment (same package). This size remains readable, as it is ~80 % of displaystyle.



                        documentclassarticle
                        usepackage[showframe]geometry
                        usepackagemathtools, nccmath

                        begindocument
                        vspace*1cm
                        beginfleqn

                        beginequation
                        beginaligned[b] labeleq:7
                        &mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
                        & beginmmatrix beginbmatrix
                        tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                        + w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
                        \
                        %
                        tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                        + w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
                        endbmatrix
                        endmmatrix
                        endaligned
                        endequation
                        endfleqn

                        enddocument


                        enter image description here






                        share|improve this answer

























                          2












                          2








                          2







                          I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdots (unnecessary, from my point of view) and used the mmatrix (medium-size matrix) environment from nccmath, and the fleqn environment (same package). This size remains readable, as it is ~80 % of displaystyle.



                          documentclassarticle
                          usepackage[showframe]geometry
                          usepackagemathtools, nccmath

                          begindocument
                          vspace*1cm
                          beginfleqn

                          beginequation
                          beginaligned[b] labeleq:7
                          &mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
                          & beginmmatrix beginbmatrix
                          tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                          + w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
                          \
                          %
                          tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                          + w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
                          endbmatrix
                          endmmatrix
                          endaligned
                          endequation
                          endfleqn

                          enddocument


                          enter image description here






                          share|improve this answer













                          I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdots (unnecessary, from my point of view) and used the mmatrix (medium-size matrix) environment from nccmath, and the fleqn environment (same package). This size remains readable, as it is ~80 % of displaystyle.



                          documentclassarticle
                          usepackage[showframe]geometry
                          usepackagemathtools, nccmath

                          begindocument
                          vspace*1cm
                          beginfleqn

                          beginequation
                          beginaligned[b] labeleq:7
                          &mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
                          & beginmmatrix beginbmatrix
                          tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                          + w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
                          \
                          %
                          tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
                          + w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
                          endbmatrix
                          endmmatrix
                          endaligned
                          endequation
                          endfleqn

                          enddocument


                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 1 hour ago









                          BernardBernard

                          179k779211




                          179k779211





















                              0














                              Here there is my proposal:



                              enter image description here



                              documentclass[a4paper,12pt]article
                              usepackagemathtools,amssymb
                              usepackage[left=1in,right=.3in]geometry

                              begindocument
                              beginequation labeleq:7
                              beginaligned
                              mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
                              &=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
                              tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
                              endaligned
                              endequation

                              where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
                              enddocument





                              share|improve this answer

























                              • i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                                – Zarko
                                2 hours ago











                              • @Zarko I have edited my code. Maybe this one's better.

                                – Sebastiano
                                17 mins ago











                              • To the downvoter: what is the reason for your negative vote?

                                – Sebastiano
                                15 mins ago















                              0














                              Here there is my proposal:



                              enter image description here



                              documentclass[a4paper,12pt]article
                              usepackagemathtools,amssymb
                              usepackage[left=1in,right=.3in]geometry

                              begindocument
                              beginequation labeleq:7
                              beginaligned
                              mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
                              &=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
                              tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
                              endaligned
                              endequation

                              where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
                              enddocument





                              share|improve this answer

























                              • i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                                – Zarko
                                2 hours ago











                              • @Zarko I have edited my code. Maybe this one's better.

                                – Sebastiano
                                17 mins ago











                              • To the downvoter: what is the reason for your negative vote?

                                – Sebastiano
                                15 mins ago













                              0












                              0








                              0







                              Here there is my proposal:



                              enter image description here



                              documentclass[a4paper,12pt]article
                              usepackagemathtools,amssymb
                              usepackage[left=1in,right=.3in]geometry

                              begindocument
                              beginequation labeleq:7
                              beginaligned
                              mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
                              &=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
                              tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
                              endaligned
                              endequation

                              where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
                              enddocument





                              share|improve this answer















                              Here there is my proposal:



                              enter image description here



                              documentclass[a4paper,12pt]article
                              usepackagemathtools,amssymb
                              usepackage[left=1in,right=.3in]geometry

                              begindocument
                              beginequation labeleq:7
                              beginaligned
                              mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
                              &=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
                              tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
                              endaligned
                              endequation

                              where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
                              enddocument






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 3 mins ago

























                              answered 2 hours ago









                              SebastianoSebastiano

                              12.2k42467




                              12.2k42467












                              • i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                                – Zarko
                                2 hours ago











                              • @Zarko I have edited my code. Maybe this one's better.

                                – Sebastiano
                                17 mins ago











                              • To the downvoter: what is the reason for your negative vote?

                                – Sebastiano
                                15 mins ago

















                              • i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                                – Zarko
                                2 hours ago











                              • @Zarko I have edited my code. Maybe this one's better.

                                – Sebastiano
                                17 mins ago











                              • To the downvoter: what is the reason for your negative vote?

                                – Sebastiano
                                15 mins ago
















                              i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                              – Zarko
                              2 hours ago





                              i see, that now i need new glasses :-). fonts are so tiny ... anyway +1

                              – Zarko
                              2 hours ago













                              @Zarko I have edited my code. Maybe this one's better.

                              – Sebastiano
                              17 mins ago





                              @Zarko I have edited my code. Maybe this one's better.

                              – Sebastiano
                              17 mins ago













                              To the downvoter: what is the reason for your negative vote?

                              – Sebastiano
                              15 mins ago





                              To the downvoter: what is the reason for your negative vote?

                              – Sebastiano
                              15 mins ago

















                              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%2f491032%2fmultiline-equation-inside-a-matrix-that-is-a-part-of-multiline-equation%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

                              Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                              Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                              François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480