Here is the diagram I want to draw:

enter image description here

I know how to draw ordinary commutative diagram like this and here is my trial:

$$\begin{tikzcd}[row sep=huge]
  & X\ar[dl,"Id_{X}",swap,sloped] \ar[dr,"Id_{X}",sloped] \ar[d,dashed,"{ \vartriangle }" description] & \\
X & X\times X\ar[l,"Pr_{X}"] \ar[r,"Pr_{X}",swap] & X

But I do not know how to draw this tilted commutative diagram. Could anyone help me with drawing so, please?

  • Are you loading the tikz-cd package?
    – Sigur
    Apr 1, 2022 at 0:49
  • Yeah I do @Sigur
    – Idonotknow
    Apr 1, 2022 at 0:54

1 Answer 1


You should familiarize yourself with the basic examples in the tikz-cd documentation.

The basic idea is to create a matrix, in your example, 3 rows and 3 columns.

   & A\\
   & P\\
  X & & Y

enter image description here

Arrows are added using the \arrow command, which has many options. The arrows can be aimed using the letters u, d, l, r in any combination. For example, to point an arrow down two rows and right one column, use \arrow[ddr].

enter image description here

  \begin{tikzcd}[row sep=1cm]
    &A\arrow[ddl,"f_1"']\arrow[ddr,"f_2"]\arrow[d,dotted,"\bar{f}" description]\\
  • Thank you very very much!! this pdf is really super helpful!
    – Idonotknow
    Apr 1, 2022 at 1:43

You must log in to answer this question.

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