Dot Product

Prerequisites

Pythagorean Theorem Show

Vectors Show

Dot Product

Introduction

  • The dot product is a method of multiplying two vectors and receiving a number as the result.
  • Both vectors must contain the same amount of elements.
  • To calculate the dot product, multiply the corresponding elements and sum the results.

Example

code (Python)

import numpy as np

a = [3, 6, 2]
b = [1, 3, 8]

c = np.dot(a, b)
print(c)

Notes

  • It is also known as the scalar product and vector inner product.