# An arrow between two points using tikz-cd

I drew the following diagram. I want to write "j" as a description in the midway (between K and P) but it doesn't apear. My code is:

\documentclass{article}
\usepackage{amsmath,tikz-cd}
\begin{document}
\begin{equation*}
\begin{tikzcd}[row sep=huge,column sep=huge]
0 \arrow{r} & P \arrow{r}{\begin{bmatrix}
p_{2} \\ p_{1}
\end{bmatrix}
}
& B \bigoplus A \arrow{r}{\begin{bmatrix}
\alpha_{2} ~~ -\alpha_{1}
\end{bmatrix}
} & C \\
& P^{\prime} \arrow[ur,"{\begin{bmatrix}
{p^{\prime}}_{2} \\ {p^{\prime}}_{1}
\end{bmatrix}}" description] \arrow[r,dotted,"\exists!~u"'] & K
\arrow[u,tail,"i ~ = ~ \begin{bmatrix}
i_{B} \\ i_{A}
\end{bmatrix}"']
\arrow[ul,"j" description, to path={--
([yshift=-2ex,xshift=-3ex]\tikztostart.south) -|
([yshift=-2ex,xshift=-3ex]\tikztotarget.south) -- (\tikztotarget)}]
\end{tikzcd}
\end{equation*}
\end{document}


• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – CarLaTeX Jul 10 '18 at 6:04

like this?

label to path is added as node on path:

\documentclass{article}
\usepackage{amsmath,tikz-cd}
\begin{document}
$\begin{tikzcd}[row sep=huge,column sep=huge] 0 \arrow{r} & P \arrow{r}{\begin{bmatrix} p_{2} \\ p_{1} \end{bmatrix} } & B \bigoplus A \arrow{r}{\begin{bmatrix} \alpha_{2} ~~ -\alpha_{1} \end{bmatrix} } & C \\ & P^{\prime} \arrow[ur,"{\begin{bmatrix} {p^{\prime}}_{2} \\ {p^{\prime}}_{1} \end{bmatrix}}" description] \arrow[r,dotted,"\exists!~u"'] & K \arrow[u,tail,"i = \begin{bmatrix} i_{B} \\ i_{A} \end{bmatrix}"'] \arrow[to path={-- ([shift={(-2ex,-3ex)}]\tikztostart.south) -| ([shift={(-2ex,-3ex)}]\tikztotarget.south) node[pos=0.25,below,font=\footnotesize] {j} % <--- -- (\tikztotarget)}, ul] \end{tikzcd}$
\end{document}


edit: from your comments one can guess that you looking for the following solution:

\documentclass{article}
\usepackage{amsmath,tikz-cd}
\begin{document}
$\begin{tikzcd}[row sep=22mm,column sep=huge] 0 \arrow{r} & P \arrow{r}{\begin{bmatrix} p_{2} \\ p_{1} \end{bmatrix} } & B \bigoplus A \arrow{r}{\begin{bmatrix} \alpha_{2} ~~ -\alpha_{1} \end{bmatrix} } & C \\ & P' \arrow[ur,"{\begin{bmatrix} {p'}_{2} \\ {p'}_{1} \end{bmatrix}}" description, pos=0.25] \ar[r,dotted,"\exists!~u"'] & K \arrow[u,tail,"i = \begin{bmatrix} i_{B} \\ i_{A} \end{bmatrix}"'] \arrow[ul,"j" description, pos=0.25] \end{tikzcd}$
\end{document}

• Thanks. It helped me a lot. How can I put "j" like the matrix between P' and B $\bigoplus$ A. – math16 Jul 10 '18 at 7:13
• @math16, sorry, your sub question in above comment is not clear. do you like that matrix is above arrow? – Zarko Jul 10 '18 at 7:20
• No. I want to write "j" in the midway and remove those parts of arrow that "j" is there. – math16 Jul 10 '18 at 7:23
• than "j" will overwrite exiting label between P' and B $\bigoplus$ A. is this what you want? please add a sketch to your question and with it clarify what you like to obtain. – Zarko Jul 10 '18 at 7:30
• No. "j" is between K and P (in the midway, some parts of this arrow should be removed for "j"). – math16 Jul 10 '18 at 7:32