# Double tip arrow with upper symbol in Tikz

How can I write this diagram in Tikz:

Here is my try:

\begin{tikzcd}
x \arrow{leftrightarrow}{r}{*} \arrow[dashed]{dr}{*} & &
y \arrow[dashed]{dl}{*}  \\
& z &
\end{tikzcd}


Possible solution:

\documentclass[tikz]{standalone}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
x \arrow[rr, leftrightarrow, "*"] \arrow[dr, dashrightarrow, "*"']
&  & y \arrow[dl, dashrightarrow, "*"] \\
& z &
\end{tikzcd}

\end{document}


Edit: Another solution with pure TikZ:

\documentclass[tikz]{standalone}

\begin{document}

\begin{tikzpicture}
\node (x) at (0,0) {$x$};
\node (y) at (2,0) {$y$};
\node (z) at (1,-1) {$z$};

\draw[<->] (x) -- node[above] {$\ast$} (y);
\draw[->,dashed] (x) -- node[below left] {$\ast$} (z);
\draw[->,dashed] (y) -- node[below right] {$\ast$} (z);
\end{tikzpicture}

\end{document}


\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
x \arrow[dashed,"*"']{dr}\arrow[leftrightarrow]{rr}{*} & & y \arrow[dashed]{dl}{*}\\
& z &
\end{tikzcd}

\end{document}

• OK, this is almost a bit silly. Two very similar solutions posted at almost the same time … If yours gets accepted, I will delete mine. – Jasper Habicht Feb 14 '18 at 13:45
• @JasperHabicht No, leave it. It's a different syntax. Someone will find it useful. P.S.: I tried to see which answer was the first one but it's easier to see if Han shot first :P – Phelype Oleinik Feb 14 '18 at 13:52

A simple tikz solution:

\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw[<->] (0,0) node[left] {$x$}--(4,0) node[midway, above]{$*$} node[right]{$y$};
\draw[->,dashed] (0,0)--(2,-1.7) node[midway,below left]{$*$} node[below]{$z$};
\draw[->,dashed] (4,0)--(2,-1.7) node[midway,below right]{*};
\end{tikzpicture}
\end{document}


Output:

• The arrow heads collide. This could be prevented using shorten >. – Jasper Habicht Feb 14 '18 at 15:21
• @JasperHabicht it is an option, but it would be solved easier by another arrowhead like "-latex" instead of "->" – koleygr Feb 14 '18 at 21:09