Reputation: 39
I'm writing a small application about image retrieval, but I can't understand what this mathematical expression means
d^2 = || x - p ||^2 where x and p are two-element vectors.
Can somebody tell me what means this ||, and how can I raise a vector to power ??
EDIT Thanks to espertus answer I know that || x - p ||^2 is a euclidean distance. However I also came across this expression ||p||^2 . What would that mean ? I think that it can't be euclidean distance. What else could it be ?
Upvotes: 0
Views: 1106
Reputation: 308743
"EDIT Thanks to espertus answer I know that || x - p ||^2 is a euclidean distance. However I also came across this expression ||p||^2 . What would that mean ? I think that it can't be euclidean distance. What else could it be ?"
It would be the magnitude of the vector p. If p is expressed in terms of its terminus coordinates (x, y) or (x, y, z), then ||p|| is the distance from the origin (0, 0) or (0, 0, 0) to the terminus.
Upvotes: 0
Reputation: 6805
The two bars refer to the length of a vector, which is the square root of the sum of the squares of the coordinates. See http://en.wikipedia.org/wiki/Euclidean_vector#Length.
Upvotes: 5