# arrow rule of three

How can we draw an arrow illustrating the rule of three like this:

If we have for example:

f(x_a) = y_a

f(x_b) = y_b

the arrow would start from y_a, go to f(x_b), then f(x_a) to end at y_b

• Have a look at tikzmark tag, this is what you're looking for. Jul 28 at 16:23

Here's a way to achieve that with tikzmark library. You may find more informations about how to use it if you want to adjust it the way you like. Just search follow tikzmark tagged posts here.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}
$\tikzmarknode{A}{f(x_a)}=\tikzmarknode{B}{y_a}$
\vspace{5pt}
$\tikzmarknode{C}{f(x_b)}=\tikzmarknode{D}{y_b}$

\begin{tikzpicture}[overlay,remember picture]
\draw[cyan,line width=1pt,->] plot [smooth,tension=1] coordinates {(A.south) ([yshift=7pt]D.north) ([yshift=5pt]C.north) (B.south west)};
\end{tikzpicture}
\end{document}

• Thank you very much! Jul 28 at 16:51