# Diagram with diagonal, vertical, horizontal and bent arrows

How can I draw the following diagram using tikz-cd?

I've seen a lot of examples on the internet, but none of them helped (actually, they confused me more).

You can use tikz-cd.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd} & A\arrow[d] \arrow[ddl,bend right]\arrow[ddr,bend left] & \\ & B \arrow[dr] \arrow[dl]& \\ C \arrow[rr]& & D \\ \end{tikzcd}$
\end{document}

Or with some smaller column sep.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd}[column sep=1em] & A\arrow[d] \arrow[ddl,bend right]\arrow[ddr,bend left] & \\ & B \arrow[dr] \arrow[dl]& \\ C \arrow[rr]& & D \\ \end{tikzcd}$
\end{document}

• Can you explain how the ampersands work here (how many do I need, where do I need them etc)? I couldn't figure it out. Feb 21, 2020 at 21:41
• @rmdmc89 tikz-cd is basically an extension of the matrix library of tikz. So you may think of A, B, C and D as being arranged in a matrix, and connected by appropriate arrows. The columns of the matrix get separated by &, and the rows by \\ . In the case at hand, we may want to use a 3x3 matrix. The distances between rows and columns can be changed with column sep and row sep, respectively.
– user194703
Feb 21, 2020 at 21:44