07-Dot Product and Duality#
Geometric Meaning of Dot Product#
The dot product of two vectors $\vec{V}$ and $\vec{W}$ equals the projection length of $\vec{W}$ in the direction of $\vec{V}$ multiplied by the length of $\vec{V}$.
Formula#
$$ (x_1, y_1) \cdot (x_2, y_2) = x_1x_2 + y_1y_2 $$
- Sign of dot product result:
- If the projection direction of $\vec{W}$ is the same as $\vec{V}$, the dot product is positive.
- If the projection direction of $\vec{W}$ is opposite to $\vec{V}$, the dot product is negative.
- If $\vec{W}$ is perpendicular to $\vec{V}$, the dot product is zero.
- Dot product satisfies commutativity: $\vec{V} \cdot \vec{W} = \vec{W} \cdot \vec{V}$.
Assuming W and V are two vectors of the same length, they are symmetric on a line. When V becomes 2 times longer, W’s projection on V remains unchanged, while V’s projection on W becomes 2 times longer. At this point:
$2(\vec{V}) \cdot \vec{W} = 2(\vec{V} \cdot \vec{W})$
Duality#
The result of a 2D vector transformed by a $1 \times 2$ matrix is the same as the dot product result of two 2D vectors. The process of one vector projecting onto another can be viewed as a linear transformation.
Example: $[1, -2] \begin{bmatrix}4 \ 3\end{bmatrix} = \begin{bmatrix}1 \ -2\end{bmatrix} \cdot \begin{bmatrix}4 \ 3\end{bmatrix}$
Assuming there exists a unit vector $\vec{U}$, and the projections of basis vectors $i, j$ onto this vector are $U_x, U_y$, then the projection matrix is $[U_x, U_y]$. Any vector transformed by $[U_x, U_y]$ to that line, or dot product with $\vec{U}$, gives the same result. The dot product of $\vec{U}$ with unit vector $i$ equals the projection length of $\vec{U}$ in the direction of $i$. If $\vec{U}$ is scaled to 3 times its original size, like $[3U_x, 3U_y]$, the result equals the projection value multiplied by 3. This phenomenon is called “duality”, which is the natural correspondence between matrix-vector multiplication and dot product.
08-Cross Product#
Part One: Standard Introduction to Cross Product#
Given vectors $\vec{V}$ and $\vec{W}$, translate them to each other’s endpoints to form a parallelogram plane. The cross product result is a vector perpendicular to this plane, with length equal to the plane area. The direction of the new vector produced by the cross product is determined by the right-hand rule.
Sign of Cross Product:#
- If $\vec{V}$ is to the right of $\vec{W}$, the result is positive.
- If $\vec{V}$ is to the left of $\vec{W}$, the result is negative.
Formula#
Two-dimensional
$$ \det\left(\begin{bmatrix}X_1 & Y_1 \ X_2 & Y_2\end{bmatrix}\right) = X_1Y_2 - X_2Y_1 $$
Three-dimensional
$$ (V_1, V_2, V_3) \times (W_1, W_2, W_3) = (V_2W_3 - V_3W_2, V_3W_1 - V_1W_3, V_1W_2 - V_2W_1 $$
Characteristics#
- The more perpendicular the two vectors are, the larger the area.
- If one vector is scaled, the area is also scaled proportionally.
- If the result is negative, it indicates the coordinate system orientation is flipped.
Part Two: Cross Product from the Perspective of Linear Transformation#
- Define a linear transformation from 3D space to 1D:
There exist basis vectors $\vec{V}\vec{W}$, and any vector $\vec{U}$
$$ \vec{U} = \begin{bmatrix}x \ y \ z\end{bmatrix}, f((x, y, z)) = \det\left(\begin{bmatrix}x & y & z \ V_1 & V_2 & V_3 \ W_1 & W_2 & W_3\end{bmatrix}\right) $$
There exists a vector $\vec{P}$ such that: $$\begin{bmatrix}P_1 \ P_2 \ P_3\end{bmatrix} \cdot \begin{bmatrix}x \ y \ z\end{bmatrix} = \det\left(\begin{bmatrix}x & y & z \ V_1 & V_2 & V_3 \ W_1 & W_2 & W_3\end{bmatrix}\right)$$
The axis perpendicular to basis vectors $\vec{V}\vec{W}$ is $K$
In 3D space, the volume of a parallelepiped is determined by the projection length of $\vec{U}$ on $K$ and the area of the plane formed by $\vec{V}\vec{W}$.
$\vec{P} \cdot \vec{U} = |\vec{P}| \times \vec{U}_{\text{\scriptsize projected onto P}}$
$|\vec{P}| \times \vec{U}{\text{\scriptsize projected onto P}}$ = Area of plane formed by $\vec{V}\vec{W}$ × $\vec{U}{\text{\scriptsize projected onto K}}$.
From this, we can conclude that $\vec{P}$ is perpendicular to the plane formed by $\vec{V}\vec{W}$, with length equal to the area of that plane, therefore the equation holds.