What is the name of this relative semidirect product of groups?

We have two well known definitions of the semidirect product $$N \rtimes H$$ of groups:

1. (Internal semidirect product) We write $$G = N \rtimes H$$ if $$N$$ is a normal subgroup of $$G$$, $$H$$ is another subgroup of $$G$$, $$N \cap H = \{1\}$$, and $$G = NH$$.
2. (External semidirect product) Given a homomorphism $$\phi: H \to \mathrm{Aut}(N)$$ from $$H$$ to the automorphism group of $$N$$, denoted $$h \mapsto \phi_h$$, we write $$N \rtimes H = N \rtimes_\phi H$$ to be the set of pairs $$(n,h)$$ with $$n \in N, h \in H$$ and group law $$(n_1,h_1) (n_2,h_2) = (n_1 \phi_{h_1}(n_2), h_1 h_2)$$.

The two are equivalent in the sense that every external semidirect product is an internal semidirect product (identifying $$N$$ with $$\{ (n,1): n \in N\}$$ and $$H$$ with $$\{(1,h): h \in H\}$$) and conversely every internal semidirect product is canonically isomorphic to an external semidirect product.

I recently had occasion to use the version of this concept when the two groups $$N,H$$ are allowed to intersect [EDIT: in a group normal in $$H$$], which then imposes two additional compatibility conditions on the homomorphism $$\phi$$, but I was unable to locate the standard name for the concept, which I will for the sake of this question call the "semidirect product $$N \rtimes_K H$$ of $$N,H$$ relative to $$K$$". It can be defined internally or externally:

1. (Internal relative semidirect product) We write $$G = N \rtimes_K H$$ if $$N$$ is a normal subgroup of $$G$$, $$H$$ is another subgroup of $$G$$, $$N \cap H = K$$ is a normal subgroup of $$H$$, and $$G = NH$$.
2. (External relative semidirect product). Given a commuting square $$\require{AMScd}$$ $$\begin{CD} K @>> \iota > N\\ @V \iota V V @VV V\\ H @>>\phi> \mathrm{Aut}(N) \end{CD}$$ of homomorphisms using the conjugation action of $$N$$ on itself [EDIT: with $$\iota$$ denoting inclusion maps, and obeying the additional compatibility condition $$\phi_h(k) = h k h^{-1}$$ for all $$h \in H$$ and $$k \in K$$, which among other things makes $$K$$ a normal subgroup of $$H$$] we write $$N \rtimes_{K,\phi} H = N \rtimes_{K,\phi} H = N \rtimes_K H$$ to be the quotient of $$N \rtimes_\phi H$$ by $$\{ (k, k^{-1}): k \in K \}$$ (which one can check to be a normal subgroup of $$N \rtimes_\phi H$$).

One can verify that every external relative semidirect product is an internal relative semidirect product, and conversely that every internal relative semidirect product is isomorphic to an external relative semidirect product.

This is such a basic operation that it must already be well known, so I ask

Question 1: What is the term for this operation in the literature?

Also,

Question 2: Does this operation have a category-theoretic interpretation (e.g., as the universal object for some diagram)?

EDIT: One can also think of $$N \rtimes_{K,\phi} H$$ as the amalgamated free product $$N \ast_K H$$ quotiented by the relations $$h n h^{-1} = \phi_h(n)$$ for $$h \in H$$, $$n \in N$$. So maybe "amalgamated semidirect product" could be a better name than "relative semidirect product".

• I don't know if there is a term, but a very specific case of this construction is the central product. The most general thing is a "factorization", which means $G = AB$ with $A$ and $B$ subgroups. If $A \cap B = \{1\}$, then you call this an exact factorization, or a Zappa-Szép product. Dec 26, 2021 at 4:06
• HNN extensions seem to be a particular case of this. Maybe the general case can be formulated as an instance of a graph of groups? Dec 26, 2021 at 5:08
• I think the subgroup you want to quotient out is not necessarily normal in the semidirect product of $N$ by $H$. Example: $N=\langle a,b\rangle\cong Z_2\times Z_2$, $H=\langle h\rangle\cong Z_4$, $\phi_h$ interchanges $a$ and $b$, $K\cong Z_2$, $\iota_N(K)=\langle a\rangle$, $\iota_H(K)=\langle h^2\rangle$. Dec 26, 2021 at 6:25
• @მამუკაჯიბლაძე: That HNN extensions are a special case is trivially true, because every HNN extension is a semidirect product of an infinite amalgamated product by $\mathbb{Z}$. (See Serre’s book Trees for an explanation.) It’s certainly not true that every instance of the OP’s construction is a graph of groups: every non-trivial graph of groups has infinite fundamental group.
– HJRW
Dec 26, 2021 at 8:20
• @RichardLyons Thanks, you made me realise there was an additional compatibility condition that I was implicitly assuming, namely that the action of $\phi_h$ on $K$ agrees with the conjugation action of $h$ on $K$ (which now has to be a normal subgroup in $H$, suppressing inclusion maps). Hopefully this is corrected now. Dec 26, 2021 at 17:37