# Sign of acceleration

I'm developing an application using accelerometer sensor. I'm not good at physics so forgive me if the question is trivial. If I have 3 values of acceleration: $x$, $y$, $z$, I find acceleration magnitude by taking square root of $x^2+y^2+z^2$, but how do I find it's sign? Example reading:

x: -0.010020584

y: 0.010257386

z: -0.04910469

The magnitude will be around 0.05115, but how do I know if it is deceleration or acceleration?

• Mar 29, 2013 at 10:53

If your question is: "How do I know if the acceleration is increasing or decreasing the speed?" the answer is:

Calculate $\mathbf{a}\cdot\mathbf{v}$, where $\mathbf{a}$ is the acceleration vector ($(x,y,z)$ in your notation) and $\mathbf{v}$ is the velocity vector, and check its sign. If it is positive the speed is increasing, otherwise it is decreasing.

$$\mathbf{a}=(-0.010020584,0.010257386,-0.04910469)$$

Let's say for simplicity that $\mathbf{v}=(1,1,1)$. We then have:

$$\mathbf{a}\cdot\mathbf{v}=(-0.010020584)\cdot1+0.010257386\cdot1+(-0.04910469)\cdot1=-0.048867888$$

The negative sign of the result means that the speed is decreasing.

• the thing is I'm trying to find velocity by integrating acceleration. v=v0+at as far as I know, but v keeps increasing even if the object stops or decelrates, because square root always gives positive value. Mar 29, 2013 at 19:32
• @Nazerke Why are you integrating the magnitude of the acceleration? That makes no sense unless the acceleration is always along the same direction. You should integrate the acceleration vector to get the velocity vector. Then you can calculate the magnitude of the velocity vector to get the speed if that is what you want to know.
– jkej
Mar 30, 2013 at 3:14
• at that moment I didn't know if I need magnitude or not, I just wrote it to make the question clearer. if I have ax, I can find vx by integrating ax, that is vx = v0+ax * t, same way I can find vy = v0+ayt and vz=v0+azt. So the resultant velocity will be v= sqrt(vx^2+vy^2+vz^2) isn't it? Is that what you mean? Mar 30, 2013 at 3:19
• @Nazerke Yes, that is what I meant.
– jkej
Mar 30, 2013 at 11:42

You measured acceleration in three dimensions, by having measured the x, y, and z components. You need always three parameter to describe it. If you have the magnitude of the acceleration, you need two angular coordinates to define the full vector.

Only in one dimension you can talk about sign, this pointing left or right. In three dimensions, you get more parameters.