Thursday, May 8, 2014

Review – Vectors and Dot Products

A vector is a quantity having direction and magnitude.

For any vector u = <a, b>, the magnitude is given by:

||u|| = √(a2 + b2)

For any two vectors u = <a, b> and v = <c, d>, the dot product is given by:

u • v = ac + bd

The angle between any two vectors u and is given by:

cosθ = (u • v) / (||u|| ||v||)

Now, let us try an example of each. For these examples let

u = <6, 4>
and
v = <2, 8>.

First, let us find the magnitude of each vector:

||u|| = √(62 + 42) =  √(36 + 16)  = √52 ≈ 7.2
||v|| =  √(22 + 82) =  √(4 + 64) =  √68 ≈ 8.2

Next, let us find the dot product of these vectors:

u • v = (6)(2) + (4)(8) = 12 + 32 = 44

Finally, let us find the angle between these vectors:

cosθ = (u • v) / (||u|| ||v||)
cosθ ≈ 44 / (7.2 × 8.2)
cosθ ≈ 44 / 59
cosθ ≈ 0.75
θ ≈ arccos(0.75)
θ ≈ 41.4º

No comments:

Post a Comment