1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > n维空间的欧氏距离公式_欧氏距离(Euclidean Distance)

n维空间的欧氏距离公式_欧氏距离(Euclidean Distance)

时间:2018-10-10 08:21:53

相关推荐

n维空间的欧氏距离公式_欧氏距离(Euclidean Distance)

欧氏距离是最易于理解的一种距离计算方法,源自欧氏空间中两点间的距离公式。

(1)二维平面上两点a(x1,y1)与b(x2,y2)间的欧氏距离:

![image.png](http://upload-images.jianshu.io/upload_images/8515007-c175134c76c30895.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

(2)三维空间两点a(x1,y1,z1)与b(x2,y2,z2)间的欧氏距离:

![image.png](http://upload-images.jianshu.io/upload_images/8515007-83ab803f2029a7af.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

(3)两个n维向量a(x11,x12,…,x1n)与 b(x21,x22,…,x2n)间的欧氏距离:

![image.png](http://upload-images.jianshu.io/upload_images/8515007-901501b9155c8af5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

也可以用表示成向量运算的形式:

![image.png](http://upload-images.jianshu.io/upload_images/8515007-fa2a60018d5a3566.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

那么向量运算形式怎么来的呢?

假设有向量 a = ( 4,5,6 ),向量 b = ( 1,2,3 ),根据欧式距离公式可以得出a,b间的欧式距离为3√3,其实细化一下,欧式距离公式实际上是向量a减向量b的模长:|a-b|

那么这样欧式距离的向量运算形式就是向量的模长运算,只不过是用矩阵乘法表示的:

[1,2,3] * [1,2,3]T = 1 * 1 + 2 * 2 +3 * 3

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。