Matrices and TikZ : arrows inside the matrix Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)TikZ: How to connect nodes and specify line direction?Difference between -| and |- in TikZRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?TikZ/ERD: node (=Entity) label on the insideTikz matrix arrows alignmentTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themProblems with nested TikZpicturesTikz matrix inside foreach

Was the pager message from Nick Fury to Captain Marvel unnecessary?

What is the proper term for etching or digging of wall to hide conduit of cables

"Destructive power" carried by a B-52?

Diophantine equation 3^a+1=3^b+5^c

What are some likely causes to domain member PC losing contact to domain controller?

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

Where and when has Thucydides been studied?

Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?

Keep at all times, the minus sign above aligned with minus sign below

Short story about astronauts fertilizing soil with their own bodies

How does TikZ render an arc?

Does a random sequence of vectors span a Hilbert space?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Determine whether an integer is a palindrome

Vertical ranges of Column Plots in 12

What did Turing mean when saying that "machines cannot give rise to surprises" is due to a fallacy?

Did any compiler fully use 80-bit floating point?

Is a copyright notice with a non-existent name be invalid?

Baking rewards as operations

Did pre-Columbian Americans know the spherical shape of the Earth?

Statistical analysis applied to methods coming out of Machine Learning

What can we say about Classical Nahuatl <z>?

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

How to make triangles with rounded sides and corners? (squircle with 3 sides)



Matrices and TikZ : arrows inside the matrix



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)TikZ: How to connect nodes and specify line direction?Difference between -| and |- in TikZRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?TikZ/ERD: node (=Entity) label on the insideTikz matrix arrows alignmentTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themProblems with nested TikZpicturesTikz matrix inside foreach










4















In the example below, the arrows fit inside the matrix but I would like them to stop at the limit of the delimiters.



 documentclass[border=5pt]standalone
usepackagetikz
usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
begindocument

begintikzpicture[>=stealth,thick,baseline]
matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
vdots & vdots & & vdots & & vdots\
a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
vdots & vdots & & vdots & & vdots\
a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
;

node[
fit=(A-4-6)(A-4-6),
inner xsep=20pt,inner ysep=0,
label=right: $i$-ième ligne
](L) ;

node[
fit=(A-6-4)(A-6-4),
inner xsep=20pt,inner ysep=20pt,
label=below: $j$-ième colonne
](C) ;

draw[->](L.east)-- (A-4-6);
draw[->](C.south)-- (A-6-4);

endtikzpicture

enddocument


enter image description here



enter image description here










share|improve this question


























    4















    In the example below, the arrows fit inside the matrix but I would like them to stop at the limit of the delimiters.



     documentclass[border=5pt]standalone
    usepackagetikz
    usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
    begindocument

    begintikzpicture[>=stealth,thick,baseline]
    matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
    a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
    a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
    vdots & vdots & & vdots & & vdots\
    a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
    vdots & vdots & & vdots & & vdots\
    a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
    ;

    node[
    fit=(A-4-6)(A-4-6),
    inner xsep=20pt,inner ysep=0,
    label=right: $i$-ième ligne
    ](L) ;

    node[
    fit=(A-6-4)(A-6-4),
    inner xsep=20pt,inner ysep=20pt,
    label=below: $j$-ième colonne
    ](C) ;

    draw[->](L.east)-- (A-4-6);
    draw[->](C.south)-- (A-6-4);

    endtikzpicture

    enddocument


    enter image description here



    enter image description here










    share|improve this question
























      4












      4








      4








      In the example below, the arrows fit inside the matrix but I would like them to stop at the limit of the delimiters.



       documentclass[border=5pt]standalone
      usepackagetikz
      usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
      begindocument

      begintikzpicture[>=stealth,thick,baseline]
      matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
      a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
      a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
      vdots & vdots & & vdots & & vdots\
      a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
      vdots & vdots & & vdots & & vdots\
      a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
      ;

      node[
      fit=(A-4-6)(A-4-6),
      inner xsep=20pt,inner ysep=0,
      label=right: $i$-ième ligne
      ](L) ;

      node[
      fit=(A-6-4)(A-6-4),
      inner xsep=20pt,inner ysep=20pt,
      label=below: $j$-ième colonne
      ](C) ;

      draw[->](L.east)-- (A-4-6);
      draw[->](C.south)-- (A-6-4);

      endtikzpicture

      enddocument


      enter image description here



      enter image description here










      share|improve this question














      In the example below, the arrows fit inside the matrix but I would like them to stop at the limit of the delimiters.



       documentclass[border=5pt]standalone
      usepackagetikz
      usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
      begindocument

      begintikzpicture[>=stealth,thick,baseline]
      matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
      a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
      a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
      vdots & vdots & & vdots & & vdots\
      a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
      vdots & vdots & & vdots & & vdots\
      a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
      ;

      node[
      fit=(A-4-6)(A-4-6),
      inner xsep=20pt,inner ysep=0,
      label=right: $i$-ième ligne
      ](L) ;

      node[
      fit=(A-6-4)(A-6-4),
      inner xsep=20pt,inner ysep=20pt,
      label=below: $j$-ième colonne
      ](C) ;

      draw[->](L.east)-- (A-4-6);
      draw[->](C.south)-- (A-6-4);

      endtikzpicture

      enddocument


      enter image description here



      enter image description here







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 17 at 9:31









      FabriceFabrice

      1,4931922




      1,4931922




















          2 Answers
          2






          active

          oldest

          votes


















          4














          Add an xshift:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          enter image description here



          Or shorten the arrow:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->, shorten > =12pt](L.east)-- (A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          And by the way why do you need fit?



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix, positioning

          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[right =30pt of A-4-6.east](L) $i$-ième ligne;

          node[below=20pt of A-6-4.south](C) $j$-ième colonne;

          draw[->, shorten > =12pt](L.west)-- (A-4-6.east);
          draw[->](C.north)-- (A-6-4.south);

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Thank you for your proposition.

            – Fabrice
            Apr 17 at 10:17











          • @Fabrice You're welcome and thank you for accepting my answer!

            – CarLaTeX
            Apr 17 at 10:31











          • @Fabrice However, Ignasi's answer is more elegant.

            – CarLaTeX
            Apr 17 at 10:34


















          5














          Matrix delimiters are nodes but unnamed by default. Therefore, if you add a name you can use them as reference like any other node and lines will stop on their borders.



          In following code, I've used every right delimiter style to add a name which is used later on.



          A matrix is an special kind of node which contains other nodes. So if you want to stop a line on matrix border you can use the matrix name as reference. Matrix elements have their own border. I've used intersection points between column center and south matrix border to place the vertical arrow and row center and east anchor on right delimiter to place the horizontal arrow. If you need to understand -| (or |-) syntax, look at https://tex.stackexchange.com/a/481234/1952 or https://tex.stackexchange.com/a/22954/1952.



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline,
          every right delimiter/.append style=name=rd,
          ]
          matrix [matrix of math nodes,
          left delimiter=(,
          right delimiter=),
          ](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          draw[<-] (rd.east|-A-4-1.center)--++(0:6mm) node[right]$i$-ième colonne;
          draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]$j$-ième colonne;

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer




















          • 1





            Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

            – CarLaTeX
            Apr 17 at 10:33






          • 1





            But the horizontal arrow should be aligned with the ith row...

            – CarLaTeX
            Apr 17 at 12:42











          • @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

            – Ignasi
            Apr 17 at 17:51











          • Thank you, because your answer is really elegant!

            – CarLaTeX
            Apr 17 at 18:12











          • @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

            – Fabrice
            Apr 18 at 9:06












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485254%2fmatrices-and-tikz-arrows-inside-the-matrix%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









          4














          Add an xshift:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          enter image description here



          Or shorten the arrow:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->, shorten > =12pt](L.east)-- (A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          And by the way why do you need fit?



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix, positioning

          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[right =30pt of A-4-6.east](L) $i$-ième ligne;

          node[below=20pt of A-6-4.south](C) $j$-ième colonne;

          draw[->, shorten > =12pt](L.west)-- (A-4-6.east);
          draw[->](C.north)-- (A-6-4.south);

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Thank you for your proposition.

            – Fabrice
            Apr 17 at 10:17











          • @Fabrice You're welcome and thank you for accepting my answer!

            – CarLaTeX
            Apr 17 at 10:31











          • @Fabrice However, Ignasi's answer is more elegant.

            – CarLaTeX
            Apr 17 at 10:34















          4














          Add an xshift:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          enter image description here



          Or shorten the arrow:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->, shorten > =12pt](L.east)-- (A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          And by the way why do you need fit?



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix, positioning

          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[right =30pt of A-4-6.east](L) $i$-ième ligne;

          node[below=20pt of A-6-4.south](C) $j$-ième colonne;

          draw[->, shorten > =12pt](L.west)-- (A-4-6.east);
          draw[->](C.north)-- (A-6-4.south);

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Thank you for your proposition.

            – Fabrice
            Apr 17 at 10:17











          • @Fabrice You're welcome and thank you for accepting my answer!

            – CarLaTeX
            Apr 17 at 10:31











          • @Fabrice However, Ignasi's answer is more elegant.

            – CarLaTeX
            Apr 17 at 10:34













          4












          4








          4







          Add an xshift:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          enter image description here



          Or shorten the arrow:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->, shorten > =12pt](L.east)-- (A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          And by the way why do you need fit?



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix, positioning

          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[right =30pt of A-4-6.east](L) $i$-ième ligne;

          node[below=20pt of A-6-4.south](C) $j$-ième colonne;

          draw[->, shorten > =12pt](L.west)-- (A-4-6.east);
          draw[->](C.north)-- (A-6-4.south);

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer















          Add an xshift:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          enter image description here



          Or shorten the arrow:



           documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[
          fit=(A-4-6)(A-4-6),
          inner xsep=20pt,inner ysep=0,
          label=right: $i$-ième ligne
          ](L) ;

          node[
          fit=(A-6-4)(A-6-4),
          inner xsep=20pt,inner ysep=20pt,
          label=below: $j$-ième colonne
          ](C) ;

          draw[->, shorten > =12pt](L.east)-- (A-4-6.east);
          draw[->](C.south)-- (A-6-4);

          endtikzpicture

          enddocument


          And by the way why do you need fit?



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix, positioning

          begindocument

          begintikzpicture[>=stealth,thick,baseline]
          matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          node[right =30pt of A-4-6.east](L) $i$-ième ligne;

          node[below=20pt of A-6-4.south](C) $j$-ième colonne;

          draw[->, shorten > =12pt](L.west)-- (A-4-6.east);
          draw[->](C.north)-- (A-6-4.south);

          endtikzpicture

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 17 at 10:03

























          answered Apr 17 at 9:41









          CarLaTeXCarLaTeX

          35.2k554148




          35.2k554148












          • Thank you for your proposition.

            – Fabrice
            Apr 17 at 10:17











          • @Fabrice You're welcome and thank you for accepting my answer!

            – CarLaTeX
            Apr 17 at 10:31











          • @Fabrice However, Ignasi's answer is more elegant.

            – CarLaTeX
            Apr 17 at 10:34

















          • Thank you for your proposition.

            – Fabrice
            Apr 17 at 10:17











          • @Fabrice You're welcome and thank you for accepting my answer!

            – CarLaTeX
            Apr 17 at 10:31











          • @Fabrice However, Ignasi's answer is more elegant.

            – CarLaTeX
            Apr 17 at 10:34
















          Thank you for your proposition.

          – Fabrice
          Apr 17 at 10:17





          Thank you for your proposition.

          – Fabrice
          Apr 17 at 10:17













          @Fabrice You're welcome and thank you for accepting my answer!

          – CarLaTeX
          Apr 17 at 10:31





          @Fabrice You're welcome and thank you for accepting my answer!

          – CarLaTeX
          Apr 17 at 10:31













          @Fabrice However, Ignasi's answer is more elegant.

          – CarLaTeX
          Apr 17 at 10:34





          @Fabrice However, Ignasi's answer is more elegant.

          – CarLaTeX
          Apr 17 at 10:34











          5














          Matrix delimiters are nodes but unnamed by default. Therefore, if you add a name you can use them as reference like any other node and lines will stop on their borders.



          In following code, I've used every right delimiter style to add a name which is used later on.



          A matrix is an special kind of node which contains other nodes. So if you want to stop a line on matrix border you can use the matrix name as reference. Matrix elements have their own border. I've used intersection points between column center and south matrix border to place the vertical arrow and row center and east anchor on right delimiter to place the horizontal arrow. If you need to understand -| (or |-) syntax, look at https://tex.stackexchange.com/a/481234/1952 or https://tex.stackexchange.com/a/22954/1952.



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline,
          every right delimiter/.append style=name=rd,
          ]
          matrix [matrix of math nodes,
          left delimiter=(,
          right delimiter=),
          ](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          draw[<-] (rd.east|-A-4-1.center)--++(0:6mm) node[right]$i$-ième colonne;
          draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]$j$-ième colonne;

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer




















          • 1





            Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

            – CarLaTeX
            Apr 17 at 10:33






          • 1





            But the horizontal arrow should be aligned with the ith row...

            – CarLaTeX
            Apr 17 at 12:42











          • @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

            – Ignasi
            Apr 17 at 17:51











          • Thank you, because your answer is really elegant!

            – CarLaTeX
            Apr 17 at 18:12











          • @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

            – Fabrice
            Apr 18 at 9:06
















          5














          Matrix delimiters are nodes but unnamed by default. Therefore, if you add a name you can use them as reference like any other node and lines will stop on their borders.



          In following code, I've used every right delimiter style to add a name which is used later on.



          A matrix is an special kind of node which contains other nodes. So if you want to stop a line on matrix border you can use the matrix name as reference. Matrix elements have their own border. I've used intersection points between column center and south matrix border to place the vertical arrow and row center and east anchor on right delimiter to place the horizontal arrow. If you need to understand -| (or |-) syntax, look at https://tex.stackexchange.com/a/481234/1952 or https://tex.stackexchange.com/a/22954/1952.



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline,
          every right delimiter/.append style=name=rd,
          ]
          matrix [matrix of math nodes,
          left delimiter=(,
          right delimiter=),
          ](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          draw[<-] (rd.east|-A-4-1.center)--++(0:6mm) node[right]$i$-ième colonne;
          draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]$j$-ième colonne;

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer




















          • 1





            Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

            – CarLaTeX
            Apr 17 at 10:33






          • 1





            But the horizontal arrow should be aligned with the ith row...

            – CarLaTeX
            Apr 17 at 12:42











          • @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

            – Ignasi
            Apr 17 at 17:51











          • Thank you, because your answer is really elegant!

            – CarLaTeX
            Apr 17 at 18:12











          • @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

            – Fabrice
            Apr 18 at 9:06














          5












          5








          5







          Matrix delimiters are nodes but unnamed by default. Therefore, if you add a name you can use them as reference like any other node and lines will stop on their borders.



          In following code, I've used every right delimiter style to add a name which is used later on.



          A matrix is an special kind of node which contains other nodes. So if you want to stop a line on matrix border you can use the matrix name as reference. Matrix elements have their own border. I've used intersection points between column center and south matrix border to place the vertical arrow and row center and east anchor on right delimiter to place the horizontal arrow. If you need to understand -| (or |-) syntax, look at https://tex.stackexchange.com/a/481234/1952 or https://tex.stackexchange.com/a/22954/1952.



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline,
          every right delimiter/.append style=name=rd,
          ]
          matrix [matrix of math nodes,
          left delimiter=(,
          right delimiter=),
          ](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          draw[<-] (rd.east|-A-4-1.center)--++(0:6mm) node[right]$i$-ième colonne;
          draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]$j$-ième colonne;

          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer















          Matrix delimiters are nodes but unnamed by default. Therefore, if you add a name you can use them as reference like any other node and lines will stop on their borders.



          In following code, I've used every right delimiter style to add a name which is used later on.



          A matrix is an special kind of node which contains other nodes. So if you want to stop a line on matrix border you can use the matrix name as reference. Matrix elements have their own border. I've used intersection points between column center and south matrix border to place the vertical arrow and row center and east anchor on right delimiter to place the horizontal arrow. If you need to understand -| (or |-) syntax, look at https://tex.stackexchange.com/a/481234/1952 or https://tex.stackexchange.com/a/22954/1952.



          documentclass[border=5pt]standalone
          usepackagetikz
          usetikzlibrarymatrix,decorations.pathreplacing, calc, positioning,fit
          begindocument

          begintikzpicture[>=stealth,thick,baseline,
          every right delimiter/.append style=name=rd,
          ]
          matrix [matrix of math nodes,
          left delimiter=(,
          right delimiter=),
          ](A)
          a_1,1 & a_1,2 & dots & a_1,j & dots & a_1,n\
          a_2,1 & a_2,2 & dots & a_2,j & dots & a_2,n\
          vdots & vdots & & vdots & & vdots\
          a_i,1 & a_i,2 & dots & a_i,j & dots & a_i,n\
          vdots & vdots & & vdots & & vdots\
          a_n,1 & a_n,2 & dots & a_n,j & dots & a_n,n\
          ;

          draw[<-] (rd.east|-A-4-1.center)--++(0:6mm) node[right]$i$-ième colonne;
          draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]$j$-ième colonne;

          endtikzpicture

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Apr 17 at 10:19









          IgnasiIgnasi

          96.1k5176321




          96.1k5176321







          • 1





            Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

            – CarLaTeX
            Apr 17 at 10:33






          • 1





            But the horizontal arrow should be aligned with the ith row...

            – CarLaTeX
            Apr 17 at 12:42











          • @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

            – Ignasi
            Apr 17 at 17:51











          • Thank you, because your answer is really elegant!

            – CarLaTeX
            Apr 17 at 18:12











          • @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

            – Fabrice
            Apr 18 at 9:06













          • 1





            Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

            – CarLaTeX
            Apr 17 at 10:33






          • 1





            But the horizontal arrow should be aligned with the ith row...

            – CarLaTeX
            Apr 17 at 12:42











          • @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

            – Ignasi
            Apr 17 at 17:51











          • Thank you, because your answer is really elegant!

            – CarLaTeX
            Apr 17 at 18:12











          • @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

            – Fabrice
            Apr 18 at 9:06








          1




          1





          Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

          – CarLaTeX
          Apr 17 at 10:33





          Awesome! It didn't come to my mind to name the node of the right delimeter, +1!

          – CarLaTeX
          Apr 17 at 10:33




          1




          1





          But the horizontal arrow should be aligned with the ith row...

          – CarLaTeX
          Apr 17 at 12:42





          But the horizontal arrow should be aligned with the ith row...

          – CarLaTeX
          Apr 17 at 12:42













          @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

          – Ignasi
          Apr 17 at 17:51





          @CarLaTeX you're right. I'll change as soon as I've a computer and Internet access at hand ;-)

          – Ignasi
          Apr 17 at 17:51













          Thank you, because your answer is really elegant!

          – CarLaTeX
          Apr 17 at 18:12





          Thank you, because your answer is really elegant!

          – CarLaTeX
          Apr 17 at 18:12













          @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

          – Fabrice
          Apr 18 at 9:06






          @ Ignasi Could you explain this (A.south-|A-1-4.center) ? Thank you.

          – Fabrice
          Apr 18 at 9:06


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485254%2fmatrices-and-tikz-arrows-inside-the-matrix%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

          Sum ergo cogito? 1 nng

          419 nièngy_Soadمي 19bal1.5o_g

          Queiggey Chernihivv 9NnOo i Zw X QqKk LpB