Dot Product of Vectors

دوره: یادگیری عمیق با TensorFlow / فصل: Appendix Linear Algebra Fundamentals / درس 9

Dot Product of Vectors

توضیح مختصر

  • زمان مطالعه 0 دقیقه
  • سطح خیلی سخت

دانلود اپلیکیشن «زوم»

این درس را می‌توانید به بهترین شکل و با امکانات عالی در اپلیکیشن «زوم» بخوانید

دانلود اپلیکیشن «زوم»

فایل ویدیویی

متن انگلیسی درس

We have reached an important milestone multiplication.

Let’s start from the simplest one scalar multiplication five times six is 30 10 times minus 2 is minus

20.

I think these 10 seconds on it are enough.

It is much more interesting to investigate vector multiplication.

So let’s take these two vectors two 8 minus four and one minus seven.

Three if we want to multiply them.

The condition is they must be compatible or in other words have the same length.

All right.

There are two types of products we can get.

One is called datt or inner product while the other outer or tensor product here we won’t be needing

the outer product so you can read about it on your own if you wish.

The dot product however is heavily used when people talk about multiplying vectors and matrices.

That’s what they mean.

Other popular names for the dot product are inner or scalar product.

The notation is a dot signifying it is the dot product.

It works like this.

We multiply each two corresponding elements and find there’s some for our case.

The expression is as follows.

Two times one plus eight times minus seven plus minus four times three.

The result is minus 66 as you can see we multiply two vectors and got a scalar.

That is why we also call the dot product scalar product.

By the way.

Note that the dot product is nothing more than the sum of the products of the corresponding elements.

In python we would need to declare the two vectors.

Next we will use the method Dutch provided by num pi.

So any DOT x y.

This will give us the dot product which is minus 66

OK.

Let’s see another example just to make sure you get the concept the dot product of the vectors 0 2 5

8 and 20 30 for minus 1 is 0 times 20 plus two times three plus five times four plus eight times minus

one.

The result is 18 that’s all.

What about the operations from the beginning of the lecture 5 times 6 is 30.

This was a scalar product of two scalars that resulted in another scalar.

All right.

Finally what happens when we multiply a scalar by a vector let’s multiply five times the vector to 8

minus 4.

When we multiply a vector by a scalar we get a vector with the same length it’s incumbents are each

multiplied by that scalar.

So for our case we would get two times five eight times five and minus four times five.

The result is 10 40 minus 20.

What’s interesting is that the initial vector had been scaled five times.

So multiplication by a scalar doesn’t change the shape but only the scale of the values.

Got it.

That will do for now in the next Leichter we will generalize this concept to matrices.

Thanks for watching.

مشارکت کنندگان در این صفحه

تا کنون فردی در بازسازی این صفحه مشارکت نداشته است.

🖊 شما نیز می‌توانید برای مشارکت در ترجمه‌ی این صفحه یا اصلاح متن انگلیسی، به این لینک مراجعه بفرمایید.