In nonrelativistic physics, the velocity of an object is a three dimensional vector whose components give the object’s speed in each of three directions (the directions depend on the coordinate system).
The path of a particle moving in ordinary threedimensional Euclidean space can be described using three functions of time t, one for x, one for y and one for z. The three fuctions x=f(t), y=f(t), z=f(t) are called parametric equationsand give a vector whose components represent the object's spatial velocity in the three x,y,z directions.
The spatial velocity of the particle is a tangent vector to the path and can be written as:
Fourvector Definition

Fourvector
In special relativity, a fourvector A is a vector with a "timelike" component and three "spacelike" components, and can be written in various equivalent notation^{[1]}
More precisely, a point in Minkowski space is a time and spatial position, called an Event, or sometimes the position fourvector or fourposition or 4position, described in some reference frame by a set of four coordinates:
where r is the threedimensional space position vector. If r is a function of coordinate time t in the same frame, i.e. r = r(t), this corresponds to a sequence of events as t varies. Also the definition x^{0} = ct ensures that all the coordinates have the same units (of distance). These coordinates are the components of the position fourvector for the event.
Generally speaking mathematically, one can define a 4vector a to be anything one wants, however for special relativity between one Inertial Frame of Reference and another, our 4vectors are only those which transform from one inertial frame of reference to another by Lorentz transformations.
Fourvelocity vector
The vector that represents the relativistic counterpart of velocity, which is a threedimensional vector in space, is a fourvector and is called the Fourvelocity vector.
As we have seen in Proper time, a clock fastened to a particle moving along a worldline in fourdimensionnal spacetime will measure the particle's proper time τ and therefore it makes sense to use τ as the parameter along the path. The fourvelocity of a particle is then defined as the rate of change of its fourposition with respect to proper time, and is also the tangent vector to the particle's world line
To determine the components of the fourvelocity vector, we recall that a process that takes a proper time ΔΤ in its own rest frame has a longer duration Δt measured by another observer moving relative to the rest frame, i.e
Δτ = (Δt / γ)
Taking the derivative with respect to propert time, we can then rewrite that:
We can use the chain rule to find the spatial components of U^{μ} for μ = i = 1,2,3:
But dx^{i}/dt is the particle's ordinary spatial velocity v = dx^{1}/dt, dx^{2/}dt, dx^{3}/dt = v_{x }, v_{y}, v_{z }so that finally the particle's fourvelocity is finally given by:
[1] We have already come across this index notation in our article The Lorentz transformations Part IV  Lorentz transformation matrix (tab index notation).
Lorentz transformation

Lorentz transformation
To confirm that this four velocity vector is effectively a fourvector, we have to check that it transforms well under Lorentz transformation.
Let's consider a particule p which has fourvelocities U and U' respectively in referentials R and R'
If we assume that the referentials R and R' in standard configuration are animated by a relative velocity v_{r/r' }along the x axis caracterized by a Lorentz factor γ relative to each other, than the Lorentz transformation between the two fourvelocities can be written as:
If we consider the two first lines of the matrix product:
Now let's tackle the velocity transformation problem using the Lorentz transformation. If we have two events in spacetime there will be a difference between the corresponding time and spatial coordinates, the intervals Δt, Δx, Δy, Δz.
For example, if we had two events E_{1}=(t_{1},x_{1},y_{1},z_{1}) = (3,1,0,0) and E_{2}=(t_{2},x_{2},y_{2},z_{2}) = (5,4,0,0) then the time interval Δt = 53 = 2, and the spatial interval Δx = 4 1 =3.
We show easily that we get those transformation rules for intervals:
If we bring the two events on the x axis closer and closer together, eventually as Δx and Δt approach 0, the quantities Δx/Δt and Δx'/Δt' become the instantaneous velocities v_{x} and v'_{x} of an object moving through the two events E_{1} and E_{2} respectively in referentials R and R'.
We can then confirm that this expression of velocity transformation is strictly equivalent to the one we have found for the x component U_{1} of the four velocity vector U above.
Similarly, if we consider the components U_{2} and U'_{2} along the y and y' axis:
If we use again the Lorentz transformation rules we get:
which transfoms exactly as the four velocity U_{2} component does transform, as expected.
We have just shown that the four velocity vector is defined as a quantity which transforms according to the Lorentz transformation:
Scalar product

Scalar product
In special relativity the scalar product of two fourvectors A and B is defined by applying the Minkowski metric to the two four vectors, as follow:
One result of the above formula is that the squared norm of a nonzero vector in Minkowski space may be either positive, zero, or negative.
If A^{2}<0, the fourvector A^{μ} is said to be timelike; if A^{2}>0, A^{μ} is said to be spacelike; and if A^{2}=0, A^{μ} is said to be lightlike. The subset of Minkowski space consisting of all vectors whose squared norm is zero is known as the light cone.
As a direct consequence, the scalar product of the fourvelocity vector with itself, i.e. its squared norm is given by:
which is obviously an invariant in all the inertial referentials.