Last answered:

06 Oct 2021

Posted on:

02 May 2021

1

Resolved: dot product for vector * vector

Hi,

Why in this video, it was mentioned when having dot product, we always multiply row vector * column vector, but in the previous video, the example of [-66] shown was column vector * column vector.

Thank you

1 answers ( 0 marked as helpful)
Instructor
Posted on:

06 Oct 2021

0

Hello Jaycus,

Thank you for your question - indeed, the dot product of matrices needs some clarification in the 1-dimensional case. Let us concentrate on the example in the 2 video lectures - the vectors are [2, 8, -4] and [1, -7, 3] and their final dot product is [-66]. Strictly speaking, you are correct - it is always row * column, so the correct dot product should look like:
--------------------------------------
                 [  1  ]
[2, 8, -4] * [ -7  ]  = [-66]
                 [  3  ]
-------------------------------------
In this case, the dimension will be (1 x 3) * (3 x 1) = (1 x 1) and that is how we get the final single value of -66.

The reason why the previous video took the freedom to use 2 column vectors for the calculation instead of a row vector and a column vector is a convention adopted when working with vectors. The idea is that every vector is a 1-dimensional matrix (!), so when performing dot product with vectors, it is broadly understood that the corresponding elements of the vectors get multiplied and then added up. That is why we can take the freedom and perform dot product of two column vectors or of two row vectors. Because they are vectors, the convention has it that we implicitly transform them into the form given in the example above and then perform the multiplication. Therefore, both video lectures actually display the same dot product - because we follow this convention when working with vectors.

Hopefully this explanation makes it a bit more understandable.

Best,
A. The 365 Team

Submit an answer