How to make a good diagram arrow

A somewhat more concise tikz alternative:

\documentclass[tikz, border=3mm]{standalone}
\usepackage{amsmath, amssymb}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}[inner sep=5pt, >=latex, 
   label/.style={auto, inner sep=1pt, circle}
   ]
\path (0,0) node (E) {$E$}
  (120:1.5) node (kerf) {$\ker(f)$}
  (180:1.5) node (kerw) {$\ker(w)$}
  (4,0) node (K) {$\mathbb{K}$}
  (0,-3) node (F) {$F$}
  (2,-2) node (EE) {\phantom{$E$}}
  (EE.west) node[anchor=west] {$E/\ker(f) \simeq Im(f)$};

\path (E) -- node[sloped] {$\subset$} (kerf);
\path (kerw) -- node[sloped] {$\supset$} (kerf);
\path (kerw) -- node {$\subset$} (E);
\draw[->] (E) -- node[label] {$w$} (K);
\draw[->] (E) -- node[label] {$f$} (F);
\draw[->] (E) -- node[label] {$\pi_f$} (EE);
\draw[->, dashed] (EE) -- node[label] {$w'$} (K);
\end{tikzpicture}
\end{document}

enter image description here


Since it seems a commutative diagram, what about using tikz-cd?

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{amsmath, amssymb}
\begin{document}
    \begin{tikzcd}% 
        &[-30pt] \ker(f) \arrow[dl, phantom, sloped, "\supset"] \arrow[dr, phantom, sloped, "\subset"]&[-30pt] & &[-75pt] \\[-4pt]
        \ker(w) \arrow[rr, phantom, "\subset"]& & E \arrow[rr, "w"] \arrow[rd, end anchor={[xshift=.5em]north west}, "\pi_f"] \arrow[dd, swap, "f"] & & \mathbb{K}\\
        & & & E/\ker(f) \simeq Im(f) \arrow[ru, dashrightarrow, start anchor={[xshift=1.1em]north west}, swap, "w'"]& \\
        & & F & & 
    \end{tikzcd}%
\end{document}

enter image description here


A TikZ alternative (it is not so concise as it is pstricks:

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{arrows.meta, positioning, quotes, shapes.multipart}
\usepackage{amsmath, amssymb}
\DeclareMathOperator{\ar}{ar}
\usepackage{graphicx}

\begin{document}
\begin{tikzpicture}[
     node distance = 22mm and 24mm,
every label/.style = {label distance=0mm, inner sep=0mm, 
                      xshift=1em, align=center},
RS/.style = {%Rectangle Split 
    rectangle split, rectangle split horizontal, rectangle split parts=2,
    inner ysep=1mm, inner xsep=0mm}
                    ]
\node (n1) [RS,label={$\ker(f)$\\ 
                       \rotatebox[origin=c]{240}{$\subset$} 
                       \qquad
                       \rotatebox[origin=c]{300}{$\subset$}}]
    {\nodepart{one} $\ker(w)\quad\subset\quad$
     \nodepart{two} $E$
     }; 
\node (n2) [right=of n1] {$\mathbb{K}$};
\node (n3) [below=of n1.two south] {$F$};
\node (n4) [RS,right=of n3] 
    {\nodepart{one} $E/$
     \nodepart{two} $\ker(f) \simeq Im(f) \ar[u]_{w'}$
     };
\draw[-Latex]   (n1) edge ["$w$"] (n2)
                (n1.two south) edge ["$f$"] (n3)
                (n1.south east) edge ["$\pi_f$"] (n4.north west)
                (n4.one north) to ["$w'$"] (n2);
\end{tikzpicture}
\end{document}

enter image description here

Tags:

Diagrams