# Special Relativity/Mathematical approach2
## Four vectors

A four vector represents a displacement in spacetime.
If the spacetime has a metric given by:
$ds^{2}=dt^{2}-dx^{2}-dy^{2}-dz^{2}$
and if the space-time is flat the magnitude of the four vector is calculated from:
$\mathbf {S} ^{2}=A^{2}-B^{2}-C^{2}-D^{2}$
Where A, B, C, D are the projections of the vector on the corresponding coordinate axes (t,x,y,z). The magnitude of a four vector is given by:
$S=|\mathbf {S} ^{2}|^{1/2}={\sqrt {A^{2}-B^{2}-C^{2}-D^{2}}}$
The scalar product of a four vector (also known as the "dot product" or "inner product") can be derived in the same way as the scalar product for an ordinary vector (a three vector, see scalar product). So the scalar product of two four vectors, $\mathbf {A.B}$ is:
$\mathbf {A.B} =A_{t}B_{t}-A_{x}B_{x}-A_{y}B_{y}-A_{z}B_{z}$
This can also be derived easily from the metric tensor of Minkowski spacetime. The scalar product of two four-vectors x and y is defined (using indicial notation) as:
    $x\cdot y=x^{a}\eta _{ab}y^{b}=\left({\begin{matrix}x^{0}&x^{1}&x^{2}&x^{3}\end{matrix}}\right)\left({\begin{matrix}-1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&1\end{matrix}}\right)\left({\begin{matrix}y^{0}\\y^{1}\\y^{2}\\y^{3}\end{matrix}}\right)=-x^{0}y^{0}+x^{1}y^{1}+x^{2}y^{2}+x^{3}y^{3}$
The scalar product of four vectors is independent of the coordinate system:
    ${\begin{matrix}A'_{x}&=&\gamma \left(A_{x}-{\frac {v}{c}}A_{t}\right)\\A'_{y}&=&A_{y}\\A'_{z}&=&A_{z}\\A'_{t}&=&\gamma \left(-{\frac {v}{c}}A_{x}+A_{t}\right)\end{matrix}}$
The scalar product in this frame is:
    ${\underline {A'}}\cdot {\underline {B'}}=A'_{x}B'_{x}+A'_{y}B'_{y}+A'_{z}B'_{z}-A'_{t}B'_{t}$
Simplifying, we get:
    ${\begin{matrix}{\underline {A'}}\cdot {\underline {B'}}&=&\gamma ^{2}\left(A_{x}B_{x}-{\frac {v}{c}}(A_{x}B_{t}+A_{t}B_{x})+{\frac {v^{2}}{c^{2}}}A_{t}B_{t}\right)\\&&+A_{y}B_{y}+A_{z}B_{z}&\\&&-\gamma ^{2}\left({\frac {v^{2}}{c^{2}}}A_{x}B_{x}-{\frac {v}{c}}(A_{x}B_{t}+A_{t}B_{x})+A_{t}B_{t}\right)\\&=&\left(1-{\frac {v^{2}}{c^{2}}}\right)^{-1}\left(A_{x}B_{x}+{\frac {v^{2}}{c^{2}}}A_{t}B_{t}\right)\\&&+A_{y}B_{y}+A_{z}B_{z}\\&&-\left(1-{\frac {v^{2}}{c^{2}}}\right)^{-1}\left({\frac {v^{2}}{c^{2}}}A_{x}B_{x}-A_{t}B_{t}\right)\\&=&A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}-A_{t}B_{t}\end{matrix}}$
Which is the same as the scalar product in the original frame of reference.
Properties:
1. Distributivity for vector addition $\mathbf {A} .(\mathbf {B} +\mathbf {C} )$
2. Symmetry $\mathbf {A.B} =\mathbf {B.A}$
3. Leibniz rule of differentiation applies ie: $d(\mathbf {A.B} )=d\mathbf {A} .\mathbf {B} +\mathbf {A} .d\mathbf {B}$
4. Orthogonality $\mathbf {A.B} =0$ if $\mathbf {A}$ is perpendicular to $\mathbf {B}$
5. $\mathbf {A.A} =\mathbf {A} ^{2}$
We now know that the dot product of two four-vectors is a scalar result, i. e., its value is independent of coordinate system. This can be used to advantage on occasion.
In the odd geometry of spacetime it is not obvious what perpendicular means. We therefore define two four-vectors ${\underline {A}}$ and ${\underline {B}}$ to be perpendicular if their dot product is zero, in the same way as with three-vectors.
    ${\underline {A}}\cdot {\underline {B}}=0$
Because the dot product is a scalar, if vectors are perpendicular in one frame, they will be perpendicular in all frames.
We can also consider the dot product of a four-vector ${\underline {A}}$ which resolves into $(A_{x},A_{t})$ in the unprimed frame. Let us further suppose that the spacelike component is zero in some primed frame, so that the components in this frame are (0, A$_{t'}$ ) The fact that the dot product is independent of coordinate system means that
    ${\underline {A}}\cdot {\underline {A}}=A_{x}^{2}-A_{t}^{2}=-A_{t}'^{2}$
This constitutes an extension of the spacetime Pythagorean theorem to four-vectors other then the position four-vector. Thus, for instance, the wavenumber for some wave may be zero in the primed frame, which means that the wavenumber and frequency in the unprimed frame are related to the frequency in the primed frame by $k^{2}-\omega ^{2}/c^{2}=-\omega '^{2}/c^{2}$.
We indicate a four-vector by underlining and write the components in the following way: ${\underline {k}}=(k,\omega /c)$, where ${\underline {k}}$ is the wave four-vector, $k$ is its spacelike component, and $\omega /c$ is its timelike component. For three space dimensions, where we have a wave vector rather than just a wavenumber, we write ${\underline {k}}=(k,\omega /c)$.
Another example of a four-vector is simply the position vector in spacetime, ${\underline {x}}=(x,ct)$, or ${\underline {x}}=(\mathbf {x} ,ct)$ in three space dimensions. The $c$ multiplies the timelike component in this case, because that is what is needed to give it the same dimensions as the spacelike component.

### Proper time

Classically, the temporal derivative, d/dt acts like a scalar so we can multiply a vector by it, and get another vector.
In relativity t is part of a four-vector, which means d/dt also is, so we can't simply differentiate vectors with respect to t and expect to get vectors.
For example, the position of a stationary particle is (0, ct).
Viewed from a frame moving at v to the right, its position becomes (-vτ, cτ), where τ=γt is the time as measured in the moving frame.
If we differentiate with respect to τ the velocity would be (-v, c)
If we differentiate with respect to t, we get (0, c) in the stationary frame, which would be (using the Lorentz transform) (-γv, -γc) in the moving frame, if this were a four vector.
These two expressions differ by a factor of γ, when measured in the same frame, so this can not be a four vector.
However, if the moving observer divides by γ, which is the time dilation, they will get the same vector as the stationary observer.
Doing this is equivalent to differentiating by the time in the particles own rest frame. Since this works for the position vector, we can expect it to work for all vectors.
The time measured in a particle's rest frame is called its proper time.
Differentiating a vector with respect to proper time gives another vector, which is the relativistic equivalent of the temporal derivative.