compute the distance between two matrices or vectors
Distance(A, B, p)
Matrix or Vector
nonnegative, infinity, -infinity, Frobenius, Euclidean; the norm selector
The Distance command computes the distance (the norm of the difference) between two matrices or two vectors with respect to a specified p-norm. For more information on various norms that can be computed, see Student,LinearAlgebra,Norm.
If A and B are both matrices then p must be one of 1, 2, infinity, Frobenius, or Euclidean.
If A and B are both vectors then p must be one of a non-negative number, infinity, -infinity, Frobenius, or Euclidean.
A and B must both be either vectors or matrices, not one of each.
A ≔ Matrix⁡1.432,5.223,6.444,5.325,7.453,8.223,6.432,8.343,8.222
B ≔ Matrix⁡5.224,9.809,8.932,0.424,8.453,3.532,2.533,9.435,0.423
a ≔ Vector⁡2.42,5.34,8.78,0.42
b ≔ Vector⁡4.32,9.32,6.22,1.33
Download Help Document