Position and Velocity Vectors
We describe the motion of a particle by means of a position vector $\vec r$.
At some instant in time a particle is at the point $P$. Let $O$ be the origin of the coordinates ystem. The position of the particle is given by the vector that goes from the origin to the point $P$ – this is known as the position vector $\vec r$.
In Cartesian coordinates, we can write $$\vec r=x \uvi + y \uvj+z \uvk\,,$$ where $\uvi$, $\uvj$ and $\uvk$ are the usual unit vectors, see the figure below. There we show that, as the particle moves through space, it may follow some complicated curved path.
Since the particle moves from $P_1$ to $P_2$ during a time interval $\Delta t$, its position vector changes from ${\vec r}_1$ to ${\vec r}_2$ in that time. The change in position, i.e. the displacement, is given by the vector $$\Delta \vec r=\vec r_2-\vec r_1\,.$$ Expressed in coordinates and unit vectors we thus find $$\Delta \vec r=(x_2-x_1)\uvi +(y_2-y_1)\uvj+(z_2-z_1)\uvec k\,.$$
Velocity
The average velocity is defined, as shown in the figure above, by taking the ratio of the displacement (a vector!) to the time duration. The instantaneous velocity is once again defined as a limit, $$\vec v=\lim_{\Delta t\rightarrow 0}\frac{\Delta \vec r}{\Delta t}=\frac{\dd\vec r}{\dd t}\,.$$
The direction of $\vec v$ at any instant is the same as the direction of the particle at that instant, and so is a tangent to the curve or path of the particle.
In component form $$\frac{d\vec r}{\dd t}= \frac{\dd x}{\dd t} \uvi +\frac{\dd y}{\dd t} \uvj +\frac{\dd z}{\dd t} \uvec k $$ (the unit vectors $\uvi $, $\uvj $ and $\uvec k$ are of course fixed so their rate of change with time is zero).
In other words, $$\vec v=v_x \uvi +v_y \uvj + v_z \uvec k\,,$$ where $v_x=\dd x/\dd t$, $v_y=\dd y/\dd t$ and $v_z=\dd z/\dd t$.
The magnitude of velocity (speed) can be found as $$|\vec v|=v=\sqrt{v_x^2+v_y^2+v_z^2}\,.$$