9

Dot product of two vectors on plane could be defined as product of lengths of those vectors and cosine of angle between them.

In cartesian coordinates dot product of vectors with coordinates $(x_1, y_1)$ and $(x_2, y_2)$ is equal to $x_1x_2 + y_1y_2$.

How to prove it?

Ivo Terek
  • 80,301
jms
  • 101
  • 1
    How do you define the length of a vector without dot product? |v| = √(v∙v)... without this definition your first definition doesn't make sense. You can, however, think simply in terms of cartesian coordinates and prove that x1x2 + y1y2 = (x1^2 + y1^2)(x2^2 + y2^2) cos (theta). – Sklivvz Aug 01 '10 at 13:25

2 Answers2

14

I suppose you want to prove that two your definitions of dot product are the same. We start with definition of dot product as $(\vec{u}, \vec{v}) = |\vec{u}| |\vec{v}| \cos \theta$ and prove that it also satisfies $(\vec{u}, \vec{v}) = x_1 x_2 + y_1 y_2$.

At first you can prove that dot product is linear: $(\vec{v_1}, \vec{v_2} + \alpha \vec{v_3}) = (\vec{v_1}, \vec{v_2}) + \alpha (\vec{v_1}, \vec{v_3})$. This is true because $(\vec{v_1}, \vec{v_2})$ is equal to the product of $|\vec{v_1}|$ and projection of $\vec{v_2}$ on $\vec{v_1}$. Projection of sum of vectors is equal to sum of projections. Hence dot product is linear.

Let $\vec{e_1}$ and $\vec{e_2}$ be vectors with coordinates $(1, 0)$ and $(0, 1)$.

After that if $\vec{v_1} = x_1 \vec{e_1} + y_1 \vec{e_2}$ and $\vec{v_2} = x_2 \vec{e_2} + y_2 \vec{e_2}$ then by linearity of dot product we have $(\vec{v_1}, \vec{v_2}) = x_1 x_2 (\vec{e_1}, \vec{e_1}) + x_1 y_2 (\vec{e_1}, \vec{e_2}) + x_2 y_1 (\vec{e_2}, \vec{e_1}) + x_2 y_2 (\vec{e_2}, \vec{e_2})$. Since $(\vec{e_1}, \vec{e_1}) = (\vec{e_2}, \vec{e_2}) = 1$ and $(\vec{e_1}, \vec{e_2}) = (\vec{e_2}, \vec{e_1}) = 0$ we have $(\vec{v_1}, \vec{v_2}) = x_1 x_2 + y_1 y_2$.

Bikram Kumar
  • 143
  • 6
falagar
  • 4,270
  • How does this show that $v \cdot w = |v| |w| \cos \theta$? – Eric O. Korman Aug 01 '10 at 12:33
  • As an interesting note, if we are showing the consistency with the inner product, we assume linearity and so we can proceed along the same lines. Of course the theory related to projections takes more work – Casebash Aug 01 '10 at 12:37
  • 5
    @Eric: This answer assumes the definition of dot product as |v||w|cos(θ) and proves that x1x2+y1y2 is the same as it; your answer does it vice-versa. It would be better if both answers made it clearer where they were starting from. (Though from the vaguely stated question, I suspect falagar's answer is slightly closer to the intended spirit.) – ShreevatsaR Aug 01 '10 at 12:43
  • Ah sorry, I skipped over the part "At first you can prove that dot product is linear..." and thought it just assumed it. – Eric O. Korman Aug 01 '10 at 12:49
  • @ShreevatsaR: thank you for your comment. I added a line about what I start from. – falagar Aug 01 '10 at 15:07
  • @falagar \vec, not \ver. – kennytm Aug 01 '10 at 15:21
  • @ShreevatsaR, but isn't the OP asking for the direction of Eric's answer? I must be missing something here otherwise. – BBischof Aug 01 '10 at 17:40
  • @BBischof: It's so vaguely written that it's hard to tell. :-) (The first version didn't even have "How to prove it?" but merely mentioned two definitions.) Maybe the title is a clue; there's too little data here for a conclusion. :P – ShreevatsaR Aug 01 '10 at 22:38
  • @ShreevatsaR Fair enough :/ – BBischof Aug 01 '10 at 22:47
  • @falagar In your first paragraph there is one sentence too many. – Rudy the Reindeer Jul 02 '12 at 07:14
9

The dot product is invariant under rotations, we may therefore rotate our coordinate system so that v is along the x-axis. In this case, $v = (|v|, 0)$. Letting $w = (x,y)$ we have (using the definition of dot product in Cartesian coordinates) $v \cdot w = |v| x$. But what is $x$? Well, if you draw the picture and let $\theta$ be the angle between v and w, then we see that $\cos \theta = x/|w||$ so that $x = |w| \cos \theta$. Thus $v\cdot w = |v||w| \cos \theta$.

  • Is there an easy method to prove invariance under rotations of the x1*x2 + y1*y2 form, without using the equivalence of the two forms? – Casebash Aug 01 '10 at 12:41
  • 1
    It is a straightforward computation once we know the matrix form of rotations. That can be derived pretty easily geometrically by seeing what a rotation does to the basis vectors. – Eric O. Korman Aug 01 '10 at 12:53
  • If $Q$ is a an orthogonal matrix, then $Q^{T} Q = I$, where $I$ the identidy. Hence, $(Qy)^{T} (Qx) = y^T Q^{T} Qx = y^{T} x$, then the dot product is invariant to orthogonal matrix. It's only left to us to find a such a $Q$ matrix, which it can be choosen to be a Householder trasnformation as done here: https://en.wikipedia.org/wiki/Householder_transformation. In 2D, it can be choosen to be a Givens rotations as well as done here https://en.wikipedia.org/wiki/Givens_rotation. P.S.: I vote to make everyone drop the term rotations in favor to orthogonal transformations; this just confuses all – R. W. Prado Sep 07 '21 at 22:28