Math

Unit Vector VS Vector

Naranjito 2024. 9. 26. 13:28
  • Unit Vector

 

A vector that has a magnitude (or length) of exactly 1. It is used to represent a direction without any information about magnitude or length.

 

n ^ = [ n ^ x n ^ y n ^ z ]

 

- The components n ^ x n ^ y n ^ z are the direction cosines, which are the projections of the unit vector along the x-axes, y-axes, and z-axes, respectively.

- The magnitude of the unit vector is always 1:
| n ^ | = n ^ x 2 + n ^ y 2 + n ^ z 2 = 1
  • Vector

 

It defined by both a direction and a magnitude. It can have any length, not necessarily 1.

 

u = [ u x u y u z ]

 

- The components u x u y u z describe the vector's projections along the 𝑥-axes, 𝑦-axes, and 𝑧-axes, respectively.

- It is generally not equal to 1, and it is calculated as:
| u | = u x 2 + u y 2 + u z 2

Example:

 

- Suppose you have a vector v = [ 2 , 3 , 6 ] .

- The magnitude of this vector is:
| v | = 2 2 + 3 2 + 6 2 = 4 + 9 + 36 = 49 = 7

- The unit vector in the same direction as can be found by dividing each component of by its magnitude:
v ^ = v | v | = 1 7 [ 2 , 3 , 6 ] = 2 7 , 3 7 , 6 7