with explanation
commited
commit
c623c3cf9048fc00cdefbdee622d21afa7f3aedd
... | ... | @@ -1 +1,11 @@ |
1 | Computes the dot product of the two input vectors. |
|
... | ... | \ No newline at end of file |
0 | Computes the dot product of the two input vectors. |
|
1 | ||
2 | The dot product is algebraically defined as taking 2 vectors of the same length, and multiplying each number side-by-side, and them summing them all. |
|
3 | ||
4 | e.g. If vector 1 is *[2,3,-2]* and vector 2 is **[1,2,3]**: |
|
5 | - Multiplying *2* and **1** gives 2. |
|
6 | - Multiplying *3* and **2** gives 6. |
|
7 | - Multiplying *-2* and **3** gives -6. |
|
8 | - Adding them all gives 2, the dot product of them two. |
|
9 | ||
10 |