8

I would like to draw two matrices side by side, and use an arrow to connect them. Does anyone know how to specify the exact location of these two matrices?

1
  • 1
    You'd better add some sketch of your code or at least (photo) picture showing your idea.
    – Olga K
    May 6 '16 at 19:45
10

A matrix is just a special type of node, and the same syntax applies. You can use for example explicit coordinates, or the positioning library.

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\matrix (m1) at (0,0) { \node{a}; \\ \node{b}; \\};
\matrix (m2) at (4,0) { \node{c}; \\ \node{d}; \\};
\matrix (m3) [below=of m1] { \node{e}; \\ \node{f}; \\};

\draw [->] (m1) -- (m2);
\draw [->] (m1) -- (m3);
\end{tikzpicture}
\end{document}

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.