# Relative velocity with relativistic speeds in 3D

I have a question regarding the relative velocities of two objects in $3$D space. If objects $A$ and $B$'s velocities are being observed by stationary observer $C$, what is the velocity vector $A$ will see $B$ with or vice versa. This question also assumes $A$ and $B$ are also going at relativistic speeds.

$$\mathbf{v}_A=(a,b,c)$$ $$\mathbf{v}_B=(d,e,f)$$

If we assume all the vector components are being multiplied by $c$ (the speed of light) and can't be greater than $1$, what would $B$'s velocity vector be from $A$'s perspective?

• Could you describe the directions A and B are traveling relative to each other? I'm having difficulty visualizing your situation. – Jake Watrous Feb 8 '17 at 3:00
• In this scenario, A and B could have velocities pointing in similar directions or opposing directions. I mainly want the mathematical formula to do the calculation with. – Laff70 Feb 8 '17 at 3:48
• You're looking to find relative velocities, then? – Jake Watrous Feb 8 '17 at 3:50
• In this example the vectors for velocity are broken into x, y, and z vectors. – Laff70 Feb 8 '17 at 3:52

Let $C$ be rest frame $S$ (or lab frame, earth frame, etc) and $A$ be the moving frame $S'$.
Velocity of $B$ observed by $A$ is $$\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)}$$
where $\gamma_{v}=\dfrac{1}{\sqrt{1-\dfrac{v^2}{c^2}}}$, $\mathbf{u}=(d,e,f)$ is the velocity of $B$ observed by $C$ and $\mathbf{v}=(a,b,c)$ is the velocity of $A$ observed by $C$