Skip to content
Calcrivo

Dot Product Calculator

Calculate the dot product (inner product) of two vectors.

Inputs

Comma-separated values

Comma-separated values

Dot Product

32.000000

||A||

3.741657

||B||

8.774964

Step by step

  1. Element-wise products summed

    Σ(aᵢ × bᵢ)

    = 32.000000

  2. ||A||

    √(Σaᵢ²)

    = 3.741657

  3. ||B||

    √(Σbᵢ²)

    = 8.774964

How it works

The dot product of two vectors is the sum of element-wise products. It equals ||A|| × ||B|| × cos(θ) where θ is the angle between them. It is fundamental in neural network computations, attention mechanisms, and similarity measures.

Formula

Dot Product

a · b = sum(a_i * b_i)

a, b
Input vectors of equal dimension

Frequently Asked Questions

What does the sign of the dot product tell us?

A positive dot product means the vectors point in roughly the same direction (angle < 90°), zero means they are orthogonal, and negative means they point in opposite directions (angle > 90°).

How is the dot product used in neural networks?

Every neuron computes a dot product between its weight vector and the input vector, followed by a bias addition and activation function. Attention mechanisms also rely heavily on dot products between query and key vectors.

You might also need