Displacement Vector
Displacement vector for one-dimensional motion:
As the motion of the particle is strictly one-dimensional, we choose to label $x$ the axis along which the particle moves and choose an origin and the positive direction as shown in the figure below.
As the particle moves along the axis, we define the displacement vector, denoted by $\mathrm{\Delta }\overrightarrow{r}$ as the vector that represents its change in position between and initial position $\overrightarrow{r_i}$ and a final position $\overrightarrow{r_f}$ i.e.
\boxed{\mathrm{\Delta }\overrightarrow{r}=\overrightarrow{r_f}-\overrightarrow{r_i}=\left(x_f-x_i\right)\hat{x}}
If the particle moves in the positive $x$-direction from $\overrightarrow{r_i}=x_i\hat{x}$ to $\overrightarrow{r_f}=x_f\hat{x}$ then its displacement is positive and equal to
\mathrm{\Delta }x=x_f-x_i > 0
In the figure above, the first particle starts at $x_i=-4$ and moves to $x_f=3$ and its diplacement is therefore positive and equal to
\Delta x = 3-(-4) = 7
If the particle moves in the negative $x$-direction from $\overrightarrow{r_i}=x_i\hat{x}$ to $\overrightarrow{r_f}=x_f\hat{x}$ then its displacement is negative and equal to
\mathrm{\Delta }x=x_f-x_i < 0
In the figure above, the second particle starts at $x_i=2$ and moves to $x_f=-3$ and its diplacement is therefore negative and equal to
\Delta x = -3-2 = -5
In both instances, the displacement is written $\mathrm{\Delta }x=x_f-x_i$ and its magnitude is $\left|\mathrm{\Delta }x\right|$. However, the sign of $\mathrm{\Delta }x$ indicates the direction in which the particle moves. Indeed, in the case where $\mathrm{\Delta }x>0$ the particle moves in the positive $x$ direction a distance $\left|\mathrm{\Delta }x\right|$ while in the case where $\mathrm{\Delta }x<0$ the particle moves in the negative $x$ direction a distance $\left|\mathrm{\Delta }x\right|$.