**Instructions:**

- Enter vectors A and B, and select the operation.
- Click "Calculate" to perform the calculation.
- View the result, calculation details, and history below.
- Click "Clear" to reset the inputs and results.
- Click "Copy" to copy the result to the clipboard.

**Result:**

**Calculation Details:**

**Calculation History:**

The Dot Product Calculator is a tool that calculates the dot product of two vectors. It is a fundamental way to combine two vectors and is widely used in mathematics, physics, and engineering.

## Concepts

The dot product is an algebraic operation that takes two equal-length sequences of numbers, coordinate vectors, and returns a single number. It is also known as the scalar product. The dot product measures the relative direction of two vectors. It tells us something about how much two vectors point in the same direction.

## Formulae

We write the dot product with a little dot ⋅ between the two vectors (pronounced “a dot b”):

a → ⋅ b → = ‖ a → ‖ ‖ b → ‖ cos ( θ)

If we break this down factor by factor, the first two are ‖ a → ‖ and ‖ b → ‖. These are the magnitudes of a → and b →, so the dot product takes into account how long vectors are. The final factor is cos ( θ), where θ is the angle between a → and b →. This tells us the dot product has to do with direction. Specifically, when θ = 0, the two vectors point in exactly the same direction. Not accounting for vector magnitudes, this is when the dot product is at its largest, because cos ( 0) = 1. In general, the more two vectors point in the same direction, the bigger the dot product between them will be.

Another way to think about θ is to imagine one vector dropping a shadow onto the other. When the angle is small, the shadow lands far from the origin, and the dot product is large. When θ is close to π/2, the shadow lands close to the origin, and the dot product is small.

When we need to find a dot product in multivariable calculus, we have only the coordinates of a → and b →. Calculating ‖ a → ‖ ‖ b → ‖ cos ( θ) would force us to find two square roots and a cosine, which is a lot of work! Luckily, there is an easier way. Just multiply corresponding components and then add:

a → = ( a 1, a 2, a 3) b → = ( b 1, b 2, b 3) a → ⋅ b → = a 1 b 1 + a 2 b 2 + a 3 b 3

This formula extends for vectors of any length.

## Benefits

The dot product has many benefits. It is used in physics to calculate work done by a force, in computer graphics to calculate lighting and shading, and in machine learning to calculate similarity between vectors. It is also used in engineering to calculate the torque on a shaft and in navigation to calculate the distance between two points.

## Interesting Facts

- The dot product is commutative, meaning that a → ⋅ b → = b → ⋅ a →.
- The dot product is distributive, meaning that a → ⋅ ( b → + c → ) = a → ⋅ b → + a → ⋅ c →.
- The dot product is not associative, meaning that a → ⋅ ( b → ⋅ c → ) ≠ ( a → ⋅ b → ) ⋅ c →.