# Commutative diagram with non-uniform arrows

I wrote following program for a commutative diagram.

\begin{tikzcd}
0\arrow[r] & M\arrow[r]\arrow[d] & N\arrow[r]\arrow[d] & K\arrow[d]\\
0\arrow[r] & M'\arrow[r]         & N' \arrow[r]        & K' \\
\end{tikzcd}


The output is the following.

Q. If I do not want the $0$ and arrow going at M, and want to put an arrow with end 0 after K, what should be change in commands? I added/removed some natural commands from above program; but it was always creating error. For example, I removed 0\arrow[r] from first command-line in above commands; but it produced error.

• So you want to add an arrow from 0 to K?
– user156344
Apr 12, 2019 at 15:24
• From K to 0, on right side; and I want to delete arrow towards M' from 0 (below). Apr 12, 2019 at 15:25

I would do this as follows:

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
& M\arrow[r]\arrow[d] & N\arrow[r]\arrow[d] & K\arrow[d]\arrow[r] & 0\\
0\arrow[r] & M'\arrow[r] & N' \arrow[r] & K' \\
\end{tikzcd}

\end{document}