liveBook · Manning

Vector operation

As explained in Geometry for Programmers

A vector operation is a mathematical operation such as vector addition or scalar multiplication that produces or transforms vectors.

A vector operation transforms vectors mathematically. With tuple notation, vectors behave like arrays of numbers: add matching components or multiply every component by a scalar. section 2.1.2

Common operations include:

  • Vector addition combines corresponding components: (a1, a2) + (b1, b2) = (a1 + b1, a2 + b2). section 2.1.2
  • Scalar multiplication scales a vector’s length, using (a1, a2) × d = (a1 × d, a2 × d). section 2.1.2
  • Basis vectors express another vector as scaled components, such as (0.5, 1.5) = 0.5i + 1.5j. section 2.1.2
  • The dot product tests orthogonality by summing products of corresponding coordinates and obtaining zero for perpendicular vectors. section 5.3.2

Joining an arc to a line segment

A smooth geometry building block uses vector operations to require the vector from an arc center to an intersection point to be orthogonal to the line segment. Coordinate equations then let SymPy solve for the center, intersection, and line parameter. section 5.3.2

Figure 2.4 Vector addition: a = (0.5, 1.5), b = (1, 0.5), c=a+b=b+a
02-04

Visualizes vector addition with concrete two-dimensional vectors and their commutative result. section 2.1.2

How Geometry for Programmers covers it

How deep it goes
Defines addition and scaling, explains basis vectors, and applies dot-product orthogonality without fully developing vector products.
Examples
Demonstrates two-dimensional tuples, basis decomposition, vector addition, scalar scaling, and an arc-line junction solved symbolically.
What it assumes
Assumes basic coordinates and geometry while introducing vector arithmetic before treating dot products more fully.
What you can do after
Apply it via coordinate formulas to add and scale vectors, express basis combinations, and formulate orthogonality constraints.
How it connects
Connects vectors with scalar multiplication, basis vectors, dot product, orthogonality, tangent vectors, and geometric construction.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.