# Derivation of Lorentz velocity-addition formulae given non-orthogonal velocities

I'm wondering how to derive the general relativistic velocity-addition formula that Ng Chung Tak provided in answering this question: https://physics.stackexchange.com/q/310508.

Given

• Frame $S'$ moves with velocity $\mathbf{v}$ relative to inertial frame $S$.
• An object $B$ with position vector $\mathbf{r}=<x,y,z>$ moves with velocity $\mathbf{u}$, both vectors relative to $S$.
• Velocities $\mathbf{u}$ and $\mathbf{v}$ are not orthogonal to each other.

How do we derive the velocity $\mathbf{v}'$ of that object relative to $S'$, which Ng Chung Tak gave as follows?

$\mathbf{v}'= \frac{\mathbf{u}+ \left( \dfrac{\gamma_{v}-1}{v^2}\mathbf{u}\cdot \mathbf{v}-\gamma_{v} \right)\mathbf{v}} {\gamma_{v} \left( 1-\dfrac{\mathbf{u}\cdot \mathbf{v}}{c^2} \right)}$

I tried deriving it myself before coming to Stack Exchange. Looking just at the $x$ component of $\mathbf{v}'$, I worked out the following:

$dx'=\dfrac{dx-v_xdt}{\sqrt{1-v_x^2/c^2}}\\ dt'=\dfrac{dt-|\mathbf{v}|d|\mathbf{r}|/c^2}{\sqrt{1-\mathbf{v}^2/c^2}}\\ \Rightarrow v'_x=\dfrac{dx'}{dt'}= \dfrac{ (u_x-v_x)\sqrt{1-\mathbf{v}^2/c^2} } {(1-|\mathbf{v}||\mathbf{u}|/c^2)\sqrt{1-v_x^2/c^2}}.$

I know I must be going in the wrong direction because, testing a simple example in which $\mathbf{v}$ and $\mathbf{u}$ are orthogonal, where $\mathbf{v}=<v,0,0>$ and $\mathbf{u}=<0,u,0>,\ v_x'$ just equals $-v_x$, and that is not what my formula above turns out.

Let us write $d\boldsymbol{r}$ as $d\boldsymbol{r} = d\boldsymbol{r}_\parallel + d\boldsymbol{r}_\perp$, where $d\boldsymbol{r}_\parallel$ and $d\boldsymbol{r}_\perp$ are parallel and perpendicular to $\boldsymbol{v}$ respectively. We find \begin{align} d\boldsymbol{r}_\parallel &= \frac{d\boldsymbol{r}\cdot\boldsymbol{v}}{v^2}\boldsymbol{v} = \frac{\boldsymbol{u}\cdot\boldsymbol{v}}{v^2}\boldsymbol{v}\,dt\\ d\boldsymbol{r}_\perp &= d\boldsymbol{r} - d\boldsymbol{r}_\parallel = \left(\boldsymbol{u} - \frac{\boldsymbol{u}\cdot\boldsymbol{v}}{v^2}\boldsymbol{v}\right)dt. \end{align} We now apply the Lorentz transforms \begin{align} d\boldsymbol{r}'_\parallel &= \gamma_v\left(d\boldsymbol{r}_\parallel - \boldsymbol{v}\,dt\right) = \gamma_v\left(\boldsymbol{u}_\parallel - \boldsymbol{v}\right)dt\\ d\boldsymbol{r}'_\perp &= d\boldsymbol{r}_\perp = \boldsymbol{u}_\perp\,dt\\ dt' &= \gamma_v\left(dt - \frac{d\boldsymbol{r}_\parallel\cdot\boldsymbol{v}}{c^2}\right) = \gamma_v\left(1 - \frac{\boldsymbol{u}_\parallel\cdot\boldsymbol{v}}{c^2}\right)dt. \end{align}
Note that $d\boldsymbol{r}_\perp$ is not affected, since it is perpendicular to $\boldsymbol{v}$. Dividing the first two equations by $dt'$, we get \begin{align} \boldsymbol{u}'_\parallel & = \frac{\boldsymbol{u}_\parallel - \boldsymbol{v}}{1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2}}\\ \boldsymbol{u}'_\perp &= \frac{\boldsymbol{u}_\perp}{\gamma_v(1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2})}, \end{align}
using $\boldsymbol{u}_\parallel\cdot\boldsymbol{v}=\boldsymbol{u}\cdot\boldsymbol{v}$. Therefore \begin{align} \boldsymbol{u}' &= \boldsymbol{u}'_\parallel + \boldsymbol{u}'_\perp = \frac{\gamma_v\left(\boldsymbol{u}_\parallel - \boldsymbol{v}\right) + \boldsymbol{u}_\perp}{\gamma_v\left(1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2}\right)}\\ &= \frac{\gamma_v\left(\boldsymbol{u}_\parallel - \boldsymbol{v}\right) + \boldsymbol{u} - \boldsymbol{u}_\parallel}{\gamma_v\left(1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2}\right)}\\ &= \frac{\boldsymbol{u} + (\gamma_v - 1)\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{v^2}\boldsymbol{v} - \gamma_v\boldsymbol{v}}{\gamma_v\left(1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2}\right)}\\ &= \frac{\boldsymbol{u} + \left(\frac{\gamma_v - 1}{v^2}\boldsymbol{u}\cdot\boldsymbol{v} - \gamma_v\right)\boldsymbol{v}}{\gamma_v\left(1 -\frac{\boldsymbol{u}\cdot\boldsymbol{v}}{c^2}\right)} \end{align}