Vectors and straight lines in the plane
Vectors in a coordinate system: coordinates and magnitude
Coordinates of a vector
The vector AB, defined by two points A(xA; yA) and B(xB; yB), has the following coordinates:
vector AB (xB - xA; yB - yA)
Example: given A(1; 3) and B(4; -1), the vector AB (4–1; -1–3) = (3; -4).
Norm of a vector
The norm (length) of a vector u(x; y) is denoted by ||u|| and is calculated as follows:
||u|| = √(x² + y²)
Example: ||vector AB|| = √(3² + (-4)²) = √(9 + 16) = √(25) = 5. This is exactly the distance AB, which is to be expected since the norm of a vector AB is the length of the line segment [AB].
Addition and multiplication by a real number
If u(x; y) and v(x'; y'), then u + v has coordinates (x+x'; y+y'). Multiplying a vector by a real number k gives ku with coordinates (kx; k*y).
Equal vectors
Two vectors are equal if and only if they have exactly the same coordinates, even if their starting and ending points are different.
Pitfalls to avoid
- The vector AB goes from A to B: its coordinates are (xB – xA; y_B − y_A); we always start from the end point minus the start point.
- The vector BA is the opposite of the vector AB: vector BA = −vector AB.
- The magnitude of a vector is always positive or zero, never negative.

