From the course: Machine Learning Foundations: Linear Algebra

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Dot product of vectors

Dot product of vectors

- [Narrator] Imagine a machine learning algorithm gets three images, first one of an apple, second one of a pear, and a third one, unknown. What we would like to know is if it is more probable for the unknown image to be labeled as an apple or a pear? In the core of this calculation is a dot product of two vectors. It is widely used in machine learning, as it is used in many operations and algorithms. There are three different ways it can be represented with symbols. We are going to use the dot notation. The dot product of two vectors is calculated by multiplying their corresponding elements by each other and then summing them all. It's a single number that provides information about the relationship between two vectors. It could be represented with the following formula, where a and b are vectors of the same dimensionality and ai represent the ith element of a. Let's see how it works in a simple example. If you have…

Contents