# 3D Math Primer - Vectors

This article contains my reading notes from the second chapter of the book 3D Math Primer for Graphics and Game Development, 2nd edition. The subject of the chapter is Vectors, and the chapter starts with the basic properties of vectors. Below I have noted some important (to me) definitions.

As the subject of the book is graphics, the coverage is focused on the geometric interpretations of vectors and vector operations. Geometrically speaking, a vector is a directed line segment that has *magnitude* and *direction*.

For any given vector dimension, there is a special vector, known as the zero vector, that has zeroes in every position. The zero vector has zero magnitude, and no direction. Think of the zero vector as a way to express the concept of "no displacement", much as the scalar zero stands for the concept of "no quantity". Below is the three-dimensional zero vector:

\[ \boldsymbol{0} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \]

It is important to understand that points and vectors are conceptually distinct, but mathematically equivalent. When you think of a location, think of a point and visualize a dot. When you think of a displacement, think of a vector and visualize an arrow. The math we develop in the following sections operates on "vectors" rather than "points". Keep in mind that any point can be represented as a vector from the origin.

Negating a vector results in a vector of the same magnitude but opposite direction. We negate a vector by negating each component of it, i.e.:

\[ - \begin{bmatrix} 2 \\ 2 \\ \end{bmatrix} = \begin{bmatrix} -2 \\ -2 \\ \end{bmatrix} \]

A vector can be multiplied by a scalar, and this will change the magnitude of the vector, and possibly the direction as well.