LaTeX forum ⇒ Math & ScienceHelp to make a matrix with tikz

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Matheux
Posts: 3
Joined: Mon Aug 18, 2014 5:23 pm

Help to make a matrix with tikz

Postby Matheux » Mon Aug 18, 2014 5:36 pm

Hello there;
I would like to modify this code :

  1. \documentclass{article}
  2. \usepackage{amsmath,mathrsfs}
  3. \usepackage{tikz}
  4. \usetikzlibrary{matrix,positioning,fit}
  5. \DeclareMathOperator{\Mat}{Mat}
  6. \begin{document}
  7. \begin{equation*}
  8. \Mat_{\mathscr{B},\mathscr{B}'}(f)=
  9. \begin{tikzpicture} [baseline=(m.center),every left delimiter/.style={xshift=2ex},
  10. every right delimiter/.style={xshift=-2ex}] %,
  11. column 6/.style={anchor=base east}]
  12. \matrix (m)[matrix of math nodes,left delimiter=(,right delimiter=)]
  13. {
  14. a_{11} &[3mm] a_{12} & \dots & a_{1j} & \dots & a_{1n} \\
  15. a_{21} & a_{22} & \dots & a_{2j} & \dots & a_{2n} \\[-2mm]
  16. \vdots & \vdots & & \vdots & & \vdots \\
  17. a_{i1} & a_{i2} & \dots & a_{ij} & \dots & a_{in} \\[-2mm]
  18. \vdots & \vdots & & \vdots & & \vdots \\
  19. a_{p1} & a_{p2} & \dots & a_{pj} & \dots & a_{pn} \\
  20. };
  21. \begin{scope}[every node/.style={text=blue}]
  22. \foreach \j/\sub in {1/1,2/2,4/i,6/p} \node[right=\tabcolsep of m-\j-6.east] {$\leftarrow f_{\sub}$};
  23. \foreach \i/\sub in {1/1,2/2,4/j,6/n} \node[above=1.2\tabcolsep of m-1-\i.north] (a-\i) {$f(e_{\sub})$};
  24. \foreach \i in {1,2,4,6} \draw[blue,->] (a-\i) -- (m-1-\i);
  25. \end{scope}
  26. \node[line width=1pt,draw=blue,inner sep=-1pt,fit=(m-1-4) (m-6-4)](mfit){};
  27. \draw[blue,->] ([shift={(-5mm,-5mm)}]mfit.south) -| ([yshift=-1mm]mfit.south);
  28. \node[below=2\tabcolsep of m-6-1.west,color=blue] {Composantes du vecteur $f(e_j)$ dans la base $\mathcal{B}'$};
  29. \end{tikzpicture}
  30. \end{equation*}
  31. \end{document}



I want to remove the space between the matrix and
  1. \Mat_{\mathscr{B},\mathscr{B}'}(f)=
and adjust the sentence
  1. \node[below=2\tabcolsep of m-6-1.west,color=blue] {Composantes du vecteur $f(e_j)$ dans la base $\mathcal{B}'$};
written down.
Thank you for helping me.

Tags:

Matheux
Posts: 3
Joined: Mon Aug 18, 2014 5:23 pm

Postby Matheux » Mon Aug 18, 2014 6:01 pm

I just do this:
  1. \node[color=blue](C) at ([shift={(-17mm,-5mm)}]m-6-1.south) {Composantes du vecteur $f(e_j)$ dans la base $\mathcal{B}'$};

I await your solutions concerant the other problem.
Thanks.

Matheux
Posts: 3
Joined: Mon Aug 18, 2014 5:23 pm

Postby Matheux » Mon Aug 18, 2014 6:08 pm

I do this :

  1. \node[color=black] at ([shift={(-17mm,-8mm)}]m-3-1.north) {$\Mat_{\mathscr{B},\mathscr{B}'}(f)=$};


Now my question is, that is what I have done is very correct?


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 8 guests