How to interpret homotopy diagrams I have been reading Dexter Chua's Algebraic Topology notes and came across the following statement on page 13:
Let $\gamma_1, \gamma_2:[0,1]\to X$ be paths on a topological space $X$ such that $\gamma_1(1) = \gamma_2(0).$ Then if $\gamma_1'$ and $\gamma_2'$ are homotopic to $\gamma_1, \gamma_2$ respectively, the concatenations $\gamma_1  \cdot \gamma_2$ and $ \gamma_1'\cdot \gamma_2'$ are also homotopic.
The proof is by exhibiting a new homotopy from the given ones, but a rectangular diagram is first drawn (see here and here for pictures)
I have seen diagrams like this used to illustrate homotopies elsewhere, but I do not understand how to interpret them. What is the connection between the formula and the diagram? How can one be seen from the other? How can I prove the stated identities in the second picture? Any help or references are welcome
 A: A homotopy between paths is just a map out of $[0,1]^2$ satisfying some properties. The labels on these diagrams say, what values the map takes in the target space $X$.
Let’s discuss the second square in your second image. By convention we treat the $x$-component as path-parameter and the $y$-component as homotopy-parameter. We want that the homotopy preserves endpoints. This means that no matter where in the homotopy-parameter we are we want the path to start at $x_0$ and end in $x_1$. This is the reason why the left and right edge of the square are labeled as such. In explicit formulas we want: $H(0,y) = x_0$ and $H(1,y)=x_1$.
The second condition in this example is that it should be a homotopy from $c_{x_1}\ast\gamma$ to $\gamma$. This is why the bottom and top edges are labeled as such. In formulas $H(x,0) = c_{x_1}\ast\gamma(x)$ and $H(x,1)=\gamma(x)$.
Now the obvious question is what do we do at an arbitrary point $(x,y)$? One sensible thing would be that when fixing the homotopy-parameter $y$ we get the path which traverses $\gamma$ in the interval $[0,\frac{1}{2} + y\frac{1}{2}]$ and then traverses the constant path $c_{x_1}$ the remaining $[\frac{1}2+y\frac{1}2,1]$. This is what the diagonal line is representing with the label $x_1$ reminding us, that (at least for fixed $y$) the paths are compatible at this line.
This discussion leads us to the formula
$$H(x,y) = \left \{\begin{array}{ll}
\gamma((2-y)x) & x \leq \frac{1}2 + y \frac{1}2\\
c_{x_1}((2-y)x) & \text{else}
\end{array}\right.$$
which I hope I did not mess up.
To get explicit formulas out of the homotopy diagrams is a bit cumbersome, mostly because it involves making case distinctions and annoying reparametrizations. I do not know of a general recipe besides the fact that it usually is a matter of linear interpolations. The point of these diagrams is however that they make rather clear that one can find a homotopy. The idea of above homotopy is: take the identity homotopy of $\gamma$ and the identity homotopy of $c_{x_1}$, glue them together along $x_1$ and reparametrize such that the domain is the unit square.
