I can't find how to draw a surjective arrow between two nodes in TikZ. I'd like it to look somewhat like this.

enter image description here


A pure TikZ solution involves using ->> and that's about it:

\node at (0,0) (a) {A};
\node at (1,0) (b) {B};
\path [draw,->>] (a) -- (b);


And we are done. :)


By importing tikz-cd package, you can use \arrow command with twoheadrightarrow option as follows:



A \arrow[r, tail, twoheadrightarrow, dashed] & B


My further proposal would be to use, as an alternative, the xy package. You get the same results as in the previous answers.

enter image description here

\xymatrix@C=1.5pc{A\ar@{->>}[r]& B

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.