Week 3 - Explanation for Vectorized Implementation: Video Slide Question


there is something I don’t understand or missed in the video. In the screenshot attached I have circled an area in red. I wonder where in that part of the equation the vectors w are?
Do I have to understand it like performing the np.dot function on W and X (with W having row vectors and X having column vectors)? And the result is shown just identical like the x vectors from above?

Any help?
Maybe I have missed somthing?
Many thanks.

The part that you have highlighted represents the matrix product WX. The feature matrix (or “design matrix”) X is an n_x \times m matrix i.e. n_x rows and m columns. Recall that n_x is the number of input “features” and m is the number of “examples” for all of the features. So the W matrix must have n_x columns for the matrix multiplication to work. You can think of that product as an ordered sequence of row times column operations i.e. dot products.

In answer to your question, the row vectors of ware embedded in the color-coded dots. The upper-left-most dot represents the dot product of W's first row vector, and the first column vector of X. The second purple dot represents the dot product of W's second row vector, and the first column vector, and so on. The w vectors are implicit in the dots. The color-coding is there to help you visualize the mechanics of matrix multiplication.


Many thanks. Now it got clear. I was not considering that the color-coded dots would represent the matrix multiplication result of W X.