1

I am trying to understand visual interpretation of dot product from 3b1b series video. Here, he defines dot product as follows:

Dot product of $\vec{v}$ and $\vec{w}$ is multiplication of projection of $\vec{w}$ on $\vec{v}$ and length of $\vec{v}$.
enter image description here

Here, he gives explanation of how dot product is related to projections.

Here is what I can make out of it:

  1. Taking dot product of two vectors to get single number is similar to applying matrix transformation: $$\begin{bmatrix} a \\ b \end{bmatrix} . \begin{bmatrix} c \\ d \end{bmatrix} = \begin{bmatrix} a & b \end{bmatrix} . \begin{bmatrix} c \\ d \end{bmatrix} =a.b+c.d $$
  2. Given two vectors $\vec{u}$ and $\vec{v}$, lets plot a number line passing through the $\vec{u}$. Lets assume $\vec{u}$ is a unit vector denoted by $\hat{u}$?
    enter image description here
  3. Defining projection transformation Projection transformation on this number line can be defined as follows:
    enter image description here
    Above each pink dot represent end point of a vector.
  4. So, this projection transformation defines projection of any vector $\vec{v}$ on $\hat{u}$
  5. Such transformation is completely defined by projection of $\hat{i}$ and $\hat{j}$ on $\hat{u}$, where $\hat{i}$ and $\hat{j}$ are unit vectors on $x$ axis and $y$ axis respectively, that is $\hat{i}=\begin{bmatrix} 1 \\ 0 \end{bmatrix} $ and $\hat{j}=\begin{bmatrix} 0 \\ 1 \end{bmatrix} $. $\hat{i}$ will land at $u_x$ ($x$ coordinate of $\hat{u}$) and $\hat{j}$ will land at $u_y$ ($y$ coordinate of $\hat{u}$). enter image description here
  6. Thus, this projection transformation is same as multiplying unit vector $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$ by $\begin{bmatrix} u_x & u_y \end{bmatrix}$: $$\begin{bmatrix} u_x & u_y \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} $$ and according to point 1, this is same as dot product: $$\begin{bmatrix} u_x \\ u_y \end{bmatrix} . \begin{bmatrix} 1 \\ 1 \end{bmatrix} $$

(The video author further explains how this can be extended for non unit vector $\vec{u}$, but that is not the concern for my doubt.)

So, in above, I am able translate projection transformation to matrix multiplication and then to matrix dot product. But this is able to translate "projection transformation" (defined in point 3 and 4 above), which I guess, is not exactly "the multiplication of projection of $\vec{w}$ on $\vec{v}$ and length of $\vec{v}$ " as stated in first quote. Or is it, but I am not able perceive? If yes, what I am missing? If no, how we can translate "multiplication of projection of $\vec{w}$ on $\vec{v}$ and length of $\vec{v}$ " to dot product of $\vec{v}$ and $\vec{w}$?

RajS
  • 1,317
  • There's another way to understand this visual interpretation: the dot product $u \cdot v$ is the area of the parallelogram made by u and (v rotated by 90 degrees). – Jules May 24 '20 at 19:05
  • In part 5, I don't understand anything that you have said after "Thus,...". I also don't understand any of the questions you are asking. I also don't understand any of the questions. It seems that you are asking whether two things are the same; what exactly are the two things that you are asking about? – Ben Grossmann May 24 '20 at 21:53
  • @Jules how it is area of parallelogram? Specifically I didnt get "$v$ rotated by 90 degrees". I read magnitude of cross product is area of parallelogram formed by $u$ and $v$. – RajS May 28 '20 at 19:16
  • @Omnomnomnom Was trying to find how "projection transformation ($\hat{u}.\vec{v}$)" equals to "the multiplication of length of projection of $\vec{v}$ on $\vec{u}$ & length of $\vec{u}$ ($|v|\times \cos(\theta)\times |u|$)". I tried example in depth & realized: $\vec{u}.\vec{v}=|u|\times\hat{u}.\vec{v}=|u|\times p=|u|\times |v|\times\cos{\theta}$. So, now, only surprising thing is how both formulae for projection gives same value $p=\hat{u}.\vec{v}=|v|\times\cos(\theta)\times|u|$....(to next comment) – RajS May 31 '20 at 07:35
  • (from last comment) ...Though I understand how individually they mean the projection, I am still wondering if there is any relation between them (say if we can get one formula from other). Also can we say, $\cos(\theta)\times|v|$ tells length of projection of item of length |v| at angle $\theta$. So angle is directly given as $\theta$. But $\hat{u}.\vec{v}$ means projection of $\vec{v}$ in the direction of $\hat{u}$. So angle is not directly given but we are given directions of both $\hat{u}$ & $\vec{v}$. (to next comment...) – RajS May 31 '20 at 07:58
  • (...from last comment) Also in both formulae magnitude of only $\vec{v}$ is considered. In second formula, we only need direction of $\vec{u}$, hence we consider only unit vector $\hat{u}$ that lies along $\vec{u}$. (Q1.) Is my visual interpretation of two formulae correct? Also just want to number earlier question: (Q2.) Can we get $\cos(\theta)\times |v|$ from $\hat{u}.\vec{v}$ and vice versa? – RajS May 31 '20 at 08:04

1 Answers1

1

Write $\vec{v}$ as the sum of two pieces, one parallel to $\vec{w}$ denoted $\vec{w}_\parallel$, the other perpendicular to $\vec{w}$ denoted $\vec{w}_\perp$. So$$\vec{v}=\vec{w}_\parallel+\vec{w}_\perp\implies\vec{v}\cdot\vec{w}=\vec{w}_\parallel\cdot\vec{w}\implies\vec{w}_\parallel=\frac{\vec{w}_\parallel\cdot\vec{w}}{\vec{w}\cdot\vec{w}}\vec{w}=\frac{\vec{v}\cdot\vec{w}}{\vec{w}\cdot\vec{w}}\vec{w}\implies\vec{w}_\perp=\vec{v}-\frac{\vec{v}\cdot\vec{w}}{\vec{w}\cdot\vec{w}}\vec{w}.$$So $\vec{w}_\parallel,\,\vec{w}_\perp$ are unique, and you can verify they work: $\vec{w}_\parallel$ is clearly parallel to $\vec{w}$, while$$\vec{w}_\perp\cdot\vec{w}=\vec{v}\cdot\vec{w}-\frac{\vec{v}\cdot\vec{w}}{\vec{w}\cdot\vec{w}}\vec{w}\cdot\vec{w}=0$$so $\vec{w}_\perp$ is perpendicular to $\vec{w}$. So $\vec{v}\cdot\vec{w}=\vec{w}_\parallel\cdot\vec{w}=|\vec{w}_\parallel||\vec{w}|$, which is just the product of the lengths of $\vec{w}$ and the part of $\vec{v}$ parallel to it.

J.G.
  • 115,835