A displacement has a direction

When a particle moves in a positive direction its displacement is positive.

Dx = x_{f} -x_{i
}= 1- (-2) = 3

When a particle moves in a negative direction its displacement is negative.

Dx = x_{f} -x_{i
}= -1.5- 1.5 =- 3

The absolute value of a displacement is called its magnitude.

A displacement is an example of a vector, because it has a direction and a magnitude.

Question:

A particle, initially at position x=-5 m, moves to position x = 10 m and then
comes back to x = - 5 m. What is its displacement and what is the total
distance it moves?

Answer:

Displacement =
Dx = x_{f} -x_{i
}= -5- (-5) =0 m.

Total distance it moves = 30 m.