Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a velocity vector on $X$, $Y$ and $Z$ axes. The values are represented as M/S (meters per second).

What algorithm should I use to convert this vector into a general MPH (miles per hour) value that takes into account all axes of the vector?

This may (or may not) be a very simple question. But I am far from being a genius at math! So apologies.

Thanks very much.

share|cite|improve this question
up vote 2 down vote accepted

Multiply each coordinate by 2.23693629. In general, to convert units of a vector, you just convert units of each coordinate. This works because scalar multiplication by positive constants preserves direction, and because lengths of vectors and scalar multiplication are related by $\|c v\|=|c|\|v\|$. Scalar multiplication in this case just means multiplying each coordinate by the conversion factor.

share|cite|improve this answer
I forgot to mention that I was already aware of the 2.2369 constant for M/S to MPH conversion. The thing I'm most interested in is how I can convert the XYZ velocity vector into a scalar MPH value. I have tried just using addition but this is proving to be incorrect. – Nathan Nov 6 '10 at 19:21
@Nathan: I expected that you would know the conversion factor, which is not the point of my answer. I thought you wanted the converted vector, but apparently you just wanted the length of the converted vector. Do you know how to find the length of a vector? You could either multiply by 2.2369, then find the length, or find the length (in m/s), then multiply by 2.2369. – Jonas Meyer Nov 6 '10 at 19:34
At the moment I am doing, psuedo: (Abs(vx) + Abs(vy) + Abs(vz)) * 2.2369. But this is proving to provide incorrect. – Nathan Nov 6 '10 at 19:38
For a vector with only an $x$ component, you just take the absolute value to get the length. For a vector with only $x$ and $y$ components, then using the Pythagorean theorem you can see that the length of the vector is the the square root of the sum of the squares of the components. With a slightly more elaborate picture you can apply the Pythagorean theorem again to get the same result in general, so you should have $2.2369\sqrt{v_x^2+v_y^2+v_z^2}$. – Jonas Meyer Nov 6 '10 at 19:51
@Nathan: You don't need the Abs() around the squares, as the square of a real number is necessarily non-negative. – Rahul Nov 6 '10 at 20:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.