# trying to prove dot product definitions (algebraic and geometric) are equal, found inconsistency

The intention is to prove that the geometric and algebraic definitions of the dot product are equivalent.

The author does most of the proof using mostly coordinate notation ($$$$), I wanted to simplify things by using vector notation ($$\vec{A}$$) until the very end and I found I cant do it, not sure why.

First I declare the law of cosines using the vectors $$\vec{A},\vec{B}$$.

I declare vector $$\vec{C}$$ to be

$$\vec{C}=\vec{A}-\vec{B}$$

So, law of cosines: $$|A|^2+|B|^2-2|A||B|cos(\theta)=|A-B|^2$$

I expand the right hand side $$\require{cancel} \text{Expand right side: } |A|^2+|B|^2-2|A||B|cos(\theta)=|A|^2+|B|^2-2|A||B| \\ \text{simplify: }\cancel{|A|^2}+\cancel{|B|^2}\cancel{-2}|A||B|cos(\theta)=\cancel{|A|^2}+\cancel{|B|^2}\cancel{-2}|A||B|\\ \text{then: }|A||B|cos(\theta)=|A||B|$$

Ok so thats a funny result that could only be true if $$\theta$$ is $$0$$

whats the meaning of this?

can somehow $$|A||B|$$ be transformed into $$a_xb_x+a_yb_y+c_xc_y$$? the proof on the video would suggest so, but i dont see how I can do that from $$|A||B|= \sqrt{a_x^2+a_y^2+a_z^2}\sqrt{b_x^2+b_y^2+b_z^2}$$

maybe im missing some simple algebraic trick?

• $$|A-B|^2=(A-B)\cdot(A-B)=|A|^2+|B|^2-2A\cdot B.$$ – Intelligenti pauca Feb 24 at 21:53

Note that, in general,

$$|A-B|^2 \neq |A|^2 + |B|^2 - 2|A| |B| \tag{1}\label{eq1A}$$

Instead, as stated in Aretino's question comment, you have

$$|A - B|^2 = (A - B)\cdot (A - B) = |A|^2 + |B|^2 - 2A \cdot B \tag{2}\label{eq2A}$$

This shows it's only true when $$A$$ and $$B$$ are parallel, i.e., $$\theta = 0$$, as you found.

In a similar concept, consider the triangle inequality which says

$$|A + B| \leq |A| + |B| \tag{3}\label{eq3A}$$

Squaring both sides gives

$$|A + B|^2 \leq |A|^2 + |B|^2 + 2|A| |B| \tag{4}\label{eq4A}$$

In particular, the $$2$$ sides are not equal in general.

• that's interesting. the two vectors do not seem to be presented as parallel in the proof on the video. – Joaquin Brandan Feb 24 at 21:55
• @JoaquinBrandan I haven't watched the video. However, my understanding of your question is that you are doing that expansion instead. As my answer states, it's not true in general, which is why you got the apparent contradiction that it can only be true if $\theta = 0$. – John Omielan Feb 24 at 22:03
• In the video its assumed that the vector opposed to $\theta$ is $C$ (opposed as the opposed side of the angle in a triangle) and that for any vector $C$ it must be true that $C=A-B$ (as dectribed here qph.fs.quoracdn.net/… ) – Joaquin Brandan Feb 24 at 22:09
• @JoaquinBrandan My point is, did the video at any time say my ($1$) equation was always true, i.e., $|A - B|^2 = |A|^2 + |B|^2 - 2|A| |B|$? – John Omielan Feb 24 at 22:12
• @JoaquinBrandan That part is correct. The issue is your expansion of $|A - B|^2$ is not generally correct. – John Omielan Feb 24 at 22:21

$$\require{cancel} \text{Expand right side: } |A|^2+|B|^2-2|A||B|cos(\theta)=|A|^2+|B|^2\color{red}{-2|A||B|} \\$$

You should use $$A=(a_x,a_y,a_z)$$ and $$B=(b_x,b_y,b_z)$$then $$\begin{eqnarray*} \mid A-B \mid^2 &=& (a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2 \\ &=&\mid A \mid^2 + \mid B \mid^2 \color{blue}{-2(a_xb_x+ a_yb_y+a_zb_z)}. \\ \end{eqnarray*}$$

• I did, but shouldnt that mean that $|A||B|= 2(a_xb_x+a_yb_y+a_zb_z)$ somehow? how do you get to that? – Joaquin Brandan Feb 24 at 21:58
• When you expand each bracket you get three terms \begin{eqnarray*} (a_x-b_x)^2=a_x^2+b_x^2-2a_xb_x. \end{eqnarray*} Now regroup the terms ... – Donald Splutterwit Feb 24 at 22:00
• I did, I know I get that if I use the coordinate notation, however if i first use the vector notation I end up with $|A|^2+|B|^2-2|A||B|$, this means that $|A||B|= 2(a_xb_x+a_yb_y+a_zb_z)$, however given that $|A||B|= \sqrt{a_x^2+a_y^2+a_z^2}\sqrt{b_x^2+b_y^2+b_z^2}$ then $\sqrt{a_x^2+a_y^2+a_z^2}\sqrt{b_x^2+b_y^2+b_z^2}= -2(a_xb_x+a_yb_y+a_zb_z)$ and I dont see how that can be true. I hope that clarifies the question. – Joaquin Brandan Feb 24 at 22:04
• See the first equation in John Omelian's answer. $\mid . \mid^2$ does not expand like that. – Donald Splutterwit Feb 24 at 22:08
• Thanks, I hadnt noticed that it didnt expand like that. actually the expansion uses the dot product itself, so to expand in vector notation I actually have to do this proof first to then define the expansion in vector notation as using the dot product. thank you. – Joaquin Brandan Feb 24 at 22:13