# Dot Product

> Times each pair of numbers in two lists. Then add it all up.

**Field:** General Knowledge  
**Category:** Math & Statistics  
**Also known as:** Scalar Product, Inner Product

## Think of it like

Think of it like a shop bill. You times each price by how many you got, then add it all up.

## Definition

The dot product turns two vectors of the same length into one number. You multiply the numbers in each matching place, then add up the results. For [1, 2] and [3, 4], that is 1 × 3 + 2 × 4, which is 11. A large result means the two vectors point the same way. Neurons use it to weigh their inputs, and search uses it to find items that are alike.

## Example

A neuron has inputs [0.9, 0.8] and weights [2.0, 1.5]. The dot product is 0.9 × 2.0 + 0.8 × 1.5, which is 3.0.

## Why it matters

It is the most used sum in AI. Every neuron does one, and search finds close matches with it.

## Common mistake

Using it on lists of different lengths. Each number needs a partner in the same place in the other list.

## Three principles

- **Pair them up.** Same place in each list.
- **Multiply, then add.** One number comes out.
- **Measures match.** Big means they point the same way.

## Related terms

- [Vector](https://learn.benibix.com/term/general/vector)
- [Matrix](https://learn.benibix.com/term/general/matrix)
- [Artificial Neuron](https://learn.benibix.com/term/ai/artificial-neuron)
- [Weight (Neural Network)](https://learn.benibix.com/term/ai/weight)

## Told apart from

- [Cosine Similarity vs Dot Product](https://learn.benibix.com/compare/cosine-similarity-vs-dot-product): People often think cosine similarity and the dot product always put results in the same order. They do not, and length is the reason. The dot product grows with how long the vectors are, not just their angle. Cosine similarity looks at the angle alone. So the two agree only when each vector has a length of 1. Many embedding models do that, but some do not.

![Two lists, 1 and 2, and 3 and 4, side by side. Matching numbers are multiplied, 1 times 3 and 2 times 4, and the results 3 and 8 are added to give 11.](https://learn.benibix.com/diagrams/math-dot-product.svg)

---

Source: https://learn.benibix.com/term/general/dot-product
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
