Dot products
A dot product pairs equal numbers of coordinates, multiplies corresponding entries, and sums the products into one scalar.
On this page 7 sections
01A dot product multiplies matching coordinates, then adds the products#
A dot product multiplies matching coordinates, then adds the products. For and , the result is one number, called a scalar.
For and , match entries by position. The products are 4, −2, and 6; all three enter the sum.
Compute .
Show answer and explanation
Multiply matching entries and add: .
02The two vectors need the same number of entries#
The two vectors need the same number of entries. A two-entry vector has no third entry to pair with a three-entry vector. After pairing, add every product; a dot product returns one scalar.
For , the products are 3 and 8. Finish the dot product.
Show answer and explanation
Add the products: .
03A supplied scoring rule can be a dot product#
A supplied scoring rule can be a dot product. If each feature has a weight, multiply every feature by its matching weight and add. The feature order and weight order must agree.
A score weights hits by 3 and misses by −2, then adds. With 2 hits and 1 miss, what is the score?
Show answer and explanation
The contributions are 6 and −2, so the score is 4.
Multiply matching coordinates, then add every product into one scalar.
- Compute the dot product of two equal-length vectors.
Sources & further reading
- [1]OpenStax Calculus Volume 3: The Dot Product ↗OpenStax · Book
- [2]MIT 18.022: Lecture 2, Dot product ↗MIT OpenCourseWare · Book