Documentation/TikZ & Graphics/How to Draw Arrows Between Nodes in TikZ
TikZ & Graphics

How to Draw Arrows Between Nodes in TikZ

Connecting nodes with arrows is the foundation of nearly every TikZ diagram — from flowcharts to neural network architectures. TikZ offers extensive control over arrow tips, line styles, curvature, and labels. This tutorial covers everything from basic straight arrows to complex curved paths with custom decorations. Bibby AI renders TikZ diagrams in real time as you type, giving you instant visual feedback that makes diagram creation far more productive than the compile-wait-check cycle on Overleaf.

Draw Basic Arrows Between Nodes

Create nodes and connect them with different arrow styles using the arrows.meta library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}

\begin{document}
\begin{tikzpicture}[
    node distance=3cm,
    every node/.style={draw, rounded corners, minimum height=1cm, minimum width=2cm},
    >={Stealth[length=3mm]}  % Default arrow tip
]
    \node (A) {Start};
    \node (B) [right=of A] {Process};
    \node (C) [right=of B] {End};

    % Basic arrows
    \draw[->] (A) -- (B);          % Single arrow
    \draw[->>] (B) -- (C);         % Double arrow tip

    % Below: more arrow styles
    \node (D) [below=2cm of A] {Node D};
    \node (E) [right=of D] {Node E};
    \node (F) [right=of E] {Node F};

    \draw[<->] (D) -- (E);         % Bidirectional
    \draw[-{Latex[length=4mm]}] (E) -- (F);  % Latex-style tip
\end{tikzpicture}
\end{document}

Draw Curved and Bent Arrows

Use bend left/right, out/in angles, or the to path for curved connections between nodes:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}

\begin{document}
\begin{tikzpicture}[
    node distance=3cm,
    every node/.style={draw, circle, minimum size=1cm},
    >={Stealth[length=3mm]}
]
    \node (A) {A};
    \node (B) [right=of A] {B};
    \node (C) [below right=2cm and 1.5cm of A] {C};

    % Curved arrows
    \draw[->, bend left=30] (A) to (B);   % Curve above
    \draw[->, bend right=30] (A) to (B);  % Curve below

    % Self-loop
    \draw[->] (C) to [loop below] (C);

    % Custom curve with control points
    \draw[->, dashed, red] (A) to[out=-30, in=150] (C);
    \draw[->, dotted, blue] (B) to[out=-150, in=30] (C);
\end{tikzpicture}
\end{document}

Customize Arrow Styles and Line Properties

Define reusable arrow styles with custom colors, thickness, dash patterns, and decorations:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning, decorations.markings}

\begin{document}
\begin{tikzpicture}[
    node distance=2.5cm,
    box/.style={draw, rectangle, rounded corners, minimum height=0.8cm, minimum width=1.8cm},
    important/.style={->{Stealth[length=4mm]}, line width=1.5pt, red},
    weak/.style={->, dashed, gray, thin},
    data/.style={->{Triangle[length=3mm]}, blue, thick},
]
    \node[box] (input) {Input};
    \node[box, right=of input] (process) {Process};
    \node[box, right=of process] (output) {Output};
    \node[box, below=1.5cm of process] (log) {Logger};

    \draw[important] (input) -- (process);
    \draw[data] (process) -- (output);
    \draw[weak] (process) -- (log);

    % Arrow with a midpoint marker
    \draw[->, thick, decorate, decoration={markings,
        mark=at position 0.5 with {\node[above, font=\scriptsize] {50\%};}}]
        (input) to[bend left=40] (output);
\end{tikzpicture}
\end{document}

💡 Tips

  • Always load the arrows.meta library for modern arrow tips — the old arrows library is deprecated.
  • Use positioning library with 'right=of A' syntax instead of manual coordinates for maintainable diagrams.
  • Define arrow styles in the tikzpicture options block for consistency and easy updates.
  • Bibby AI's live TikZ preview lets you tweak arrow curvature and styles interactively — much faster than Overleaf's recompile cycle.

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Draw Arrows Between Nodes in TikZ | Bibby AI