Math 2.0

definition

Euclidean distance

Definition

Let nn be a positive integer, and let p=(p1,…,pn)p = (p_1, \dots, p_n) and q=(q1,…,qn)q = (q_1, \dots, q_n) be points of Rn\mathbb{R}^n. The Euclidean distance between pp and qq is the real number d(p,q)=∥p−q∥=(p1−q1)2+(p2−q2)2+⋯+(pn−qn)2,d(p, q) = \|p - q\| = \sqrt{(p_1 - q_1)^2 + (p_2 - q_2)^2 + \dots + (p_n - q_n)^2}, where ∥p−q∥\|p - q\| is the length of the vector p−qp - q.

Remarks

The function dd is a metric on Rn\mathbb{R}^n. For all points pp, qq and rr: d(p,q)≥0d(p, q) \geq 0, d(p,q)=0d(p, q) = 0 if and only if p=qp = q, d(p,q)=d(q,p)d(p, q) = d(q, p), and d(p,r)≤d(p,q)+d(q,r)d(p, r) \leq d(p, q) + d(q, r). For n=1n = 1 the formula is d(p,q)=∣p−q∣d(p, q) = |p - q|. Some applications use the squared distance d(p,q)2d(p, q)^2, because it has no square root. The squared distance is not a metric, because it does not satisfy the triangle inequality.

Explanations

L1 human

To find the distance between two points in the plane, draw the right triangle with horizontal and vertical legs between them. The legs have lengths ∣p1−q1∣|p_1 - q_1| and ∣p2−q2∣|p_2 - q_2|. The distance is the hypotenuse, so the Pythagorean theorem gives the formula. For (1,1)(1, 1) and (4,5)(4, 5) the distance is 9+16=5\sqrt{9 + 16} = 5.

What this node needs for W2
  • edge instance_of in: one example (0 of 1)
  • edge not_instance_of in: one non-example that fails one clause (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

What this needs

To read this node, read these 3 nodes in this order. The foundations come first, and the list ends with this node.

Each node uses the nodes above it. The colour of the bar on a box shows the evidence level, and the box also gives it as text. The list below has the same nodes.
  • no evidence level
  1. Euclidean space object
  2. Length of a vector concept
  3. Euclidean distance definition

Sources

  1. Web https://en.wikipedia.org/wiki/Euclidean_distance, Higher dimensions