liveBook · Manning

Vector-to-vector product

As explained in Geometry for Programmers

A vector product is an operation combining vectors, such as a dot product, cross product, or triple product, to produce a scalar or vector.

Vector products combine vectors to support practical geometric work. The dot product produces a scalar, the cross product produces a vector, and the triple product produces a scalar from three vectors. section 9.0 section 9.1

Their value becomes clearer through geometry: vector products encode angles, projections, areas, and volumes. Understanding that geometry helps turn standard operations into custom algorithms rather than merely calling utility functions. section 9.0 section 9.1

The three main products serve different geometric purposes:

  • Dot product: combines two vectors into a scalar and supports geometric measurements such as angles and projections. section 9.0 section 9.1
  • Cross product: combines two vectors into a vector; its length represents a parallelogram area in the triangle-distance construction. section 9.1 section 10.1.3
  • Triple product: combines three vectors into a scalar whose magnitude represents parallelepiped volume and whose sign can encode sidedness. section 9.0 section 10.1.3

Triangle-mesh distance

For a point p and triangle points p1, p2, and p3, the triple product of (p3-p1), (p2-p1), and (p-p1) gives a signed parallelepiped volume. Dividing by the base area—the length of a cross product—gives the point’s signed distance to the triangle’s plane. If the projection falls outside the triangle, cross-product area calculations provide distances to its edges. section 10.1.3

Figure 10.4 The height of the parallelepiped h is the distance from point p to the plane that p1, p2, and p3 make.
10-04

Use the parallelepiped-height figure to connect signed triple-product volume with distance from a point to a triangle’s plane. section 10.1.3

How Geometry for Programmers covers it

How deep it goes
Defines three products, explains their geometric roles, and applies them to plane, triangle, and segment distance calculations.
Examples
Uses translated and scaled point-vector models, parallelepiped heights, triangle planes, and point-to-segment distance calculations.
What it assumes
Uses point vectors, vector addition, and scalar multiplication as geometric groundwork for understanding products.
What you can do after
Build geometric algorithms for plane, triangle, and segment distances, including signed distance calculations.
How it connects
Connects dot product, cross product, triple product, vector addition, scalar multiplication, geometric transformations, and signed distance functions.

Also explained in

Compare how 2 books explain vector-to-vector product →

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.