Maths for ML / Notation

a⋅b\mathbf{a}\cdot\mathbf{b}

dot product

Linear algebraBeginner

Say it “a dot b”

Multiply matching entries and add them up. Gives one number that's large when the vectors point the same way.

Example

[1,2]⋅[3,4]=1⋅3+2⋅4=11[1,2]\cdot[3,4] = 1\cdot3+2\cdot4 = 11

In code

a @ b  # or np.dot(a, b)
a @ b

Where you’ll see it in ML

Each neuron computes a dot product; attention scores are dot products.

Don’t confuse it with

Related

Lessons that use it

← All 94 symbols