A geometric three-dimensional vector is characterized by two ordered three-dimensional points - the beginning of the vector and the end of the vector. Each point is characterized by three numbers (x, y, z). I remember correctly, am I not mistaken? That is, to represent a three-dimensional vector, we need six numbers, and preferably two types of Point3D, each containing three numbers each.

Why in the book "Study Haskell in the name of good" the author presents the type of a vector only after three numbers? Who among us does not understand something?

data Vector a = Vector aaa deriving (Show) 

Here is the link: http://learnyouahaskell.com/making-our-own-types-and-typeclasses

  • "Three-dimensional vector is characterized by two three-dimensional points" - no. - Igor
  • @Igor ordered - asianirish
  • You want to say that the vector between the points (1,2,3) and (4,5,6) is different from the vector between the points (7,8,9) and (10,11,12)? ... - Harry
  • Depending what is considered equivalent - asianirish
  • Equivalence of vectors is the same - length and direction ... - Harry

3 answers 3

The radius vector is implied, i.e. a vector deferred from the origin (from the point (0,0,0) ), and haskell has nothing to do with it.

  • Aaaaaaaaaaaaaa! - asianirish pm
  • Haskell in the tags just because the book and the example on Haskell - asianirish
  • At least you would note that this case is called the radius vector, otherwise a logical question may arise: а почему именно (0, 0, 0)? - Kir_Antipov
  • one
    @Kir_Antipov thanks for the comment, now add a link to the answer - Stranger in the Q

A pair of ordered points describes a directed segment , not a vector.

A vector in mathematics is a concept that has direction and magnitude (amplitude, length), but does not have any specific position in space. The vector is never "delayed" from anything. To define a vector, one point P in space is enough. Its value is equal to the length of the segment OP , and the direction coincides with the direction of the directional segment OP (where O is the origin of coordinates). This, however, in no way means that the vector is somehow "tied" to the point O

A vector can be equivalently uniquely defined both as an explicitly indicated direction (for example, through angles to the axes of coordinates) and an explicitly specified length. Such a variant of the task will obviously not be tied to any point in space. In everyday life, we usually use this method of describing two-dimensional vector quantities ("the car is going north at a speed of 50 km / h"). But in mathematics, a task through a point is more uniform and “tangible” in multidimensional cases.

A vector can be considered as the equivalent of a set of all possible directed segments of the same length and one direction. The directed segments (0, 0)-(1, 1) and (0, -2)-(1, -1) correspond to the same vector .

  • Thanks for the info, I will know. I remember the definition of a vector from school physics, for calculating the application of force according to the parallelogram rule - asianirish
  • Add the word "free" to the word "vector" for the full formalism of the definition :) - Harry
  • @Harry: Just the opposite. In the terminology that distinguishes vectors and directed segments , no “free vectors” are needed. A vector is a vector as described above. He is not "free" or "not free." The division into "free" and any other vectors is a specialized slang. - AnT pm
  • one
    "Everyone had calmed down, but Pasha Emilevich was still wandering around the rooms, looking under the decanters, moving tea tin mugs and muttering:" - Igor
  • About math: I need someone to put a minus in order for a reputation to become a beautiful number. - Igor

The other three numbers are (0, 0, 0).