What is a three-dimensional vector and how many components should it contain?

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, don't I? That is, to represent a three-dimensional vector, you will need six numbers, or better yet, two Point3D types, each containing three numbers.

Why in the book "Study Haskell for good" the author represents the type of vector only through three numbers? Who among us does not understand something?

data Vector a = Vector a a a deriving (Show)

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

Author: asianirish, 2019-02-26

3 answers

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

 9
Author: Stranger in the Q, 2019-02-26 15:24:59

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

A vector in mathematics is a concept that has a direction and magnitude (amplitude, length), but does not have any specific position in space. The vector is never "deferred"from anything. A single point P in space is sufficient to define a vector. Its value is equal to the length of the segment OP, and the direction coincides with the direction of the directed segment OP (where O is the beginning coordinates). This, however, does not in any way mean that the vector is somehow "bound" to the point O.

The vector can be uniquely defined in an equivalent way and as an explicitly specified direction (for example, through the angles to the coordinate axes) and an explicitly specified length. This version 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, the task through the point is more uniform and "tangible" in multidimensional cases.

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

 4
Author: AnT, 2019-02-26 15:41:41

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

 2
Author: Эникейщик, 2019-02-26 14:33:45