Dot product, length and distance in Rⁿ

Rⁿ 中的点积、长度与距离

How do you compute dot products and lengths in Rⁿ?

The dot product sums the products of coordinates; its square root is the length and the distance between points is the length of the difference.

SkillKP001244

Sign in to read the whole lesson, with 1 exercise

Sign in / Sign up

Mastery goals

  • Can compute dot products, lengths, unit vectors and distances in Rⁿ
  • Can compute the angle between two vectors

Reading

Reading and thinking: generalizing the concept of vectors and its applications (continued)

For -dimensional vectors and , as for two-dimensional vectors we have


The “distance” between two points and of -dimensional vector space is

The average monthly sales vector is an example of using addition and scalar multiplication of vectors. Now let us look at an example that uses the idea of “distance” to solve a practical problem.

Classifying by “distance” is a common method: compute the distance from each vector to every standard point, and put the vector in the class of the standard point it is nearest to. Here is a concrete example.

From its past experience in making school uniforms, a uniform company has drawn up standard uniform sizes for first-year senior-high students in its area, with the measurements shown in Table 1.

Table 1

SizeHeight/cmChest/cmWaist/cmShoulder width/cm
XXS150766234
XS155806636
S160847038
M165887440
L170927842
XL175968244
XXL1801008646
XXXL1851049048

To make uniforms for the first-year students of a school, the company measured each student's height, chest, waist and shoulder width, obtaining sets of data ( numbers in each). How can these data tell us how many uniforms of each of the standard sizes to make?

List each student's measurements in the order height, chest, waist, shoulder width; then each student's build is a four-dimensional vector, which can be regarded as a point of four-dimensional vector space. In mathematical language, the question is how to divide points into classes. A common method is to classify by “distance”: the standard sizes are standard points; use the distance formula to compute the distance from each student's point to the standard points, and put the student in the class of the nearest standard point.

For example, a student has height , chest , waist and shoulder width , so the student's point is . Let the standard sizes be the points , , , , , , , . Computing the distances from to , , , , , , , gives , , , , , , , . Since is the smallest, this student belongs to size XL.

The company only needs a small program: once the sets of data are entered into a computer, it quickly counts how many students fall into each class, and so how many uniforms of each standard size to make.

These two examples show that vectors made of ordered tuples of real numbers have even wider uses than geometric vectors. In daily life and in science many quantities can be represented by such vectors, and their properties can be studied with the theory of vectors.

010203040distance35.427.519.7124.23.911.619.4XXSXSSMLXLXXLXXXL
The “distances” from the point to the standard points (to one decimal place, worked out by the program with the distance formula): is nearest to the point of size XL.

Related points

All points in this topic

Cite this page: Dot product, length and distance in Rⁿ · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP001244