A diagram with matrices











up vote
2
down vote

favorite












I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?enter image description here










share|improve this question


















  • 1




    What have you tried so far? Please add a minimal working example (MWE).
    – epR8GaYuh
    yesterday










  • Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
    – user149973
    yesterday















up vote
2
down vote

favorite












I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?enter image description here










share|improve this question


















  • 1




    What have you tried so far? Please add a minimal working example (MWE).
    – epR8GaYuh
    yesterday










  • Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
    – user149973
    yesterday













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?enter image description here










share|improve this question













I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?enter image description here







draw ticks tikz-graphdrawing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









user149973

241




241








  • 1




    What have you tried so far? Please add a minimal working example (MWE).
    – epR8GaYuh
    yesterday










  • Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
    – user149973
    yesterday














  • 1




    What have you tried so far? Please add a minimal working example (MWE).
    – epR8GaYuh
    yesterday










  • Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
    – user149973
    yesterday








1




1




What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
yesterday




What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
yesterday












Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
yesterday




Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
yesterday










2 Answers
2






active

oldest

votes

















up vote
3
down vote













With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center



This could be a starting point for your quest:



documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}

begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}

end{document}


which would give:



enter image description here



Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.






share|improve this answer






























    up vote
    3
    down vote













    Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.



    documentclass[fleqn]{article}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{tikzmark}
    usetikzlibrary{decorations.markings}
    % from https://tex.stackexchange.com/a/39282/121799
    tikzset{->-/.style={decoration={
    markings,
    mark=at position #1 with {arrow{>}}},postaction={decorate}}}
    begin{document}
    [
    tikzmarknode{L}{begin{pmatrix}
    1 & 2 \ 3 & 4
    end{pmatrix}}
    qquadqquadqquadqquadqquadqquad
    tikzmarknode{R}{begin{pmatrix}
    1 & 2 & 3 & 4 \
    5 & 6 & 7 & 8 \
    9 & 10 & 11 & 12 \
    13 & 14 & 15 & 16 \
    end{pmatrix}}
    ]
    begin{tikzpicture}[overlay,remember picture]
    draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
    node[midway,fill=white,draw,solid]{DST};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer























    • (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
      – Raaja
      yesterday








    • 1




      @Raaja Sorry for misspelling your name!!
      – marmot
      yesterday










    • Ha ha, that's okay :D
      – Raaja
      yesterday













    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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460702%2fa-diagram-with-matrices%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote













    With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center



    This could be a starting point for your quest:



    documentclass{article}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{arrows}
    usetikzlibrary{decorations.markings}

    begin{document}
    pagestyle{empty}
    %
    tikzstyle{int}=[draw, minimum size=2em]
    tikzset{->-/.style={decoration={
    markings,
    mark=at position #1 with {arrow{>}}},postaction={decorate}}}
    begin{tikzpicture}[node distance=2.5cm, auto]
    node [int] (a) {DST};
    node (b) [left of=a, coordinate] {a};
    node (c) [right of=a, coordinate] {a};
    draw[dashed, ->-=0.5] (b) --(a);
    draw[dashed, ->-=0.5] (a) --(c);
    node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
    c&c&v&b\
    a&b&c&d\
    a&b&c&d\
    a&b&c&d
    end{pmatrix}$};
    node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
    c&c\
    a&b
    end{pmatrix}$};
    end{tikzpicture}

    end{document}


    which would give:



    enter image description here



    Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.






    share|improve this answer



























      up vote
      3
      down vote













      With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center



      This could be a starting point for your quest:



      documentclass{article}
      usepackage{amsmath}
      usepackage{tikz}
      usetikzlibrary{arrows}
      usetikzlibrary{decorations.markings}

      begin{document}
      pagestyle{empty}
      %
      tikzstyle{int}=[draw, minimum size=2em]
      tikzset{->-/.style={decoration={
      markings,
      mark=at position #1 with {arrow{>}}},postaction={decorate}}}
      begin{tikzpicture}[node distance=2.5cm, auto]
      node [int] (a) {DST};
      node (b) [left of=a, coordinate] {a};
      node (c) [right of=a, coordinate] {a};
      draw[dashed, ->-=0.5] (b) --(a);
      draw[dashed, ->-=0.5] (a) --(c);
      node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
      c&c&v&b\
      a&b&c&d\
      a&b&c&d\
      a&b&c&d
      end{pmatrix}$};
      node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
      c&c\
      a&b
      end{pmatrix}$};
      end{tikzpicture}

      end{document}


      which would give:



      enter image description here



      Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.






      share|improve this answer

























        up vote
        3
        down vote










        up vote
        3
        down vote









        With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center



        This could be a starting point for your quest:



        documentclass{article}
        usepackage{amsmath}
        usepackage{tikz}
        usetikzlibrary{arrows}
        usetikzlibrary{decorations.markings}

        begin{document}
        pagestyle{empty}
        %
        tikzstyle{int}=[draw, minimum size=2em]
        tikzset{->-/.style={decoration={
        markings,
        mark=at position #1 with {arrow{>}}},postaction={decorate}}}
        begin{tikzpicture}[node distance=2.5cm, auto]
        node [int] (a) {DST};
        node (b) [left of=a, coordinate] {a};
        node (c) [right of=a, coordinate] {a};
        draw[dashed, ->-=0.5] (b) --(a);
        draw[dashed, ->-=0.5] (a) --(c);
        node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
        c&c&v&b\
        a&b&c&d\
        a&b&c&d\
        a&b&c&d
        end{pmatrix}$};
        node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
        c&c\
        a&b
        end{pmatrix}$};
        end{tikzpicture}

        end{document}


        which would give:



        enter image description here



        Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.






        share|improve this answer














        With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center



        This could be a starting point for your quest:



        documentclass{article}
        usepackage{amsmath}
        usepackage{tikz}
        usetikzlibrary{arrows}
        usetikzlibrary{decorations.markings}

        begin{document}
        pagestyle{empty}
        %
        tikzstyle{int}=[draw, minimum size=2em]
        tikzset{->-/.style={decoration={
        markings,
        mark=at position #1 with {arrow{>}}},postaction={decorate}}}
        begin{tikzpicture}[node distance=2.5cm, auto]
        node [int] (a) {DST};
        node (b) [left of=a, coordinate] {a};
        node (c) [right of=a, coordinate] {a};
        draw[dashed, ->-=0.5] (b) --(a);
        draw[dashed, ->-=0.5] (a) --(c);
        node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
        c&c&v&b\
        a&b&c&d\
        a&b&c&d\
        a&b&c&d
        end{pmatrix}$};
        node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
        c&c\
        a&b
        end{pmatrix}$};
        end{tikzpicture}

        end{document}


        which would give:



        enter image description here



        Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday

























        answered yesterday









        Raaja

        1,5962523




        1,5962523






















            up vote
            3
            down vote













            Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.



            documentclass[fleqn]{article}
            usepackage{amsmath}
            usepackage{tikz}
            usetikzlibrary{tikzmark}
            usetikzlibrary{decorations.markings}
            % from https://tex.stackexchange.com/a/39282/121799
            tikzset{->-/.style={decoration={
            markings,
            mark=at position #1 with {arrow{>}}},postaction={decorate}}}
            begin{document}
            [
            tikzmarknode{L}{begin{pmatrix}
            1 & 2 \ 3 & 4
            end{pmatrix}}
            qquadqquadqquadqquadqquadqquad
            tikzmarknode{R}{begin{pmatrix}
            1 & 2 & 3 & 4 \
            5 & 6 & 7 & 8 \
            9 & 10 & 11 & 12 \
            13 & 14 & 15 & 16 \
            end{pmatrix}}
            ]
            begin{tikzpicture}[overlay,remember picture]
            draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
            node[midway,fill=white,draw,solid]{DST};
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer























            • (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
              – Raaja
              yesterday








            • 1




              @Raaja Sorry for misspelling your name!!
              – marmot
              yesterday










            • Ha ha, that's okay :D
              – Raaja
              yesterday

















            up vote
            3
            down vote













            Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.



            documentclass[fleqn]{article}
            usepackage{amsmath}
            usepackage{tikz}
            usetikzlibrary{tikzmark}
            usetikzlibrary{decorations.markings}
            % from https://tex.stackexchange.com/a/39282/121799
            tikzset{->-/.style={decoration={
            markings,
            mark=at position #1 with {arrow{>}}},postaction={decorate}}}
            begin{document}
            [
            tikzmarknode{L}{begin{pmatrix}
            1 & 2 \ 3 & 4
            end{pmatrix}}
            qquadqquadqquadqquadqquadqquad
            tikzmarknode{R}{begin{pmatrix}
            1 & 2 & 3 & 4 \
            5 & 6 & 7 & 8 \
            9 & 10 & 11 & 12 \
            13 & 14 & 15 & 16 \
            end{pmatrix}}
            ]
            begin{tikzpicture}[overlay,remember picture]
            draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
            node[midway,fill=white,draw,solid]{DST};
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer























            • (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
              – Raaja
              yesterday








            • 1




              @Raaja Sorry for misspelling your name!!
              – marmot
              yesterday










            • Ha ha, that's okay :D
              – Raaja
              yesterday















            up vote
            3
            down vote










            up vote
            3
            down vote









            Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.



            documentclass[fleqn]{article}
            usepackage{amsmath}
            usepackage{tikz}
            usetikzlibrary{tikzmark}
            usetikzlibrary{decorations.markings}
            % from https://tex.stackexchange.com/a/39282/121799
            tikzset{->-/.style={decoration={
            markings,
            mark=at position #1 with {arrow{>}}},postaction={decorate}}}
            begin{document}
            [
            tikzmarknode{L}{begin{pmatrix}
            1 & 2 \ 3 & 4
            end{pmatrix}}
            qquadqquadqquadqquadqquadqquad
            tikzmarknode{R}{begin{pmatrix}
            1 & 2 & 3 & 4 \
            5 & 6 & 7 & 8 \
            9 & 10 & 11 & 12 \
            13 & 14 & 15 & 16 \
            end{pmatrix}}
            ]
            begin{tikzpicture}[overlay,remember picture]
            draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
            node[midway,fill=white,draw,solid]{DST};
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer














            Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.



            documentclass[fleqn]{article}
            usepackage{amsmath}
            usepackage{tikz}
            usetikzlibrary{tikzmark}
            usetikzlibrary{decorations.markings}
            % from https://tex.stackexchange.com/a/39282/121799
            tikzset{->-/.style={decoration={
            markings,
            mark=at position #1 with {arrow{>}}},postaction={decorate}}}
            begin{document}
            [
            tikzmarknode{L}{begin{pmatrix}
            1 & 2 \ 3 & 4
            end{pmatrix}}
            qquadqquadqquadqquadqquadqquad
            tikzmarknode{R}{begin{pmatrix}
            1 & 2 & 3 & 4 \
            5 & 6 & 7 & 8 \
            9 & 10 & 11 & 12 \
            13 & 14 & 15 & 16 \
            end{pmatrix}}
            ]
            begin{tikzpicture}[overlay,remember picture]
            draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
            node[midway,fill=white,draw,solid]{DST};
            end{tikzpicture}
            end{document}


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited yesterday

























            answered yesterday









            marmot

            76.7k487161




            76.7k487161












            • (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
              – Raaja
              yesterday








            • 1




              @Raaja Sorry for misspelling your name!!
              – marmot
              yesterday










            • Ha ha, that's okay :D
              – Raaja
              yesterday




















            • (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
              – Raaja
              yesterday








            • 1




              @Raaja Sorry for misspelling your name!!
              – marmot
              yesterday










            • Ha ha, that's okay :D
              – Raaja
              yesterday


















            (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
            – Raaja
            yesterday






            (+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
            – Raaja
            yesterday






            1




            1




            @Raaja Sorry for misspelling your name!!
            – marmot
            yesterday




            @Raaja Sorry for misspelling your name!!
            – marmot
            yesterday












            Ha ha, that's okay :D
            – Raaja
            yesterday






            Ha ha, that's okay :D
            – Raaja
            yesterday




















             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460702%2fa-diagram-with-matrices%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt