Float scalar ivvector operator ivvector vector
| 44 |
|
|---|
2.2.5 Vector Length
We have mentioned that a vector is an entity with length and direction but so far haven’t provided any means of measuring or comparing these quantities in two vectors. We’ll see shortly how the dot product provides a way to compare vector directions. First, however, we’ll consider how to measure a vector’s magnitude.
We use the ∥v∥ notation to distinguish a norm from the absolute value function |a|. An example of a norm is the Manhattan distance, also called the ℓ1 norm, which is just the sum of the absolute values of the given vector’s components:
∥v∥ℓ1 =�|vi|
| ∥u∥ = d = |
|
||
|
|||
| ∥v∥ = | (2.3) | ||
| ∥v∥ = |
|---|
v
ˆv =∥v∥This sets the length of the vector to ∥v∥ · 1/∥v∥ or, as we desire, 1.
Figure 2.9 Length of 2D vector.


