9 The geometry of vector algebra

 

This chapter covers

  • Definitions and properties of vector products
  • Examples of dot, cross, and triple products solving geometric problems in 3D space
  • Generalizations of vector products to N-dimensional space where N 3

Vector algebra is often seen as a staple of applied geometry. Vector products have so much to do with angles, projections, areas, and volumes that it’s hard to imagine doing anything practical without them. Vector algebra is also a never-ending source of interview problems.

In practice, however, vector operations are usually concealed under utility functions’ interfaces to such a degree that about half of candidates who apply for a job in my department can’t tell the dot product from the cross product. These people are still doing fine professionally. But without regular practice, the math behind the interfaces fades from memory.

In the modern world, vector algebra isn’t so much a must-have as it is a powerful enabler. It enables you to go beyond the utility functions your framework gives you. It enables you to write your own utility functions tailored to your own specific tasks, as well as highly efficient code that doesn’t rely on utility functions at all.

9.1 Vector addition and scalar multiplication as transformations

9.2 Dot product: Projection and angle

9.2.1 Other names and motivations behind them

9.2.2 Vectors and their dot product in SymPy

9.2.3 Practical example: Using a dot product to light a scene

9.2.4 Section 9.2 summary

9.3 Cross product: Normal vector and the parallelogram area

9.3.1 Other names and motivations behind them

9.3.2 The cross product in SymPy

9.3.3 Practical example: Check whether a triangle contains a point in 2D

9.3.4 Section 9.3 summary

9.4 Triple product: The parallelepiped volume

9.4.1 The geometric sense of the triple product

9.4.2 The triple product in SymPy