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?
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?
%\documentclass{article}
\documentclass[margin=3.1415692mm,varwidth]{standalone}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
& P \ar[dl, dashed, "\tilde{f}" ']
\ar[d, "f"] \\
A \ar[r,twoheadrightarrow,"g" '] & B
\end{tikzcd}
\end{document}
Addendum:
%\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).
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}