# Drawing commutative left triangle

Here is the figure I want to draw: I do not know exactly from which vertex should I start drawing. Could anyone show me how to draw this please?

• You have to consider a square with top left corner empty, so no arrows pointing from/to there. Feb 12 at 13:00
• @Sigur Can you show me how can I do that please? Feb 12 at 13:46
• As a recommendation, this commutative diagram generator can be very helpful both for not having to write code yourself as well as checking how you would go about writing it. Feb 12 at 22:13
• @tolUene thank you ! Feb 13 at 1:29
• "I do not know exactly from which vertex should I start drawing" >> you can start drawing from any vertex, as same as the way you choose the origin when you solving analytic geometry problems: choose any that you think fit. However, to start drawing that commutative diagram, a search in this texSE site with keyword "commutative diagram" will list a lot of how-to involving questions Feb 13 at 7:36

%\documentclass{article}
\documentclass[margin=3.1415692mm,varwidth]{standalone}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
& P \ar[dl, dashed, "\tilde{f}" ']
\ar[d, "f"]     \\
\end{tikzcd}
\end{document} %\documentclass{article}
\documentclass[margin=3.1415692mm,varwidth]{standalone}% show only image
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
& P \ar[dl, dashed, "\tilde{f}" ']  \\
A \ar[r,twoheadrightarrow,"g" ']    & B \ar[u, "f" ']
\end{tikzcd}
\end{document} Note: for MWE (Minimal Working Example) is used standalone document class because it show only image with small border and not complete page as it happens at other document classes. However, proposed solution work at all other document classes. If you like to see result at article document class, just uncomment first line of MWE and comment the second line (with inserting % at beginning of second line).

• Should I remove document class {article} from my file to draw this? Feb 12 at 15:18
• +1 for "margin=3.1415692mm" Feb 12 at 15:34
• @Smart20 No, you can keep your article class. Feb 12 at 15:35
• but it is giving me error@Dr.ManuelKuehner Feb 12 at 15:36
• @Smart20 Replace the complete line "\documentclass[margin=3.1415692mm,varwidth]{standalone}" Feb 12 at 15:45

Here there are two (2) MWE using xy package with the same tips of the tikz-cd in function of your tastes.

\documentclass[a4paper,12pt]{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\xymatrix@R=2.3pc@C=2.7pc{
& P \ar[d]^f \ar@{-->}[dl]_{\tilde{f}}\\
A \ar@{>>}[r]_g & B
}

\xymatrix@R=2.3pc@C=2.7pc{
& P \ar[d]^f \ar@{.>}[dl]_{\tilde{f}}\\
A \ar@{>>}[r]_g & B
}
\end{document} 