Lorentz transformation matrix for all 3 spatial axes The lorentz transformation matrix (for all 3 spatial axes, not just a single dimension boost) appears to be commonly defined as the following:
$$
\begin{bmatrix}
 \gamma      &-\gamma v_x/c                   &-\gamma v_y/c                   &-\gamma v_z/c                    \\ 
-\gamma v_x/c&1+(\gamma-1)\dfrac{v_x^2}  {v^2}&  (\gamma-1)\dfrac{v_x v_y}{v^2}&  (\gamma-1)\dfrac{v_x v_z}{v^2} \\ 
-\gamma v_y/c&  (\gamma-1)\dfrac{v_y v_x}{v^2}&1+(\gamma-1)\dfrac{v_y^2}  {v^2}&  (\gamma-1)\dfrac{v_y v_z}{v^2} \\ 
-\gamma v_z/c&  (\gamma-1)\dfrac{v_z v_x}{v^2}&  (\gamma-1)\dfrac{v_z v_y}{v^2}&1+(\gamma-1)\dfrac{v_z^2}  {v^2}
\end{bmatrix}
$$
I tried to derive it myself by combining the matrices for the individual boost directions and making $v=|\vec{v}|$and ended up at
$$
\begin{bmatrix} ct' \\ x' \\ y' \\ z' \\ \end{bmatrix} = \begin{bmatrix} \gamma & -\beta_x\gamma& -\beta_y\gamma & -\beta_z\gamma \\ -\frac{\beta_y} {\gamma_{v_x}} & \frac{1}{\gamma_{v_x}} & 0 & 0 \\ -\frac{\beta_y}{\gamma_{v_y}} & 0 & \frac{1}{\gamma_{v_y}} & 0\\-\frac{\beta_z}{\gamma_{v_z}} & 0 & 0 & \frac{1}{\gamma_{v_z}} \\ \end{bmatrix}  \begin{bmatrix} ct \\ x \\ y \\ z \\ \end{bmatrix}
$$
Where $\gamma = \displaystyle\frac{1}{\sqrt{1-\displaystyle\frac{|\vec{v}|^2}{c^2}}} $ and
$\gamma_{v_x} = \displaystyle\frac{1}{\sqrt{1-\displaystyle\frac{v_x^2}{c^2}}}$
2 questions. Where do the bottom right 9 terms come from in the common definition and why is the top $\gamma$ and not $\frac{1}{\gamma}$ given that $l′=\frac{l}{\gamma}$ but $t′=t\gamma$
 A: Your main problem is that boosts are not closed under composition in Relativity - except when they are in the same or opposite directions. The composition of two boosts in different directions is a combination of a boost and a rotation of the axes. So, you can't derive the resulting boost by applying them one at a time along each axis ... without also reorienting the axes.
Velocity-space in Relativity is not flat, but curved.
The situation is the same as if you were to try to take a grid on the Earth's surface on the equator at 90 degrees longitude west, with X pointing east Y pointing north, then "boost" it up to the north pole, with X not pointing south along the prime meridian and Y pointing south along the 90 degrees east longitude; then "boost" it south back to the equator at 180 degrees longitude, with X now pointing north and Y pointing west, and then "boost" it back to 90 degrees west, with X still pointing north and Y pointing west. The result is a 90 degree rotation of the axes counter-clockwise.
A similar thing would happen with 3 boosts in different directions in velocity-space that bring you back to 0: there will be a rotation of axes - clockwise ... the other way, because the velocity space has negative curvature.
A: $$\Delta x =x_f-x_i=\gamma(\Delta x'+v\Delta t')=\gamma(x'_f-x'_i+v(t'_f-t'_i))$$ $$ \Delta t'=t'_f-t'_i=0$$
$$\Delta t'=t'_f-t'_i=\gamma(\Delta t-\frac{v(x_f-x_i)}{c^2})$$
$$\Delta x=x_f-x_i=0$$
We deduce these facts: $\Delta x=\gamma \Delta x'=l=\gamma \Delta l'$ and $\Delta t'= \gamma \Delta t$ not $t'=\gamma t$.The reason why is that we don't talk about a time of an event in spacetime. What we're interested in is time difference between two events.
