3

Here is the figure I want to draw:

enter image description here

I do not know exactly from which vertex should I start drawing. Could anyone show me how to draw this please?

5
  • You have to consider a square with top left corner empty, so no arrows pointing from/to there.
    – Sigur
    Feb 12 at 13:00
  • @Sigur Can you show me how can I do that please?
    – Smart20
    Feb 12 at 13:46
  • 1
    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.
    – tolUene
    Feb 12 at 22:13
  • @tolUene thank you !
    – Smart20
    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
    – Black Mild
    Feb 13 at 7:36
6
%\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}

enter image description here

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}

enter image description here

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).

7
  • Should I remove document class {article} from my file to draw this?
    – Smart20
    Feb 12 at 15:18
  • 2
    +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
    – Smart20
    Feb 12 at 15:36
  • 1
    @Smart20 Replace the complete line "\documentclass[margin=3.1415692mm,varwidth]{standalone}" Feb 12 at 15:45
5

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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.