# Calculating unit vector for velocity

1. Jul 31, 2009

### andykol

Hello,
I am trying to calculate unit vector for velocity (vel= (U*Unit vector)/unit vector). But if I consider calculation by angle change e.g. unit vector= cos(theta) at certain angle velocity becomes infinity.
Please inform me how I can take care of this problem.

#### Attached Files:

• ###### Unit Vector.JPG
File size:
1.9 KB
Views:
159
2. Jul 31, 2009

### junglebeast

This equation makes no sense.

This equation makes even less sense...as cos(theta) is a scalar not a vector.

Typically you make unit vectors by normalizing them, which means to divide by the length.

3. Jul 31, 2009

### John Creighto

The unit vector for velocity would be:
$$U=\left(\frac{V_x}{|V|},\frac{V_y}{|V|},\frac{V_z}{|V|}\right)$$

where the magnitude of the velocity vector is given by:

$$|V|=sqrt(V_x^2+V_y^2+V_z^2)$$

and

$$V_x$$,$$V_y$$,$$V_z$$, are the $$x$$, $$y$$, and $$z$$ components of the velocity vector respectively.

However, without more information on the original problem I'm not sure if this is what you want.

4. Jul 31, 2009

### andykol

I am trying to multiply velocity with unit vector to transfer velocity without calculating at perticular location. Please see attached picture. Please tell me if I m using right equation and its values.

John,
I need to use following equation to calculate velocity for 2D?

$$Unit vector=\left(\frac{U_x}{|U|}+\frac{U_y}{|U|}\right)$$

$$|U|=sqrt(U_x^2+U_y^2)$$

Then I can calculate U' by (U(x,y)*Unit vector(x,y))/unit vector(x,y)

#### Attached Files:

• ###### Unit Vector.JPG
File size:
2.3 KB
Views:
130
5. Jul 31, 2009

### John Creighto

I think what you want is the dot product. The dot product will give you the component of the velocity in the direction of the unit vector.

For a unit vector u the projection of V on U is given by:

$$Proj_UV=U\cdot V=UxVx+UyVy+UzVz$$

6. Jul 31, 2009

### andykol

means-
If we consider one direction like picture I have attached in last post.
U- Velocity(known)
U'-Velocity(unknown)
Uv-Velocity Vector

Then if I am transferring velocity value

U'=U.Uv

Where $$U_v=\left(\frac{U}{|U|}\right )$$

But this becomes U'=U. I think this is wrong as location of velocity changes.

7. Jul 31, 2009

### John Creighto

To make your posts more clear, use subscripts for components of vectors. Now reread my last two posts. As far as I understand your problem, you are trying to find the component of the velocity in the direction of the unit vector. This is not the same thing as finding the velocity.

8. Aug 3, 2009

### andykol

Thank you John. This helped alot.