Math

Posted by ECON爱好者 on October 30, 2016

A New Post

Dot Products, Norms, and Angles Between Vectors.

Recall that the Law of Cosines, a generalization on the Pythagorean Theorem, gives us the relationship between the side lengths of an arbitrary triangle. Specifically, if a triangle has side lengths aa, bb, and cc, then

where θ is the angle between the sides of length aa and bb.

Consider the triangle that can be formed from the vectors xx, yy, and x−yx−y.

Applying the Law of Cosines to this triangle, we have

But this implies, using our observations about the dot product made above, that

Subtracting the common (x⋅x)(x⋅x) and (y⋅y)(y⋅y) from both sides, we find −2||x||||y||cosθ=−2(x⋅y)

Which, solving for cosθcos⁡θ tells us