How to write the block matrix in LaTex? [duplicate]Highlight elements in the matrixAligning equations with text with alignatMatrix environments not workingnewcommand for bmatrix of features using pgffor throws missing endgroup errorLeft align text in equation environment (no use of align environment)Obtaining a properly aligned complex matrixXparse k argument to parse options at end of environmentHow to represent the following border matrix in latex?How to write the following mathematical expression in LaTeX?“Missing '' inserted” and “Missing inserted” with aligned environmentHow to get my matrix to fit inside the width of the text block?

Why did they use ultrafast diodes in a 50 or 60 Hz bridge?

What makes a character irredeemable?

When Vesuvan Shapeshifter copies turn face up replacement effects, why do they work?

Why do popular TCP-using services have UDP as well as TCP entries in /etc/services?

Can a passenger predict that an airline or a tour operator is about to go bankrupt?

Is there a pattern for handling conflicting function parameters?

Does the US Armed Forces refuse to recruit anyone with an IQ less than 83?

Could the Queen overturn the UK Supreme Court ruling regarding prorogation of Parliament?

Should I be an author on another PhD student's paper if I went to their meetings and gave advice?

How can Germany increase investments in Russia while EU economic sanctions against Russia are still in place?

How do French and other Romance language speakers cope with the movable do system?

Is there a way to replace Smite with Sharpness on a weapon?

Job interview by video at home and privacy concerns

How to "Start as close to the end as possible", and why to do so?

The answer is a girl's name (my future granddaughter) - can anyone help?

Why has Speaker Pelosi been so hesitant to impeach President Trump?

A word that refers to saying something in an attempt to anger or embarrass someone into doing something that they don’t want to do?

Digital Bananas

Lighthouse Alternatives

Isn't the detector always measuring, and thus always collapsing the state?

Does Bank Manager's discretion still exist in Mortgage Lending

How is this situation not a checkmate?

Short story about a potato hotel that makes its guests into potatoes throughout the night

Why does the Pilatus PC-24 have such a large "Wing Support"?



How to write the block matrix in LaTex? [duplicate]


Highlight elements in the matrixAligning equations with text with alignatMatrix environments not workingnewcommand for bmatrix of features using pgffor throws missing endgroup errorLeft align text in equation environment (no use of align environment)Obtaining a properly aligned complex matrixXparse k argument to parse options at end of environmentHow to represent the following border matrix in latex?How to write the following mathematical expression in LaTeX?“Missing '' inserted” and “Missing inserted” with aligned environmentHow to get my matrix to fit inside the width of the text block?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









10
















This question already has an answer here:



  • Highlight elements in the matrix

    11 answers



I wish to write the following block matrix in LaTex.



enter image description here



I have been trying a bunch of stuff, but none of it seems to work. In particular, I tried the following:



beginbmatrix
0 & -1& & & & & 0 & & & &\
1 & 0 & & & & & & & & &\
& & cdot & & & & & & & &\
& & & cdot & & & & & & &\
& & & & cdot & & & & & &\
& & & & & 0 & 1 & & & &\
& & & & &-1 & 0 & & & &\
& & & & & & & cdot & & &\
& & & & & & & & cdot & & \
& & & & & & & & & cdot & \
0 & & & & & & & & & & 0\
endbmatrix



But this is pretty ugly and so any suggestions will be much appreciated.










share|improve this question
















marked as duplicate by Werner, Raaja, Mensch, Sebastiano, siracusa Apr 1 at 21:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

























    10
















    This question already has an answer here:



    • Highlight elements in the matrix

      11 answers



    I wish to write the following block matrix in LaTex.



    enter image description here



    I have been trying a bunch of stuff, but none of it seems to work. In particular, I tried the following:



    beginbmatrix
    0 & -1& & & & & 0 & & & &\
    1 & 0 & & & & & & & & &\
    & & cdot & & & & & & & &\
    & & & cdot & & & & & & &\
    & & & & cdot & & & & & &\
    & & & & & 0 & 1 & & & &\
    & & & & &-1 & 0 & & & &\
    & & & & & & & cdot & & &\
    & & & & & & & & cdot & & \
    & & & & & & & & & cdot & \
    0 & & & & & & & & & & 0\
    endbmatrix



    But this is pretty ugly and so any suggestions will be much appreciated.










    share|improve this question
















    marked as duplicate by Werner, Raaja, Mensch, Sebastiano, siracusa Apr 1 at 21:02


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      10












      10








      10


      4







      This question already has an answer here:



      • Highlight elements in the matrix

        11 answers



      I wish to write the following block matrix in LaTex.



      enter image description here



      I have been trying a bunch of stuff, but none of it seems to work. In particular, I tried the following:



      beginbmatrix
      0 & -1& & & & & 0 & & & &\
      1 & 0 & & & & & & & & &\
      & & cdot & & & & & & & &\
      & & & cdot & & & & & & &\
      & & & & cdot & & & & & &\
      & & & & & 0 & 1 & & & &\
      & & & & &-1 & 0 & & & &\
      & & & & & & & cdot & & &\
      & & & & & & & & cdot & & \
      & & & & & & & & & cdot & \
      0 & & & & & & & & & & 0\
      endbmatrix



      But this is pretty ugly and so any suggestions will be much appreciated.










      share|improve this question

















      This question already has an answer here:



      • Highlight elements in the matrix

        11 answers



      I wish to write the following block matrix in LaTex.



      enter image description here



      I have been trying a bunch of stuff, but none of it seems to work. In particular, I tried the following:



      beginbmatrix
      0 & -1& & & & & 0 & & & &\
      1 & 0 & & & & & & & & &\
      & & cdot & & & & & & & &\
      & & & cdot & & & & & & &\
      & & & & cdot & & & & & &\
      & & & & & 0 & 1 & & & &\
      & & & & &-1 & 0 & & & &\
      & & & & & & & cdot & & &\
      & & & & & & & & cdot & & \
      & & & & & & & & & cdot & \
      0 & & & & & & & & & & 0\
      endbmatrix



      But this is pretty ugly and so any suggestions will be much appreciated.





      This question already has an answer here:



      • Highlight elements in the matrix

        11 answers







      amsmath






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 20:33







      model_checker

















      asked Mar 28 at 20:19









      model_checkermodel_checker

      2471 gold badge3 silver badges11 bronze badges




      2471 gold badge3 silver badges11 bronze badges





      marked as duplicate by Werner, Raaja, Mensch, Sebastiano, siracusa Apr 1 at 21:02


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











      marked as duplicate by Werner, Raaja, Mensch, Sebastiano, siracusa Apr 1 at 21:02


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Werner, Raaja, Mensch, Sebastiano, siracusa Apr 1 at 21:02


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















          5 Answers
          5






          active

          oldest

          votes


















          9
















          Perhaps



          $left(beginarraycccccc
          left[beginarraycc
          0 & 1\
          -1 & 0
          endarrayright] & & & & & 0\
          & ddots\
          & & left[beginarraycc
          0 & 1\
          -1 & 0
          endarrayright]\
          & & & 0\
          & & & & ddots\
          0 & & & & & 0
          endarrayright)$


          enter image description here






          share|improve this answer




















          • 2





            Thank you so much!

            – model_checker
            Mar 28 at 20:45


















          7
















          Just for the fun of it! :-)



          documentclassarticle
          usepackageamsmath,array

          begindocument

          [
          beginpmatrix
          newcommandlr[1]multicolumn1c#1
          newcommandrr[1]multicolumn1c#1
          ;
          beginarray@*10c@
          cline1-2
          lr0 & rr1 &&&&&&&& raisebox-1em[0pt][0pt]$0$\
          lr-1 & rr0 \
          cline1-2
          && ddots \
          cline4-5
          &&& lr0 & rr1 \
          &&& lr-1 & rr0 \
          cline4-5
          &&&&& 0 \[-1ex]
          &&&&&& ddots \
          &&&&&&& 0 \[-1ex]
          &&&&&&&& ddots \
          multicolumn2c0 &&&&&&&& 0
          endarray
          ;;
          endpmatrix
          ]

          enddocument


          enter image description here






          share|improve this answer




















          • 2





            You guys are the best!

            – model_checker
            Mar 28 at 22:40






          • 1





            @model_checker I'm certainly not the best. Here is world excellence.

            – Sebastiano
            Mar 28 at 22:50






          • 2





            I am sorry! Last I checked there was an objection to your answer. But it's also great!

            – model_checker
            Mar 28 at 22:53






          • 2





            @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

            – Sebastiano
            Mar 28 at 23:02


















          6
















          Here there is my proposal as the original picture using bmatx command that replace a boxed matrix.



          enter image description here



          documentclassarticle
          usepackagemathtools
          newcommandbmatxboxedbeginmatrix 0& 1 \ -1& 0endmatrix

          begindocument
          [
          beginpmatrix
          , bmatx& & & & & & & 0 \
          & ddots& & & & \
          & & bmatx & & & & \
          & & & ddots& & &\
          & & & & 0 & &\
          & & & & & & ddots\
          0 & & & & & & & 0
          endpmatrix
          ]

          enddocument


          The best code is provided thanks to the precious comment of @Bernard.






          share|improve this answer






















          • 4





            In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

            – Bernard
            Mar 28 at 21:24






          • 2





            Your comment not is an opinion :-) ...it is truly correct. :-)

            – Sebastiano
            Mar 28 at 21:30


















          5
















          Here's another solution. It uses a pmatrix environment for the overall matrix and a custom macro called blockmat for the 2x2 inner matrices.



          enter image description here



          documentclassarticle
          usepackagearray,amsmath
          newcommandblockmat%
          beginarray
          hline 0 & 1^mathstrut \ -1 & 0 \ hline
          endarray
          begindocument
          [
          beginpmatrix
          blockmat & & & & & 0 \
          & ddots & & & & \
          & & blockmat & & & \
          & & & 0 & & \
          & & & & ddots & \
          0 & & & & & 0 \
          endpmatrix
          ]
          enddocument





          share|improve this answer


































            1
















            Here's a solution using TikZ that will work in all kinds of context, not just matrices, to draw boxes. You just need to put tl in the point where the top-right corner is supposed to be and br where the bottom-right will be. You can also use any TikZ feature to modify your box. Obviously this needs to be fine tuned depending on what exactly you're using it for (spacing etc.).



            newcountertextbox
            deftlstepcountertextboxtikzmarknodeathetextboxstrut
            defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture


            The spacing in this version is not optimized for matrices, but you can use



            tikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw ($(athetextbox.north west)+(-0.4arraycolsep,0ex)$) rectangle ($(bthetextbox.south east)+(0.4arraycolsep,0ex)$);endtikzpicture


            to add extra space.



            enter image description here



            Full code:



            documentclassarticle
            usepackagetikz
            usepackageamsmath
            usetikzlibrarytikzmark,calc
            newcountertextbox
            deftlstepcountertextboxtikzmarknodeathetextboxstrut
            defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture
            begindocument
            [
            beginbmatrix
            tl0 &-1 & & & & & & & & 0 \
            1 & 0br & & & & & & & & \
            & & cdot & & & & & & & \
            & & & cdot & & & & & & \
            & & & & cdot & & & & & \
            & & & & &tl0 & 1 & & & \
            & & & & &-1 & 0br & & & \
            & & & & & & & cdot & & \
            & & & & & & & & cdot & \
            0 & & & & & & & & & cdot \
            endbmatrix
            ]
            enddocument





            share|improve this answer


































              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              9
















              Perhaps



              $left(beginarraycccccc
              left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright] & & & & & 0\
              & ddots\
              & & left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright]\
              & & & 0\
              & & & & ddots\
              0 & & & & & 0
              endarrayright)$


              enter image description here






              share|improve this answer




















              • 2





                Thank you so much!

                – model_checker
                Mar 28 at 20:45















              9
















              Perhaps



              $left(beginarraycccccc
              left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright] & & & & & 0\
              & ddots\
              & & left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright]\
              & & & 0\
              & & & & ddots\
              0 & & & & & 0
              endarrayright)$


              enter image description here






              share|improve this answer




















              • 2





                Thank you so much!

                – model_checker
                Mar 28 at 20:45













              9














              9










              9









              Perhaps



              $left(beginarraycccccc
              left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright] & & & & & 0\
              & ddots\
              & & left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright]\
              & & & 0\
              & & & & ddots\
              0 & & & & & 0
              endarrayright)$


              enter image description here






              share|improve this answer













              Perhaps



              $left(beginarraycccccc
              left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright] & & & & & 0\
              & ddots\
              & & left[beginarraycc
              0 & 1\
              -1 & 0
              endarrayright]\
              & & & 0\
              & & & & ddots\
              0 & & & & & 0
              endarrayright)$


              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 28 at 20:42









              riccs_0xriccs_0x

              2101 silver badge6 bronze badges




              2101 silver badge6 bronze badges










              • 2





                Thank you so much!

                – model_checker
                Mar 28 at 20:45












              • 2





                Thank you so much!

                – model_checker
                Mar 28 at 20:45







              2




              2





              Thank you so much!

              – model_checker
              Mar 28 at 20:45





              Thank you so much!

              – model_checker
              Mar 28 at 20:45













              7
















              Just for the fun of it! :-)



              documentclassarticle
              usepackageamsmath,array

              begindocument

              [
              beginpmatrix
              newcommandlr[1]multicolumn1c#1
              newcommandrr[1]multicolumn1c#1
              ;
              beginarray@*10c@
              cline1-2
              lr0 & rr1 &&&&&&&& raisebox-1em[0pt][0pt]$0$\
              lr-1 & rr0 \
              cline1-2
              && ddots \
              cline4-5
              &&& lr0 & rr1 \
              &&& lr-1 & rr0 \
              cline4-5
              &&&&& 0 \[-1ex]
              &&&&&& ddots \
              &&&&&&& 0 \[-1ex]
              &&&&&&&& ddots \
              multicolumn2c0 &&&&&&&& 0
              endarray
              ;;
              endpmatrix
              ]

              enddocument


              enter image description here






              share|improve this answer




















              • 2





                You guys are the best!

                – model_checker
                Mar 28 at 22:40






              • 1





                @model_checker I'm certainly not the best. Here is world excellence.

                – Sebastiano
                Mar 28 at 22:50






              • 2





                I am sorry! Last I checked there was an objection to your answer. But it's also great!

                – model_checker
                Mar 28 at 22:53






              • 2





                @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

                – Sebastiano
                Mar 28 at 23:02















              7
















              Just for the fun of it! :-)



              documentclassarticle
              usepackageamsmath,array

              begindocument

              [
              beginpmatrix
              newcommandlr[1]multicolumn1c#1
              newcommandrr[1]multicolumn1c#1
              ;
              beginarray@*10c@
              cline1-2
              lr0 & rr1 &&&&&&&& raisebox-1em[0pt][0pt]$0$\
              lr-1 & rr0 \
              cline1-2
              && ddots \
              cline4-5
              &&& lr0 & rr1 \
              &&& lr-1 & rr0 \
              cline4-5
              &&&&& 0 \[-1ex]
              &&&&&& ddots \
              &&&&&&& 0 \[-1ex]
              &&&&&&&& ddots \
              multicolumn2c0 &&&&&&&& 0
              endarray
              ;;
              endpmatrix
              ]

              enddocument


              enter image description here






              share|improve this answer




















              • 2





                You guys are the best!

                – model_checker
                Mar 28 at 22:40






              • 1





                @model_checker I'm certainly not the best. Here is world excellence.

                – Sebastiano
                Mar 28 at 22:50






              • 2





                I am sorry! Last I checked there was an objection to your answer. But it's also great!

                – model_checker
                Mar 28 at 22:53






              • 2





                @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

                – Sebastiano
                Mar 28 at 23:02













              7














              7










              7









              Just for the fun of it! :-)



              documentclassarticle
              usepackageamsmath,array

              begindocument

              [
              beginpmatrix
              newcommandlr[1]multicolumn1c#1
              newcommandrr[1]multicolumn1c#1
              ;
              beginarray@*10c@
              cline1-2
              lr0 & rr1 &&&&&&&& raisebox-1em[0pt][0pt]$0$\
              lr-1 & rr0 \
              cline1-2
              && ddots \
              cline4-5
              &&& lr0 & rr1 \
              &&& lr-1 & rr0 \
              cline4-5
              &&&&& 0 \[-1ex]
              &&&&&& ddots \
              &&&&&&& 0 \[-1ex]
              &&&&&&&& ddots \
              multicolumn2c0 &&&&&&&& 0
              endarray
              ;;
              endpmatrix
              ]

              enddocument


              enter image description here






              share|improve this answer













              Just for the fun of it! :-)



              documentclassarticle
              usepackageamsmath,array

              begindocument

              [
              beginpmatrix
              newcommandlr[1]multicolumn1c#1
              newcommandrr[1]multicolumn1c#1
              ;
              beginarray@*10c@
              cline1-2
              lr0 & rr1 &&&&&&&& raisebox-1em[0pt][0pt]$0$\
              lr-1 & rr0 \
              cline1-2
              && ddots \
              cline4-5
              &&& lr0 & rr1 \
              &&& lr-1 & rr0 \
              cline4-5
              &&&&& 0 \[-1ex]
              &&&&&& ddots \
              &&&&&&& 0 \[-1ex]
              &&&&&&&& ddots \
              multicolumn2c0 &&&&&&&& 0
              endarray
              ;;
              endpmatrix
              ]

              enddocument


              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 28 at 22:27









              egregegreg

              771k91 gold badges2013 silver badges3370 bronze badges




              771k91 gold badges2013 silver badges3370 bronze badges










              • 2





                You guys are the best!

                – model_checker
                Mar 28 at 22:40






              • 1





                @model_checker I'm certainly not the best. Here is world excellence.

                – Sebastiano
                Mar 28 at 22:50






              • 2





                I am sorry! Last I checked there was an objection to your answer. But it's also great!

                – model_checker
                Mar 28 at 22:53






              • 2





                @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

                – Sebastiano
                Mar 28 at 23:02












              • 2





                You guys are the best!

                – model_checker
                Mar 28 at 22:40






              • 1





                @model_checker I'm certainly not the best. Here is world excellence.

                – Sebastiano
                Mar 28 at 22:50






              • 2





                I am sorry! Last I checked there was an objection to your answer. But it's also great!

                – model_checker
                Mar 28 at 22:53






              • 2





                @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

                – Sebastiano
                Mar 28 at 23:02







              2




              2





              You guys are the best!

              – model_checker
              Mar 28 at 22:40





              You guys are the best!

              – model_checker
              Mar 28 at 22:40




              1




              1





              @model_checker I'm certainly not the best. Here is world excellence.

              – Sebastiano
              Mar 28 at 22:50





              @model_checker I'm certainly not the best. Here is world excellence.

              – Sebastiano
              Mar 28 at 22:50




              2




              2





              I am sorry! Last I checked there was an objection to your answer. But it's also great!

              – model_checker
              Mar 28 at 22:53





              I am sorry! Last I checked there was an objection to your answer. But it's also great!

              – model_checker
              Mar 28 at 22:53




              2




              2





              @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

              – Sebastiano
              Mar 28 at 23:02





              @model_checker Don't worry. I have put two & in addition. :-) but now it is correct.

              – Sebastiano
              Mar 28 at 23:02











              6
















              Here there is my proposal as the original picture using bmatx command that replace a boxed matrix.



              enter image description here



              documentclassarticle
              usepackagemathtools
              newcommandbmatxboxedbeginmatrix 0& 1 \ -1& 0endmatrix

              begindocument
              [
              beginpmatrix
              , bmatx& & & & & & & 0 \
              & ddots& & & & \
              & & bmatx & & & & \
              & & & ddots& & &\
              & & & & 0 & &\
              & & & & & & ddots\
              0 & & & & & & & 0
              endpmatrix
              ]

              enddocument


              The best code is provided thanks to the precious comment of @Bernard.






              share|improve this answer






















              • 4





                In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

                – Bernard
                Mar 28 at 21:24






              • 2





                Your comment not is an opinion :-) ...it is truly correct. :-)

                – Sebastiano
                Mar 28 at 21:30















              6
















              Here there is my proposal as the original picture using bmatx command that replace a boxed matrix.



              enter image description here



              documentclassarticle
              usepackagemathtools
              newcommandbmatxboxedbeginmatrix 0& 1 \ -1& 0endmatrix

              begindocument
              [
              beginpmatrix
              , bmatx& & & & & & & 0 \
              & ddots& & & & \
              & & bmatx & & & & \
              & & & ddots& & &\
              & & & & 0 & &\
              & & & & & & ddots\
              0 & & & & & & & 0
              endpmatrix
              ]

              enddocument


              The best code is provided thanks to the precious comment of @Bernard.






              share|improve this answer






















              • 4





                In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

                – Bernard
                Mar 28 at 21:24






              • 2





                Your comment not is an opinion :-) ...it is truly correct. :-)

                – Sebastiano
                Mar 28 at 21:30













              6














              6










              6









              Here there is my proposal as the original picture using bmatx command that replace a boxed matrix.



              enter image description here



              documentclassarticle
              usepackagemathtools
              newcommandbmatxboxedbeginmatrix 0& 1 \ -1& 0endmatrix

              begindocument
              [
              beginpmatrix
              , bmatx& & & & & & & 0 \
              & ddots& & & & \
              & & bmatx & & & & \
              & & & ddots& & &\
              & & & & 0 & &\
              & & & & & & ddots\
              0 & & & & & & & 0
              endpmatrix
              ]

              enddocument


              The best code is provided thanks to the precious comment of @Bernard.






              share|improve this answer















              Here there is my proposal as the original picture using bmatx command that replace a boxed matrix.



              enter image description here



              documentclassarticle
              usepackagemathtools
              newcommandbmatxboxedbeginmatrix 0& 1 \ -1& 0endmatrix

              begindocument
              [
              beginpmatrix
              , bmatx& & & & & & & 0 \
              & ddots& & & & \
              & & bmatx & & & & \
              & & & ddots& & &\
              & & & & 0 & &\
              & & & & & & ddots\
              0 & & & & & & & 0
              endpmatrix
              ]

              enddocument


              The best code is provided thanks to the precious comment of @Bernard.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Mar 28 at 21:30

























              answered Mar 28 at 20:56









              SebastianoSebastiano

              16.3k5 gold badges27 silver badges82 bronze badges




              16.3k5 gold badges27 silver badges82 bronze badges










              • 4





                In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

                – Bernard
                Mar 28 at 21:24






              • 2





                Your comment not is an opinion :-) ...it is truly correct. :-)

                – Sebastiano
                Mar 28 at 21:30












              • 4





                In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

                – Bernard
                Mar 28 at 21:24






              • 2





                Your comment not is an opinion :-) ...it is truly correct. :-)

                – Sebastiano
                Mar 28 at 21:30







              4




              4





              In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

              – Bernard
              Mar 28 at 21:24





              In my opinion, you shouldn't add an empty 3rd column in the definition of bmatx

              – Bernard
              Mar 28 at 21:24




              2




              2





              Your comment not is an opinion :-) ...it is truly correct. :-)

              – Sebastiano
              Mar 28 at 21:30





              Your comment not is an opinion :-) ...it is truly correct. :-)

              – Sebastiano
              Mar 28 at 21:30











              5
















              Here's another solution. It uses a pmatrix environment for the overall matrix and a custom macro called blockmat for the 2x2 inner matrices.



              enter image description here



              documentclassarticle
              usepackagearray,amsmath
              newcommandblockmat%
              beginarray
              hline 0 & 1^mathstrut \ -1 & 0 \ hline
              endarray
              begindocument
              [
              beginpmatrix
              blockmat & & & & & 0 \
              & ddots & & & & \
              & & blockmat & & & \
              & & & 0 & & \
              & & & & ddots & \
              0 & & & & & 0 \
              endpmatrix
              ]
              enddocument





              share|improve this answer































                5
















                Here's another solution. It uses a pmatrix environment for the overall matrix and a custom macro called blockmat for the 2x2 inner matrices.



                enter image description here



                documentclassarticle
                usepackagearray,amsmath
                newcommandblockmat%
                beginarray
                hline 0 & 1^mathstrut \ -1 & 0 \ hline
                endarray
                begindocument
                [
                beginpmatrix
                blockmat & & & & & 0 \
                & ddots & & & & \
                & & blockmat & & & \
                & & & 0 & & \
                & & & & ddots & \
                0 & & & & & 0 \
                endpmatrix
                ]
                enddocument





                share|improve this answer





























                  5














                  5










                  5









                  Here's another solution. It uses a pmatrix environment for the overall matrix and a custom macro called blockmat for the 2x2 inner matrices.



                  enter image description here



                  documentclassarticle
                  usepackagearray,amsmath
                  newcommandblockmat%
                  beginarray
                  hline 0 & 1^mathstrut \ -1 & 0 \ hline
                  endarray
                  begindocument
                  [
                  beginpmatrix
                  blockmat & & & & & 0 \
                  & ddots & & & & \
                  & & blockmat & & & \
                  & & & 0 & & \
                  & & & & ddots & \
                  0 & & & & & 0 \
                  endpmatrix
                  ]
                  enddocument





                  share|improve this answer















                  Here's another solution. It uses a pmatrix environment for the overall matrix and a custom macro called blockmat for the 2x2 inner matrices.



                  enter image description here



                  documentclassarticle
                  usepackagearray,amsmath
                  newcommandblockmat%
                  beginarray
                  hline 0 & 1^mathstrut \ -1 & 0 \ hline
                  endarray
                  begindocument
                  [
                  beginpmatrix
                  blockmat & & & & & 0 \
                  & ddots & & & & \
                  & & blockmat & & & \
                  & & & 0 & & \
                  & & & & ddots & \
                  0 & & & & & 0 \
                  endpmatrix
                  ]
                  enddocument






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 28 at 20:57









                  user36296

                  1




                  1










                  answered Mar 28 at 20:55









                  MicoMico

                  306k33 gold badges422 silver badges834 bronze badges




                  306k33 gold badges422 silver badges834 bronze badges
























                      1
















                      Here's a solution using TikZ that will work in all kinds of context, not just matrices, to draw boxes. You just need to put tl in the point where the top-right corner is supposed to be and br where the bottom-right will be. You can also use any TikZ feature to modify your box. Obviously this needs to be fine tuned depending on what exactly you're using it for (spacing etc.).



                      newcountertextbox
                      deftlstepcountertextboxtikzmarknodeathetextboxstrut
                      defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture


                      The spacing in this version is not optimized for matrices, but you can use



                      tikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw ($(athetextbox.north west)+(-0.4arraycolsep,0ex)$) rectangle ($(bthetextbox.south east)+(0.4arraycolsep,0ex)$);endtikzpicture


                      to add extra space.



                      enter image description here



                      Full code:



                      documentclassarticle
                      usepackagetikz
                      usepackageamsmath
                      usetikzlibrarytikzmark,calc
                      newcountertextbox
                      deftlstepcountertextboxtikzmarknodeathetextboxstrut
                      defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture
                      begindocument
                      [
                      beginbmatrix
                      tl0 &-1 & & & & & & & & 0 \
                      1 & 0br & & & & & & & & \
                      & & cdot & & & & & & & \
                      & & & cdot & & & & & & \
                      & & & & cdot & & & & & \
                      & & & & &tl0 & 1 & & & \
                      & & & & &-1 & 0br & & & \
                      & & & & & & & cdot & & \
                      & & & & & & & & cdot & \
                      0 & & & & & & & & & cdot \
                      endbmatrix
                      ]
                      enddocument





                      share|improve this answer































                        1
















                        Here's a solution using TikZ that will work in all kinds of context, not just matrices, to draw boxes. You just need to put tl in the point where the top-right corner is supposed to be and br where the bottom-right will be. You can also use any TikZ feature to modify your box. Obviously this needs to be fine tuned depending on what exactly you're using it for (spacing etc.).



                        newcountertextbox
                        deftlstepcountertextboxtikzmarknodeathetextboxstrut
                        defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture


                        The spacing in this version is not optimized for matrices, but you can use



                        tikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw ($(athetextbox.north west)+(-0.4arraycolsep,0ex)$) rectangle ($(bthetextbox.south east)+(0.4arraycolsep,0ex)$);endtikzpicture


                        to add extra space.



                        enter image description here



                        Full code:



                        documentclassarticle
                        usepackagetikz
                        usepackageamsmath
                        usetikzlibrarytikzmark,calc
                        newcountertextbox
                        deftlstepcountertextboxtikzmarknodeathetextboxstrut
                        defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture
                        begindocument
                        [
                        beginbmatrix
                        tl0 &-1 & & & & & & & & 0 \
                        1 & 0br & & & & & & & & \
                        & & cdot & & & & & & & \
                        & & & cdot & & & & & & \
                        & & & & cdot & & & & & \
                        & & & & &tl0 & 1 & & & \
                        & & & & &-1 & 0br & & & \
                        & & & & & & & cdot & & \
                        & & & & & & & & cdot & \
                        0 & & & & & & & & & cdot \
                        endbmatrix
                        ]
                        enddocument





                        share|improve this answer





























                          1














                          1










                          1









                          Here's a solution using TikZ that will work in all kinds of context, not just matrices, to draw boxes. You just need to put tl in the point where the top-right corner is supposed to be and br where the bottom-right will be. You can also use any TikZ feature to modify your box. Obviously this needs to be fine tuned depending on what exactly you're using it for (spacing etc.).



                          newcountertextbox
                          deftlstepcountertextboxtikzmarknodeathetextboxstrut
                          defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture


                          The spacing in this version is not optimized for matrices, but you can use



                          tikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw ($(athetextbox.north west)+(-0.4arraycolsep,0ex)$) rectangle ($(bthetextbox.south east)+(0.4arraycolsep,0ex)$);endtikzpicture


                          to add extra space.



                          enter image description here



                          Full code:



                          documentclassarticle
                          usepackagetikz
                          usepackageamsmath
                          usetikzlibrarytikzmark,calc
                          newcountertextbox
                          deftlstepcountertextboxtikzmarknodeathetextboxstrut
                          defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture
                          begindocument
                          [
                          beginbmatrix
                          tl0 &-1 & & & & & & & & 0 \
                          1 & 0br & & & & & & & & \
                          & & cdot & & & & & & & \
                          & & & cdot & & & & & & \
                          & & & & cdot & & & & & \
                          & & & & &tl0 & 1 & & & \
                          & & & & &-1 & 0br & & & \
                          & & & & & & & cdot & & \
                          & & & & & & & & cdot & \
                          0 & & & & & & & & & cdot \
                          endbmatrix
                          ]
                          enddocument





                          share|improve this answer















                          Here's a solution using TikZ that will work in all kinds of context, not just matrices, to draw boxes. You just need to put tl in the point where the top-right corner is supposed to be and br where the bottom-right will be. You can also use any TikZ feature to modify your box. Obviously this needs to be fine tuned depending on what exactly you're using it for (spacing etc.).



                          newcountertextbox
                          deftlstepcountertextboxtikzmarknodeathetextboxstrut
                          defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture


                          The spacing in this version is not optimized for matrices, but you can use



                          tikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw ($(athetextbox.north west)+(-0.4arraycolsep,0ex)$) rectangle ($(bthetextbox.south east)+(0.4arraycolsep,0ex)$);endtikzpicture


                          to add extra space.



                          enter image description here



                          Full code:



                          documentclassarticle
                          usepackagetikz
                          usepackageamsmath
                          usetikzlibrarytikzmark,calc
                          newcountertextbox
                          deftlstepcountertextboxtikzmarknodeathetextboxstrut
                          defbrtikzmarknodebthetextboxstrutbegintikzpicture[overlay, remember picture]draw (athetextbox.north west) rectangle (bthetextbox.south east);endtikzpicture
                          begindocument
                          [
                          beginbmatrix
                          tl0 &-1 & & & & & & & & 0 \
                          1 & 0br & & & & & & & & \
                          & & cdot & & & & & & & \
                          & & & cdot & & & & & & \
                          & & & & cdot & & & & & \
                          & & & & &tl0 & 1 & & & \
                          & & & & &-1 & 0br & & & \
                          & & & & & & & cdot & & \
                          & & & & & & & & cdot & \
                          0 & & & & & & & & & cdot \
                          endbmatrix
                          ]
                          enddocument






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 1 at 17:48

























                          answered Apr 1 at 16:36









                          sheßsheß

                          2,0381 gold badge15 silver badges38 bronze badges




                          2,0381 gold badge15 silver badges38 bronze badges
















                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현