Diagram for third isomorphism theorem $\mathrm{(G/K)/(H/K)} \cong \mathrm{G/H}$ I'm self-studying Lang's Algebra and on page 17, he gives a diagram for the third isomorphism theorem using a homomorphism f from $\mathrm{G/K}$ to $\mathrm{G/H}$ for two normal subgroups H and K of G such that $\mathrm{K\subseteq H}$. f is defined by $\mathrm{f(xK)=xH}$. Lang claims that the following commutative diagram represents this situation:
$\require{AMScd}$
\begin{CD}
0@>>>H@>>>G@>>>G/H@>>>0\\
@. @VVcanV @VVcanV @VVidV\\
0@>>>H/K@>>>G/K@>>>G/H@>>>0
\end{CD}
where the rows are exact and can is a canonical morphism and id is the identity morphism. My question is, why are the rows exact, why is the diagram commutative (the main thing which I don't understand), how does this represent the third isomorphism theorem?
I know that the first row with $\mathrm{G}$ is exact as the morphism from $\mathrm{H}$ to $\mathrm{G}$ is the inclusion (injective) and the morphism from $\mathrm{G}$ to $\mathrm{G/H}$ is the canonical map (surjective) but I'm not sure why the second row is exact; I'm not even sure what the morphisms are!(Lang doesn't mention what they are and in the diagram, they're just arrows with no labels). The map from $\mathrm{G/K}$ to $\mathrm{G/H}$ is probably the f mentioned above (which is surjective) but the map from $\mathrm{H/K}$ to $\mathrm{G/K}$ could be the inclusion map or the map induced by a homomorphism g which maps $\mathrm{H}$ to $\mathrm{G/K}$, which are both injective (Lang mentions this in an earlier example and says that that example relates to this). About the commutativity of the diagram, I think it's because isomorphisms are invertible or maybe because isomorphic groups are the same in structure, intuitively, this could mean a map from one has the same effect as a some map from the other group... For the relation to the third isomorphism theorem, there is no mention of $\mathrm{(G/K)/(H/K)}$ in the diagram, unlike the diagram Lang gave for the first isomorphism theorem so I don't have any idea about how it comes in at all.
 A: If the diagram commutes, what this means is every pair of "directed paths" (going in the direction of the arrows) that start and end in the same place represents the same morphism (broken down as different compositions).
Explicitly, the "down arrow" $H \to H/K$ is the maps that sends $h \mapsto hK$, and similarly with the map $G \to G/K$ (which sends $g \mapsto gK$).
The map $H/K \to G/K$ is indeed an inclusion map that sends $hK \mapsto hK$. You may want to convince yourself that any subgroup of $G/K$ is of the form $L/K$ where $L$ is a subgroup $K \leq L \leq G$.
The crux of this diagram is that we do indeed have a well-defined surjective homomorphism $G/K \to G/H$ given by $gK \mapsto gH$. This is because partitioning $G$ by $K$ represents a refinement of the partition of $G$ by $H$ (each coset of $H$ gets broken down into smaller cosets of $K$). For example, if:
$H = K \cup h_1K \cup \cdots \cup h_nK$, as a disjoint union, we can rewrite:
$gH = gK \cup gh_1K \cup \cdots \cup gh_nK$
Under our map $G/K \to G/H$ all the cosets $gK,gh_1K,\dots,gh_nK$ would map to $gH$ (since all the sets $h_iK \subseteq H$).
Alternatively, if the diagram commutes, the mapping $\pi_H:G \to G/H$ which equals $\text{id}_{G/H} \circ \pi_H$ must equal "the other path". If we call the map $G/K \to G/H$, say, $\phi$, we have:
$\phi\circ \pi_K = \pi_H$, which says that $\phi(gK) = \phi\circ \pi_K(g) = (\text{id} \circ \pi_H)(g) = \pi_H(g) = gH$.
Showing the map $G/K \to G/H$ is well-defined is really "the whole battle", since the homomorphism property follows readily by the rules of coset multiplication.
Finally, for any short exact sequence of groups:
$0 \to A \to B \to C \to 0$, we have (by the Fundamental Homomorphism Theorem):
$C \cong B/(\text{im }A)$, if $A \to B$ is an inclusion, we can simplify this to:
$C \cong B/A$. 
A: To show that a sequence
$0 \rightarrow A \stackrel{f}{\rightarrow} B \stackrel{g}{\rightarrow} C \rightarrow 0$
is exact is equivalent to showing that $B/A \cong C$.
Indeed, if the sequence is exact, then $f$ is injective, which implies that you can identify $A$ with $f(A)$, which is a subgroup of $B$. By the first isomorphism theorem, $B/f(A) \cong C$ since $f(A)=\text{ker}(g)$ and $g$ is surjective by exactness.
Conversely, if you know that $B/A \cong C$, you can write the inclusion of $A$ in $B$ as $f$ and the canonical quotient map as $g$ onto $C\cong A/B$.
As for the maps, the first one is just the inclusion and the second one is $f$. Once you know what they are, it is quite easy to check exactness, so that I don't know what he needs the first row for.
It is not unusual in algebra to just put arrows when you refer to the "most canonical map you could think of", and also isomorphic groups are often identified without even mentioning it (which is arguably meaningful, since they are "the same" as groups).
