Vectors (specifically Euclidean or geometric vectors) are simple data structures that store spatial information representing discrete points, displacement, or forces. Understanding how to work with vectors is one of the most critical skills to learn when working with physically-based simulations and digital morphogenesis.

Vectors can be manipulated using familiar algebraic operations like addition, subtraction, multiplication, and division, which makes them extremely useful when simulating physically-based systems with objects (or agents) in motion. We can have one vector that represents a point in space and another that represents a force (like gravity or wind), then apply that force to the point by adding the two vectors together.

The term "vector" has slightly different meanings and uses in mathematics, physics, machine learning, biology, and more. In the context of digital morphogenesis, you'll most often encounter vectors as they are used in physics, representing discrete physical properties like position, displacement, velocity, direction, and more.

Properties:

Key concepts:

Algebraic operations:

Operation Using two vectors Using a vector and a scalar
Addition v1 + v2 = {v1.x + v2.x, v1.y + v2.y, ...} v + 10 = {v.x + 10, v.y + 10, ...}
Subtraction v1 - v2 = {v1.x - v2.x, v1.y - v2.y, ...} v - 10 = {v.x - 10, v.y - 10, ...}
Multiplication v1 * v2 = {v1.x * v2.x, v1.y * v2.y, ...} v * 10 = {v.x * 10, v.y * 10, ...}
Division v1 / v2 = {v1.x / v2.x, v1.y / v2.y, ...} v / 10 = {v.x / 10, v.y / 10, ...}
Dot product v1 · v2 = (v1.x * v2.x) + (v1.y * v2.y) + ... (produces a single number) Not applicable.
Cross product v1 × v2 = mag(v1) * mag(v2) * sin(θ) * n where θ is the angle between v1 and v2, and n is the unit vector at right angles to both v1 and v2. Produces a vector. Not applicable.

Articles:

Videos:

Notable implementations: