I'm a freshmen student, I got this question in my mind why we consider acceleration based on velocity not speed. as far as I know, velocity will be zero if we go and back from A to B although speed won't be zero or negative I understand why acceleration can be negative (when speed decreases ) but through A to B and back, it doesn't make sense to me why acceleration can be 0 because particle had acceleration in whole moving path.
2 Answers
it doesn't make sense to me why acceleration can be 0 because particle had acceleration in whole moving path.
I suspect that your confusion is rooted in the difference between average acceleration
$$\bar{\mathbf{a}} \equiv \frac{\Delta \mathbf{v}}{\Delta t}$$
and instantaneous acceleration
$$\mathbf{a} \equiv \frac{d\mathbf{v}}{dt}$$
For example, consider the case that a particle is at the origin when $t=0$, moves to $x=2$ with velocity $\mathbf{v} = t\hat{\mathbf{x}}$ for $2 \mathrm{s}$ and then moves back to $r=0$ with velocity $\mathbf{v} = (t - 4)\hat{\mathbf{x}}$.
When $t = 4\mathrm{s}$, the particle is back at the origin and so, the average velocity over the interval $0\le t \le 4 \mathrm{s}$ is
$$\bar{\mathbf{v}} = \frac{\Delta x}{\Delta t}\hat{\mathbf{x}} = 0$$
However, the particle has covered a distance of $d = 4$ and so the average speed is
$$\bar{v} = \frac{4\mathrm{m}}{4\mathrm{s}} \ne 0$$
The instantaneous acceleration during the time interval is
$$\mathbf{a} = 1\,\frac{\mathrm{m}}{\mathrm{s^2}}\,\hat{\mathbf{x}},\quad t \ne 2\mathrm{s}$$
but the average acceleration is
$$\bar{\mathbf{a}} \equiv \frac{\mathbf{v}(4) - \mathbf{v}(0)}{4\mathrm{s}} = 0$$
The acceleration for the whole journey is zero, and here is why. Acceleration is the change in speed over time. You went from 0m/s to 0m/s in the span of some time, so (0-0)/any amount of time will result in 0 acceleration.
It might be weird for you since the particle kept changing speed over it's journey, but the average change in velocity will be zero. The acceleration in the first part of the journey will be positive while the second part will be negative. Over the whole journey they cancel each other out resulting in zero.