0 / 34

Invite others

Progress

0 / 34

Dot Product & Matmul

Dot product and matrix multiply:

np.dot(a, b)  # 1D dot
A @ B         # matrix multiply
Why this matters

Dot products and matrix multiply are the language of linear models: regression, projections, attention-style combinations of vectors, and layers in neural nets all reduce to these ops on arrays.

@ in Python reads like math and keeps code aligned with textbook notation.

ResourcesDocs, references & more — opens in a new tab
🎯 Your Task

Dot of [2,3,4]·[5,6,7]dot. [[1,2],[3,4]] @ [5,6]mv.

np.dot(a,b), M @ v
exercise.py
⌘⏎ run · ⌘← → nav
Output
Run your code to see output here.