平方距离(squared distance)一般可以用在数字图像处理的相关情况下。
两颜色向量 C 1 {\displaystyle C_{1}} 与 C 2 {\displaystyle C_{2}} 的平方距离为:
( C 1 ⋅ r − C 2 ⋅ r ) 2 + ( C 1 ⋅ g − C 2 ⋅ g ) 2 + ( C 1 ⋅ b − C 2 ⋅ b ) 2 {\displaystyle (C_{1}\cdot r-C_{2}\cdot r)^{2}+(C_{1}\cdot g-C_{2}\cdot g)^{2}+(C_{1}\cdot b-C_{2}\cdot b)^{2}}