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
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:
Any help will be greatly appreciated
equations split multline
add a comment |
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:
Any help will be greatly appreciated
equations split multline
add a comment |
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:
Any help will be greatly appreciated
equations split multline
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:
Any help will be greatly appreciated
equations split multline
equations split multline
asked 3 hours ago
user32147user32147
1361
1361
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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?

add a comment |
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

add a comment |
Here there is my proposal:

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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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?

add a comment |
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?

add a comment |
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?

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?

edited 2 hours ago
answered 2 hours ago
ZarkoZarko
134k872178
134k872178
add a comment |
add a comment |
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

add a comment |
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

add a comment |
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

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

answered 1 hour ago
BernardBernard
179k779211
179k779211
add a comment |
add a comment |
Here there is my proposal:

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
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
add a comment |
Here there is my proposal:

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
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
add a comment |
Here there is my proposal:

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
Here there is my proposal:

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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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