Multiple alignment in math mode without much space

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
7
down vote

favorite












There are several post on multiple alignments, but I cant find a solution regarding my problem.



%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument


I am using the following code and I want to multiple align the staments that are following after the comma and quad. I tried to multilpe align them with && but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.










share|improve this question

















  • 2




    If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
    – moewe
    Aug 15 at 11:17






  • 1




    That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
    – moewe
    Aug 15 at 11:18














up vote
7
down vote

favorite












There are several post on multiple alignments, but I cant find a solution regarding my problem.



%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument


I am using the following code and I want to multiple align the staments that are following after the comma and quad. I tried to multilpe align them with && but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.










share|improve this question

















  • 2




    If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
    – moewe
    Aug 15 at 11:17






  • 1




    That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
    – moewe
    Aug 15 at 11:18












up vote
7
down vote

favorite









up vote
7
down vote

favorite











There are several post on multiple alignments, but I cant find a solution regarding my problem.



%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument


I am using the following code and I want to multiple align the staments that are following after the comma and quad. I tried to multilpe align them with && but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.










share|improve this question













There are several post on multiple alignments, but I cant find a solution regarding my problem.



%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument


I am using the following code and I want to multiple align the staments that are following after the comma and quad. I tried to multilpe align them with && but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.







math-mode equations align






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 15 at 11:10









rook1996

994




994







  • 2




    If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
    – moewe
    Aug 15 at 11:17






  • 1




    That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
    – moewe
    Aug 15 at 11:18












  • 2




    If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
    – moewe
    Aug 15 at 11:17






  • 1




    That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
    – moewe
    Aug 15 at 11:18







2




2




If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
– moewe
Aug 15 at 11:17




If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
– moewe
Aug 15 at 11:17




1




1




That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
– moewe
Aug 15 at 11:18




That said, maybe alignat is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
– moewe
Aug 15 at 11:18










4 Answers
4






active

oldest

votes

















up vote
10
down vote



accepted










For multiple alignment points you can use alignat:




enter image description here




documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat

begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument





share|improve this answer
















  • 1




    Ummm, you were 30 sec faster ...
    – AboAmmar
    Aug 15 at 11:21










  • @AboAmmar It happens ;)
    – Phelype Oleinik
    Aug 15 at 11:25

















up vote
7
down vote













The flalign environment’s name means full length align, which means that the whole line width will be used when there is more than one alignment point.



In order to control the alignment you can use alignat or just align if you don't want to bother.



%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument

sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*

sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*

enddocument


enter image description here



A few points to note.




  1. latin1 is not “for Windows”. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.

  2. The options bibtotocnumbered and liststotoc are deprecated.


  3. underbrace<code>_<code> should be braced in order to keep the correct spacing, so underbrace<code>_<code>.

  4. Never use ... in the input, but dots or, if needed, one among dotsc, dotsb or dotsm (see Difference of the dots*).





share|improve this answer




















  • Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
    – rook1996
    Aug 21 at 12:52







  • 1




    @rook1996 I’ll check later
    – egreg
    Aug 21 at 13:20










  • @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
    – egreg
    Aug 21 at 18:59










  • just need it for the Appendix part and not global
    – rook1996
    Aug 21 at 19:00






  • 1




    @rook1996 Sorry, the correct command is fleqn[0pt]
    – egreg
    Aug 22 at 14:43

















up vote
6
down vote













You need alignat*:



documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat


begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument



enter image description here







share|improve this answer






















  • I'll give you +1 for the slowness :-) of 30 sec.
    – Sebastiano
    Aug 15 at 11:28











  • Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
    – AboAmmar
    Aug 15 at 11:42

















up vote
4
down vote













Some layout improvements (at least for my taste): I used underbracket from mathtools in preference to underbrace which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines (from mathtools again) – this adds another column in alignat. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm.



documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools

newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat

begindocument

beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*

enddocument


enter image description here






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f446117%2fmultiple-alignment-in-math-mode-without-much-space%23new-answer', 'question_page');

    );

    Post as a guest






























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    10
    down vote



    accepted










    For multiple alignment points you can use alignat:




    enter image description here




    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat

    begindocument
    beginalignat*2
    Xty-XtXbetahat & = lambda s\
    Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
    endalignat*
    enddocument





    share|improve this answer
















    • 1




      Ummm, you were 30 sec faster ...
      – AboAmmar
      Aug 15 at 11:21










    • @AboAmmar It happens ;)
      – Phelype Oleinik
      Aug 15 at 11:25














    up vote
    10
    down vote



    accepted










    For multiple alignment points you can use alignat:




    enter image description here




    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat

    begindocument
    beginalignat*2
    Xty-XtXbetahat & = lambda s\
    Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
    endalignat*
    enddocument





    share|improve this answer
















    • 1




      Ummm, you were 30 sec faster ...
      – AboAmmar
      Aug 15 at 11:21










    • @AboAmmar It happens ;)
      – Phelype Oleinik
      Aug 15 at 11:25












    up vote
    10
    down vote



    accepted







    up vote
    10
    down vote



    accepted






    For multiple alignment points you can use alignat:




    enter image description here




    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat

    begindocument
    beginalignat*2
    Xty-XtXbetahat & = lambda s\
    Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
    endalignat*
    enddocument





    share|improve this answer












    For multiple alignment points you can use alignat:




    enter image description here




    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat

    begindocument
    beginalignat*2
    Xty-XtXbetahat & = lambda s\
    Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
    endalignat*
    enddocument






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 15 at 11:17









    Phelype Oleinik

    16.7k33668




    16.7k33668







    • 1




      Ummm, you were 30 sec faster ...
      – AboAmmar
      Aug 15 at 11:21










    • @AboAmmar It happens ;)
      – Phelype Oleinik
      Aug 15 at 11:25












    • 1




      Ummm, you were 30 sec faster ...
      – AboAmmar
      Aug 15 at 11:21










    • @AboAmmar It happens ;)
      – Phelype Oleinik
      Aug 15 at 11:25







    1




    1




    Ummm, you were 30 sec faster ...
    – AboAmmar
    Aug 15 at 11:21




    Ummm, you were 30 sec faster ...
    – AboAmmar
    Aug 15 at 11:21












    @AboAmmar It happens ;)
    – Phelype Oleinik
    Aug 15 at 11:25




    @AboAmmar It happens ;)
    – Phelype Oleinik
    Aug 15 at 11:25










    up vote
    7
    down vote













    The flalign environment’s name means full length align, which means that the whole line width will be used when there is more than one alignment point.



    In order to control the alignment you can use alignat or just align if you don't want to bother.



    %%%%% Dokumentenklasse mit verschiedenen Attributen
    documentclass[a4paper, abstracton,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    %usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument

    sectiontextttalignat
    beginalignat*2
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    &quad& s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    &quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    &quad& forall j in 1,dots,p
    endalignat*

    sectiontextttalign
    beginalign*
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    && s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    && s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    && forall j in 1,dots,p
    endalign*

    enddocument


    enter image description here



    A few points to note.




    1. latin1 is not “for Windows”. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.

    2. The options bibtotocnumbered and liststotoc are deprecated.


    3. underbrace<code>_<code> should be braced in order to keep the correct spacing, so underbrace<code>_<code>.

    4. Never use ... in the input, but dots or, if needed, one among dotsc, dotsb or dotsm (see Difference of the dots*).





    share|improve this answer




















    • Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
      – rook1996
      Aug 21 at 12:52







    • 1




      @rook1996 I’ll check later
      – egreg
      Aug 21 at 13:20










    • @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
      – egreg
      Aug 21 at 18:59










    • just need it for the Appendix part and not global
      – rook1996
      Aug 21 at 19:00






    • 1




      @rook1996 Sorry, the correct command is fleqn[0pt]
      – egreg
      Aug 22 at 14:43














    up vote
    7
    down vote













    The flalign environment’s name means full length align, which means that the whole line width will be used when there is more than one alignment point.



    In order to control the alignment you can use alignat or just align if you don't want to bother.



    %%%%% Dokumentenklasse mit verschiedenen Attributen
    documentclass[a4paper, abstracton,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    %usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument

    sectiontextttalignat
    beginalignat*2
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    &quad& s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    &quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    &quad& forall j in 1,dots,p
    endalignat*

    sectiontextttalign
    beginalign*
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    && s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    && s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    && forall j in 1,dots,p
    endalign*

    enddocument


    enter image description here



    A few points to note.




    1. latin1 is not “for Windows”. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.

    2. The options bibtotocnumbered and liststotoc are deprecated.


    3. underbrace<code>_<code> should be braced in order to keep the correct spacing, so underbrace<code>_<code>.

    4. Never use ... in the input, but dots or, if needed, one among dotsc, dotsb or dotsm (see Difference of the dots*).





    share|improve this answer




















    • Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
      – rook1996
      Aug 21 at 12:52







    • 1




      @rook1996 I’ll check later
      – egreg
      Aug 21 at 13:20










    • @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
      – egreg
      Aug 21 at 18:59










    • just need it for the Appendix part and not global
      – rook1996
      Aug 21 at 19:00






    • 1




      @rook1996 Sorry, the correct command is fleqn[0pt]
      – egreg
      Aug 22 at 14:43












    up vote
    7
    down vote










    up vote
    7
    down vote









    The flalign environment’s name means full length align, which means that the whole line width will be used when there is more than one alignment point.



    In order to control the alignment you can use alignat or just align if you don't want to bother.



    %%%%% Dokumentenklasse mit verschiedenen Attributen
    documentclass[a4paper, abstracton,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    %usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument

    sectiontextttalignat
    beginalignat*2
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    &quad& s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    &quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    &quad& forall j in 1,dots,p
    endalignat*

    sectiontextttalign
    beginalign*
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    && s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    && s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    && forall j in 1,dots,p
    endalign*

    enddocument


    enter image description here



    A few points to note.




    1. latin1 is not “for Windows”. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.

    2. The options bibtotocnumbered and liststotoc are deprecated.


    3. underbrace<code>_<code> should be braced in order to keep the correct spacing, so underbrace<code>_<code>.

    4. Never use ... in the input, but dots or, if needed, one among dotsc, dotsb or dotsm (see Difference of the dots*).





    share|improve this answer












    The flalign environment’s name means full length align, which means that the whole line width will be used when there is more than one alignment point.



    In order to control the alignment you can use alignat or just align if you don't want to bother.



    %%%%% Dokumentenklasse mit verschiedenen Attributen
    documentclass[a4paper, abstracton,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    %usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument

    sectiontextttalignat
    beginalignat*2
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    &quad& s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    &quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    &quad& forall j in 1,dots,p
    endalignat*

    sectiontextttalign
    beginalign*
    Xty-XtXbetahat
    &= lambda s\
    Leftrightarrow underbraceXt y_p times 1
    &= underbracevphantom Xt y lambda s_p times 1,
    && s in [-1,1]^p \
    intertextDas $j$-te Element entspricht
    xt_jy
    &= lambda s_j,
    && s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy|
    &leq lambda,
    && forall j in 1,dots,p
    endalign*

    enddocument


    enter image description here



    A few points to note.




    1. latin1 is not “for Windows”. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.

    2. The options bibtotocnumbered and liststotoc are deprecated.


    3. underbrace<code>_<code> should be braced in order to keep the correct spacing, so underbrace<code>_<code>.

    4. Never use ... in the input, but dots or, if needed, one among dotsc, dotsb or dotsm (see Difference of the dots*).






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 15 at 11:30









    egreg

    683k8418193064




    683k8418193064











    • Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
      – rook1996
      Aug 21 at 12:52







    • 1




      @rook1996 I’ll check later
      – egreg
      Aug 21 at 13:20










    • @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
      – egreg
      Aug 21 at 18:59










    • just need it for the Appendix part and not global
      – rook1996
      Aug 21 at 19:00






    • 1




      @rook1996 Sorry, the correct command is fleqn[0pt]
      – egreg
      Aug 22 at 14:43
















    • Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
      – rook1996
      Aug 21 at 12:52







    • 1




      @rook1996 I’ll check later
      – egreg
      Aug 21 at 13:20










    • @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
      – egreg
      Aug 21 at 18:59










    • just need it for the Appendix part and not global
      – rook1996
      Aug 21 at 19:00






    • 1




      @rook1996 Sorry, the correct command is fleqn[0pt]
      – egreg
      Aug 22 at 14:43















    Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
    – rook1996
    Aug 21 at 12:52





    Based on your post here tex.stackexchange.com/questions/446939/…, how can I left aligned all the first equation inside alignat
    – rook1996
    Aug 21 at 12:52





    1




    1




    @rook1996 I’ll check later
    – egreg
    Aug 21 at 13:20




    @rook1996 I’ll check later
    – egreg
    Aug 21 at 13:20












    @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
    – egreg
    Aug 21 at 18:59




    @rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the fleqn option.
    – egreg
    Aug 21 at 18:59












    just need it for the Appendix part and not global
    – rook1996
    Aug 21 at 19:00




    just need it for the Appendix part and not global
    – rook1996
    Aug 21 at 19:00




    1




    1




    @rook1996 Sorry, the correct command is fleqn[0pt]
    – egreg
    Aug 22 at 14:43




    @rook1996 Sorry, the correct command is fleqn[0pt]
    – egreg
    Aug 22 at 14:43










    up vote
    6
    down vote













    You need alignat*:



    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument
    beginalignat*2
    Xty-XtXbetahat &= lambda s && \
    Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
    endalignat*
    enddocument



    enter image description here







    share|improve this answer






















    • I'll give you +1 for the slowness :-) of 30 sec.
      – Sebastiano
      Aug 15 at 11:28











    • Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
      – AboAmmar
      Aug 15 at 11:42














    up vote
    6
    down vote













    You need alignat*:



    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument
    beginalignat*2
    Xty-XtXbetahat &= lambda s && \
    Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
    endalignat*
    enddocument



    enter image description here







    share|improve this answer






















    • I'll give you +1 for the slowness :-) of 30 sec.
      – Sebastiano
      Aug 15 at 11:28











    • Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
      – AboAmmar
      Aug 15 at 11:42












    up vote
    6
    down vote










    up vote
    6
    down vote









    You need alignat*:



    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument
    beginalignat*2
    Xty-XtXbetahat &= lambda s && \
    Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
    endalignat*
    enddocument



    enter image description here







    share|improve this answer














    You need alignat*:



    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[latin1]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackageamsthm
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathbfT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathbfT%Regressor von X
    newcommandbetahathatbeta %betahat


    begindocument
    beginalignat*2
    Xty-XtXbetahat &= lambda s && \
    Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
    endalignat*
    enddocument



    enter image description here








    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 15 at 11:28

























    answered Aug 15 at 11:18









    AboAmmar

    30.5k22780




    30.5k22780











    • I'll give you +1 for the slowness :-) of 30 sec.
      – Sebastiano
      Aug 15 at 11:28











    • Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
      – AboAmmar
      Aug 15 at 11:42
















    • I'll give you +1 for the slowness :-) of 30 sec.
      – Sebastiano
      Aug 15 at 11:28











    • Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
      – AboAmmar
      Aug 15 at 11:42















    I'll give you +1 for the slowness :-) of 30 sec.
    – Sebastiano
    Aug 15 at 11:28





    I'll give you +1 for the slowness :-) of 30 sec.
    – Sebastiano
    Aug 15 at 11:28













    Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
    – AboAmmar
    Aug 15 at 11:42




    Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
    – AboAmmar
    Aug 15 at 11:42










    up vote
    4
    down vote













    Some layout improvements (at least for my taste): I used underbracket from mathtools in preference to underbrace which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines (from mathtools again) – this adds another column in alignat. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm.



    documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

    %%%%% Betriebssystemabhängige Eingabedekodierung
    usepackage[T1]fontenc
    usepackage[utf8]inputenc %% für Windows
    usepackage[ngerman]babel
    usepackagemathtools

    newcommandmatr[1]mathbf#1
    newcommandXmatrX %Matrix von X
    newcommandymatry %y als voller Vektor
    newcommandXtX^mathrmT %Matrix von X
    newcommandxmatrx%Regressor von X
    newcommandxtx^mathrmT%Regressor von X
    newcommandbetahathatbeta %betahat

    begindocument

    beginalignat*3
    & & Xty-XtXbetahat & = lambda s\
    ArrowBetweenLines
    & & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
    intertexttextnormalDas $j$-te Element entspricht
    & & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
    ArrowBetweenLines
    & & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
    endalignat*

    enddocument


    enter image description here






    share|improve this answer
























      up vote
      4
      down vote













      Some layout improvements (at least for my taste): I used underbracket from mathtools in preference to underbrace which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines (from mathtools again) – this adds another column in alignat. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm.



      documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

      %%%%% Betriebssystemabhängige Eingabedekodierung
      usepackage[T1]fontenc
      usepackage[utf8]inputenc %% für Windows
      usepackage[ngerman]babel
      usepackagemathtools

      newcommandmatr[1]mathbf#1
      newcommandXmatrX %Matrix von X
      newcommandymatry %y als voller Vektor
      newcommandXtX^mathrmT %Matrix von X
      newcommandxmatrx%Regressor von X
      newcommandxtx^mathrmT%Regressor von X
      newcommandbetahathatbeta %betahat

      begindocument

      beginalignat*3
      & & Xty-XtXbetahat & = lambda s\
      ArrowBetweenLines
      & & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
      intertexttextnormalDas $j$-te Element entspricht
      & & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
      ArrowBetweenLines
      & & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
      endalignat*

      enddocument


      enter image description here






      share|improve this answer






















        up vote
        4
        down vote










        up vote
        4
        down vote









        Some layout improvements (at least for my taste): I used underbracket from mathtools in preference to underbrace which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines (from mathtools again) – this adds another column in alignat. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm.



        documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

        %%%%% Betriebssystemabhängige Eingabedekodierung
        usepackage[T1]fontenc
        usepackage[utf8]inputenc %% für Windows
        usepackage[ngerman]babel
        usepackagemathtools

        newcommandmatr[1]mathbf#1
        newcommandXmatrX %Matrix von X
        newcommandymatry %y als voller Vektor
        newcommandXtX^mathrmT %Matrix von X
        newcommandxmatrx%Regressor von X
        newcommandxtx^mathrmT%Regressor von X
        newcommandbetahathatbeta %betahat

        begindocument

        beginalignat*3
        & & Xty-XtXbetahat & = lambda s\
        ArrowBetweenLines
        & & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
        intertexttextnormalDas $j$-te Element entspricht
        & & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
        ArrowBetweenLines
        & & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
        endalignat*

        enddocument


        enter image description here






        share|improve this answer












        Some layout improvements (at least for my taste): I used underbracket from mathtools in preference to underbrace which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines (from mathtools again) – this adds another column in alignat. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm.



        documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl

        %%%%% Betriebssystemabhängige Eingabedekodierung
        usepackage[T1]fontenc
        usepackage[utf8]inputenc %% für Windows
        usepackage[ngerman]babel
        usepackagemathtools

        newcommandmatr[1]mathbf#1
        newcommandXmatrX %Matrix von X
        newcommandymatry %y als voller Vektor
        newcommandXtX^mathrmT %Matrix von X
        newcommandxmatrx%Regressor von X
        newcommandxtx^mathrmT%Regressor von X
        newcommandbetahathatbeta %betahat

        begindocument

        beginalignat*3
        & & Xty-XtXbetahat & = lambda s\
        ArrowBetweenLines
        & & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
        intertexttextnormalDas $j$-te Element entspricht
        & & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
        ArrowBetweenLines
        & & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
        endalignat*

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 15 at 11:59









        Bernard

        156k763189




        156k763189



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446117%2fmultiple-alignment-in-math-mode-without-much-space%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay