# Creating double arrow / parallel arrows with tikz

I made this diagram and the only thing I want are two parallel arrows that go from node A to B and vice versa, so that I can label both arrows differently, because both nodes interact. You can choose which "nodes" of the matrix you use.

\begin{tikzpicture}[description/.style={fill=white,inner sep=2pt}]
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\matrix (m) [matrix of math nodes, row sep=6em,
column sep=6em, text height=3ex, text depth=0.5ex]
{ & (T_t)_{t\geq 0} & \\
(\mathcal{A},\mathcal{D}(\mathcal{A})) & & (R(\lambda,\mathcal{A}))_{\lambda\in \rho(\mathcal{A})} \\ };
\path[->] (m-2-3) edge (m-1-2);
\path[->] (m-1-2) edge (m-2-1) edge node[above left] {$\mathcal{A}f=\lim_{t\downarrow 0}\frac{P_tf-f}{t}$} (m-2-1);
;
\path[->] (m-2-1) edge (m-2-3);
\end{tikzpicture}


Here are three possibilities:

• draw 2 arrows, but bend them with bend left=<degrees> or bend right=<degrees>
• draw double arrows with double option
• draw two arrows leaving the nodes at different angles via node.angle

Here some example code:

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}

\begin{document}

\begin{tikzpicture}
\node[draw,circle] (A) at (90:3) {A};
\node[draw,circle] (B) at (210:3) {B};
\node[draw,circle] (C) at (330:3) {C};
\draw[-latex] (A) to[bend right=10] node[above,rotate=60] {$A\Rightarrow B$} (B);
\draw[-latex] (B) to[bend right=10] node[below,rotate=60] {$B\Rightarrow A$} (A);
\draw[-latex] (A) to[bend right=10] node[below,rotate=300] {$A\Rightarrow C$} (C);
\draw[-latex] (C) to[bend right=10] node[above,rotate=300] {$C\Rightarrow A$} (A);
\draw[-latex] (B) to[bend right=10] node[below] {$B\Rightarrow C$} (C);
\draw[-latex] (C) to[bend right=10] node[above] {$C\Rightarrow B$} (B);
\end{tikzpicture}

\begin{tikzpicture}
\node[draw,circle] (A) at (90:3) {A};
\node[draw,circle] (B) at (210:3) {B};
\node[draw,circle] (C) at (330:3) {C};
\draw[latex'-latex',double] (A) -- node[label=150:A-B,label=330:B-A] {} (B);
\draw[latex'-latex',double] (A) -- node[label=30:A-C,label=210:C-A] {} (C);
\draw[latex'-latex',double] (B) -- node[label=90:B-C,label=270:C-B] {} (C);
\end{tikzpicture}

\begin{tikzpicture}
\node[draw,circle] (A) at (90:3) {A};
\node[draw,circle] (B) at (210:3) {B};
\node[draw,circle] (C) at (330:3) {C};
\draw[-open triangle 45] (A.225) -- node[rotate=60,above] {A-B} (B.75);
\draw[open triangle 45-] (A.255) -- node[rotate=60,below] {B-A} (B.45);
\draw[-open triangle 45] (A.285) -- node[rotate=300,below] {A-C} (C.135);
\draw[open triangle 45-] (A.315) -- node[rotate=300,above] {C-A} (C.105);
\draw[-open triangle 45] (B.345) -- node[rotate=0,below] {A-C} (C.195);
\draw[open triangle 45-] (B.15) -- node[rotate=0,above] {C-A} (C.165);
\end{tikzpicture}

\end{document}


And the resulting image:

Edit 1: Sure it can be done with the matrix environment. But I just realized (again) that the variable width of the nodes causes problems when using the node.angle notation. This can be circumvented by using the calc library, although this solution also isn't perfect: in the second example, all pairs of arrows are horizontaly spaced 2 millimeters, but the distances look different. I'll think about this a little more.

\begin{tikzpicture}[description/.style={fill=white,inner sep=2pt}]
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\matrix (m) [matrix of math nodes, row sep=6em,
column sep=6em, text height=3ex, text depth=0.5ex]
{ & (T_t)_{t\geq 0} & \\
(\mathcal{A},\mathcal{D}(\mathcal{A})) & & (R(\lambda,\mathcal{A}))_{\lambda\in \rho(\mathcal{A})} \\ };
\path[->] (m-2-3.160) edge (m-1-2.270);
\path[->] (m-2-3.140) edge (m-1-2.290);
\path[->] (m-1-2) edge (m-2-1) edge node[above left] {$\mathcal{A}f=\lim_{t\downarrow 0}\frac{P_tf-f}{t}$} (m-2-1);
;
\path[->] (m-2-1) edge (m-2-3);
\end{tikzpicture}

\begin{tikzpicture}[description/.style={fill=white,inner sep=2pt}]
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\matrix (m) [matrix of math nodes, row sep=6em,
column sep=6em, text height=3ex, text depth=0.5ex]
{ & (T_t)_{t\geq 0} & \\
(\mathcal{A},\mathcal{D}(\mathcal{A})) & & (R(\lambda,\mathcal{A}))_{\lambda\in \rho(\mathcal{A})} \\ };
\path[->] ($(m-2-3.north)+(-0.1,0)$) edge ($(m-1-2.south)+(+0.1,0)$);
\path[<-] ($(m-2-3.north)+(+0.1,0)$) edge ($(m-1-2.south)+(+0.3,0)$);

\path[->] ($(m-1-2.south)+(-0.3,0)$) edge node[above left] {$\mathcal{A}f=\lim_{t\downarrow 0}\frac{P_tf-f}{t}$} ($(m-2-1.north)+(-0.1,0)$);
\path[<-] ($(m-1-2.south)+(-0.1,0)$) edge node[below right] {$\alpha\beta\gamma\delta\varepsilon\zeta\eta$} ($(m-2-1.north)+(+0.1,0)$);
;
\path[->] ($(m-2-1.east)+(0,-0.1)$) edge ($(m-2-3.west)+(0,-0.1)$);
\path[<-] ($(m-2-1.east)+(0,+0.1)$) edge ($(m-2-3.west)+(0,+0.1)$);
\end{tikzpicture}


• Thank you, but is it possible to do that with the matrix environment? May 22 '12 at 19:35