What is dot product?
Multiply matching entries of two vectors and add the results. It is large when the vectors point the same way and zero when they are at right angles.
Where it is taught
The dot product. One number that says how much two vectors point the same way. It is the most used calculation in all of AI.
What the lesson leaves you with
- multiplies matching entries and adds them up, giving one number.
- It is positive for similar directions, zero for perpendicular, negative for opposite.
- Cosine similarity divides out the lengths so that only direction counts.
Questions
- What is dot product?
- Multiply matching entries of two vectors and add the results. It is large when the vectors point the same way and zero when they are at right angles.
- Where is dot product used in AI?
- One number that says how much two vectors point the same way. It is the most used calculation in all of AI.
- What is the key idea to remember about dot product?
- <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">a</mi><mo>⋅</mo><mi mathvariant="bold">b</mi></mrow><annotation encoding="application/x-tex">mathbf{a} cdot mathbf{b}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="katex-base"><span class="katex-strut" style="height:0.4445em;"></span><span class="mord mathbf">a</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⋅</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="katex-base"><span class="katex-strut" style="height:0.6944em;"></span><span class="mord mathbf">b</span></span></span></span> multiplies matching entries and adds them up, giving one number.
- Where can I learn dot product step by step?
- In the lesson “The dot product” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.