Let \(f\colon Z\to X\) and \(g\colon Z\to Y\) be continuous maps. The pushout of \(X \xleftarrow{f} Z \mapsvia{g} Y\) is the quotient space \[ X \disjoint_Z Y \coloneqq \qty{X \disjoint Y}/\sim ,\] where \(\sim\) is the equivalence relation generated by \(f(z)\sim g(z)\) for \(z\in Z\), together with the maps \(j_X\colon X\to X\disjoint_Z Y\) and \(j_Y\colon Y\to X\disjoint_Z Y\) induced by the inclusions.
The maps satisfy \(j_X\circ f = j_Y\circ g\), and \((X\disjoint_Z Y, j_X, j_Y)\) is the colimit of \(X \xleftarrow{f} Z \mapsvia{g} Y\) in the category of topological spaces: for continuous maps \(a\colon X\to W\) and \(b\colon Y\to W\) with \(a\circ f = b\circ g\) there is a unique continuous \(\varphi\colon X\disjoint_Z Y\to W\) with \(\varphi\circ j_X = a\) and \(\varphi\circ j_Y = b\). When \(g\) is the inclusion of a subspace \(Z\subseteq Y\), the pushout is the space obtained by attaching $Y$ to $X$ along $f$. The dual construction is the pullback. If \(X = U\union V\) with \(U, V\) open and path-connected, \(U\intersect V\) path-connected and \(x_0\in U\intersect V\), then \(X\) is the pushout of \(U \hookleftarrow U\intersect V \injects V\), and the Seifert–van Kampen theorem gives the corresponding pushout of groups, the amalgamated free product \(\pi_1(X, x_0)\cong \pi_1(U, x_0) \ast_{\pi_1(U\intersect V, x_0)} \pi_1(V, x_0)\) [@Hat02].
[@Hat02].