I am trying to reproduce the image below in latex, but I am having a bit of difficulty to draw the arrows. Is there a an easy, less time consuming way to obtain this?

enter image description here

1 Answer 1


An easy way is using tikzmark. You may have a look at my beamer slide. (I will add more when I have time)

enter image description here

A function $f$ is a rule that assigns each element $x$ in a set $X$, called the domain, to \alert{exactly one element},
called $y=f(x)$, in a set $Y$, called the range.
\tikzmarknode{f}{f} :\tikzmarknode{X}{X}&\longrightarrow \tikzmarknode{Y}{Y}\\    
x&\longmapsto y=f(x).
\begin{tikzpicture}[overlay,remember picture]
\draw[magenta,stealth-] (X.north)++(90:.1)--+(90:.3) node[above]{domain};
\draw[magenta,stealth-] (Y.north east)++(90:.1)--+(30:.5) node[right]{range};
\draw[magenta,stealth-] (f.north west)++(90:.1)--+(150:.5) node[left]{function};

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .