Lorentz boost matrix for an arbitrary direction in terms of rapidity We have derived the Lorentz boost matrix for a boost in the x-direction in class, in terms of rapidity which from Wikipedia is: 
Assume boost is along a direction $\hat{n}=n_x \hat{i}+n_y \hat{j}+n_z \hat{k}$, 

How do I generalise this to a boost in any arbitrary direction, and what is the result? Any help most appreciated. 
 A: This answer describes how to transform event coordinates in $S$ to $S'$ coordinates when $S'$ is moving with general velocity $\vec{v}$ in $S$ frame.
Using The General Lorentz Transformation YouTube video, it can be done in the following way:
Let $\vec{r}=\vec{r}(ct, x, y, z)$ in $S$, and this same event in $S'$ be $\vec{r}'=\vec{r}'(ct', x', y', z')$. $S'$ is moving away from $S$ with velocity $\vec{v}$.

Spatial coordinates
Ignoring the $ct$ dependence of $r$ and $r'$ for now, write $\vec{r}$ as a sum of two vectors, one parallel with $\vec{v}$, one perpendicular to it.
$\vec{r}=\vec{r}_{\parallel}+\vec{r}_{\perp}$.
Since only the parallel component to $\vec{v}$ is not Lorentz invariant, we can write:
$$\vec{r}'=\vec{r}_{\perp}+\gamma(\vec{r}_{\parallel}-\vec{v}t)$$
Rewrite, using $\vec{r}_{\perp}=\vec{r}-\vec{r}_{\parallel}$:
$$\vec{r}'=\vec{r}-\vec{r}_{\parallel}+\gamma(\vec{r}_{\parallel}-\vec{v}t)$$
$$\vec{r}'=\vec{r}+(\gamma-1)\vec{r}_{\parallel}-\gamma\vec{v}t$$
Writing $\vec{r}_{\parallel}$ as:
$$\vec{r}_{\parallel} = \vec{r}\cdot{\hat{\vec{v}}}\hat{\vec{v}}=\frac{\vec{r}\cdot{\vec{v}}\vec{v}}{|\vec{v}|^2}$$
we have:
$$\vec{r}'=-\gamma\vec{v}t+\vec{r}+(\gamma-1)\frac{\vec{r}\cdot{\vec{v}}\vec{v}}{|\vec{v}|^2}$$
Expand terms of $\vec{r}'$:
$$x'=-\gamma v_x t + x + (\gamma -1)\frac{(xv_x)}{|\vec{v}|^2}v_x + (\gamma -1)\frac{(yv_y)}{|\vec{v}|^2}v_x + (\gamma -1)\frac{(zv_z)}{|\vec{v}|^2}v_x$$
$$y'=-\gamma v_y t + y + (\gamma -1)\frac{(xv_x)}{|\vec{v}|^2}v_y + (\gamma -1)\frac{(yv_y)}{|\vec{v}|^2}v_y + (\gamma -1)\frac{(zv_z)}{|\vec{v}|^2}v_y$$
$$z'=-\gamma v_z t + z + (\gamma -1)\frac{(xv_x)}{|\vec{v}|^2}v_z + (\gamma -1)\frac{(yv_y)}{|\vec{v}|^2}v_z + (\gamma -1)\frac{(zv_z)}{|\vec{v}|^2}v_z$$

Time dependence
In standard configuration, the $ct$ dependence transforms as:
$$ct'=\gamma\left(ct-\frac{vx}{c}\right)$$
Where $vx$ is: the component ($x$) of whatever event we are Lorentz transforming in the direction of the movement of the primed frame ($S'$), times the speed ($v$)of the movement of $S'$. Now $S'$ is not moving along the positive $x$ direction anymore, so replace $vx$ with $\vec{v}\cdot\vec{r}$: this is the component of $\vec{r}$ in the direction of $S'$-movement unit-vector $\hat{\vec{v}}$ times the speed $v$. So we have:
$$ct'=\gamma\left(ct-\frac{\vec{v}\cdot\vec{r}}{c}\right)=\gamma ct - \gamma \frac{xv_x}{c} -\gamma \frac{yv_y}{c} - \gamma \frac{zv_z}{c}$$

Matrix form
Put the equations above to matrix form, using notation: $\vec{\beta}=\frac{\vec{v}}{c}$ and $\beta=|\vec{\beta}|$:
$$
\begin{pmatrix}
           ct' \\
           x' \\
           y' \\
           z'
\end{pmatrix}
= 
\begin{pmatrix}
    \gamma & -\gamma\beta_x & -\gamma\beta_y & -\gamma\beta_z\\
    -\gamma\beta_x & 1+(\gamma-1)\frac{\beta_x^2}{\beta^2} & (\gamma-1)\frac{\beta_y \beta_x}{\beta^2} & (\gamma-1)\frac{\beta_z \beta_x}{\beta^2} \\
    -\gamma\beta_y & (\gamma-1)\frac{\beta_x \beta_y}{\beta^2} & 1+(\gamma-1)\frac{\beta_y^2}{\beta^2} & (\gamma-1)\frac{\beta_z \beta_y}{\beta^2} \\
    -\gamma\beta_z & (\gamma-1)\frac{\beta_x \beta_z}{\beta^2} & (\gamma-1)\frac{\beta_y \beta_z}{\beta^2} & 1+(\gamma-1)\frac{\beta_z^2}{\beta^2}
\end{pmatrix}
\begin{pmatrix}
           ct \\
           x \\
           y \\
           z
\end{pmatrix}
$$
which is also the matrix given in Thomas' answer, so we are done.
A: Have you tried Wikipedia - Lorentz transformation - Proper transformations?
I think that is almost what you need:
$$\begin{bmatrix} ct' \\ x' \\ y' \\ z' \\ \end{bmatrix} =
\begin{bmatrix}
 \gamma &-\gamma \beta_x &-\gamma \beta_y &-\gamma \beta_z \\ 
-\gamma \beta_x&1+(\gamma-1)\dfrac{\beta_x^2}{\beta^2}&  (\gamma-1)\dfrac{\beta_x \beta_y}{\beta^2}&  (\gamma-1)\dfrac{\beta_x \beta_z}{\beta^2} \\ 
-\gamma \beta_y&  (\gamma-1)\dfrac{\beta_y \beta_x}{\beta^2}&1+(\gamma-1)\dfrac{\beta_y^2}  {\beta^2}&  (\gamma-1)\dfrac{\beta_y \beta_z}{\beta^2} \\ 
-\gamma \beta_z&  (\gamma-1)\dfrac{\beta_z \beta_x}{\beta^2}&(\gamma-1)\dfrac{\beta_z \beta_y}{\beta^2}&1+(\gamma-1)\dfrac{\beta_z^2}  {\beta^2}
\end{bmatrix}
\begin{bmatrix} ct \\ x \\ y \\ z \\ \end{bmatrix}$$
A: You act with an arbitrary rotation on the boost in one direction.
