[Tex/LaTex] How to draw a diagram with arrows

arrowsdiagramsdraw

enter image description here

I want to draw the following diagram in LaTeX:

enter image description here

Best Answer

It's quite easy with tikz-cd:

enter image description here

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
1 \ar[r,"a"] \ar[rr,bend right,"c"'] & 2 \ar[r,"b"] & 3
\end{tikzcd}
\end{document}

But, in my humble opinion, I'd vote for picture-mode, for its far more user-friendly syntax:

enter image description here

\documentclass{article}
\usepackage{pict2e}
\begin{document}
\setlength{\unitlength}{1cm}
\begin{picture}(2.1,0.75)(0,-0.45)
\put(0,0){1}
  \put(0.2,0.1){\vector(1,0){0.75}}
  \put(0.5,0.15){\footnotesize$a$}
\put(1,0){2}
  \put(1.2,0.1){\vector(1,0){0.75}}
  \put(1.5,0.15){\footnotesize$b$}
\put(2,0){3}
  \qbezier(0.2,-0.05)(1.05,-0.7)(1.9,-0.05)
  \put(1.9,-0.05){\vector(4,3){0.0001}}
  \put(1.0,-0.55){\footnotesize$c$}
\end{picture}
\end{document}

Update: tikz-cd solution for the second diagram:

enter image description here

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
  1 \ar[r,"a_1"]
    \ar[rrrrr,bend right=50,looseness=0.3,"b"']
& 2 \ar[r,"a_2"]
& 3 \ar[r,"a_3"]
& \cdots
  \ar[r,"a_{n-2}"] % This arrow isn't in the picture, but I chose to add it. Feel free to remove.
& n-1 \ar[r,"a_{n-1}"]
& n
\end{tikzcd}
\end{document}
Related Question