Setting a vector to another magnitude

In summary, the conversation discusses the concept of changing the length of a vector and explains that it can be achieved by dividing the vector by its original length and then multiplying it by the desired length. This process results in a new vector with the same direction but a different length. It also mentions that changing the length of individual cartesian components can be easier in cylindrical and spherical coordinates.
  • #1
wraithseeker
29
0
When you set it, initially I have to do

length = Sqrt(x*x+y*y*z*z)
length = newlength/length
set all the velocities to multiply by length

I am wondering what is this for?

length = newlength/length
 
Science news on Phys.org
  • #2
newlength/oldlength is the fraction by which the length has to increase. The length of the new vector will be
|| oldvector * newlength / oldlength || = || oldvector || * newlength / oldlength = oldlength * newlength / oldlenght.

Alternatively, you can look at it this way: if you have a vector v, first divide it by its length to make a unit vector u (in the same direction but with length 1). Then multiply u by the length you want it to have to get the new vector:
v' = u * newlength = (v / oldlength) * newlength = v * (newlength / oldlength)
where oldlength is the length of v (sqrt(x^2 + y^2 + z^2)).
 
  • #3
Well, you're talking about a vector, so I assume direction is important. It would be easier to change leingths of individual cartesian components by the desired amount. In cylindrical and sphercal, you merely change r.
 

Related to Setting a vector to another magnitude

1. What does it mean to set a vector to another magnitude?

Setting a vector to another magnitude means changing the length of the vector while maintaining its direction. This can be done by multiplying the vector's components by a scalar value.

2. Why would you want to set a vector to another magnitude?

In some situations, it may be necessary to change the length of a vector while keeping its direction constant. This can be useful in physics and engineering applications, such as scaling forces or velocities.

3. How do you set a vector to another magnitude?

To set a vector to another magnitude, you can multiply each component of the vector by the desired scalar value. For example, if you have a vector (2, 3) and want to double its magnitude, you would multiply each component by 2 to get (4, 6).

4. What happens to the direction of the vector when you set it to another magnitude?

When setting a vector to another magnitude, the direction remains the same. Only the length of the vector changes. This is because you are multiplying the vector's components by a scalar, which does not affect the direction.

5. Can you set a vector to any magnitude?

Yes, you can set a vector to any magnitude by multiplying its components by a scalar value. However, the resulting vector must still have the same direction as the original vector. This means that the scalar value must be positive, as multiplying by a negative scalar would change the direction of the vector.

Similar threads

  • Optics
Replies
1
Views
1K
  • Classical Physics
Replies
11
Views
692
Replies
61
Views
1K
Replies
2
Views
1K
Replies
8
Views
579
Replies
9
Views
904
  • Introductory Physics Homework Help
Replies
4
Views
267
Replies
3
Views
143
Replies
1
Views
949
Back
Top