# Dot product formula proof [duplicate]

If two vectors $\vec{A} =A_x\hat{i} + A_y \hat{j} + A_z \hat{k}$ and $\vec{B} =B_x\hat{i} + B_y \hat{j} + B_z \hat{k}$, have angle $\theta$ between them then the dot product (scalar product) of $\vec{A}$ and $\vec{B}$ is $$\vec{A}\cdot\vec{B} = |\vec{A}||\vec{B}|\cos \theta$$

$$\vec{A}\cdot\vec{B} =\left(A_x^2 +A_y^2+A_z^2\right)^{1/2}\left(B_x^2 +B_y^2 +B_z^2\right)^{1/2} \cos \theta$$

$$A_x B_x+ A_yB_y+A_zB_z=\left(A_x^2 +A_y^2+A_z^2\right)^{1/2}\left(B_x^2 +B_y^2 +B_z^2\right)^{1/2} \cos \theta$$

Can we mathematically derive the last equation from right to left or left to right? Is there any proof stating that the equation to be practically and mathematically true?

• We have Mathjax here, so you can typeset your formulas in latex. I've done it this time, but here's a guide for the next question you ask: math.meta.stackexchange.com/questions/5020/… – CDCM Sep 7 '17 at 14:09
• This is more of a mathematics question than a physics question; I've voted to migrate it. – Michael Seifert Sep 7 '17 at 14:09
• Thanks both of you – F2NDC Sep 7 '17 at 14:30

First, prove that the dot product is distributive, that is:

$$(\mathbf{A}+\mathbf{B})\cdot\mathbf{C}= \mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C}\tag{1}$$

You can do this with the help of the "parallelogram construction" of vector addition and basic trigonometry.

It is plain sailing from here. We use (1) to express the two vectors in a dot product as the superposition of basis vectors. Then the orthogonality of the basis vectors (which holds by definition) eliminates cross terms of the form $A_j\,B_k$ where $k\neq j$.

We can also note here that the Gram-Schmidt procedure guarantees that we can always choose a basis which is orthogonal with respect to a given inner product. Which brings us to the second way of looking at the problem.

We begin with an abstract inner product, i.e. a symmetric, billinear (so that it is distributive by definition) scalar product which is always strictly positive for nonzero vectors and nought if either vector is nought. From the inner product definition along, one can prove the Cauchy-Schwarz inequality, and from there we can show that the range of possible values of

$$c\stackrel{def}{=}\frac{\mathbf{A}\cdot\mathbf{B}}{|\mathbf{A}|\,|\mathbf{B}|}$$

is $[-1,\,1]$ and that all values in this interval can be realized. Therefore, there is no problem in definining $c$ to be a cosine of an angle, since $\arccos(c)$ will always exist and be real.

I think you can try to do it this way :

Consider the plan containing both vectors, find the equation of this plan.

Build a 2D orthogonal basis in this plan and find the vector's coordinates in this new basis.

Now you can write cosθ as a function of your vector's (new) coordinates (in a 2D basis it's easy).

Then you can use the relations you found between the old and the new basis to try to prove the identity.

I do think there is a better way to do it and I didn't calculate it myself, I'm just trying to find a method.