Login

Fancade Wiki

Improved explanation; added "Right Angles" section

... ...
@@ -1,15 +1,34 @@
1
Dot product is algebraically defined as the sum of the product of the corresponding vector component.
1
The Dot Product is a way of multiplying two vectors together.
2 2
3
If we were to find the dot product of Vector A (Ax, Ay, Az) and Vector B (Bx, By, Bz), we would use this formula:
4
* A•B = (Ax×Bx)+(Ay×By)+(Az×Bz)
3
We can calculate the Dot Product of two vectors this way:
5 4
6
A few things to know that might help:
7
- If the angle formed by the two input vectors is acute, the dot product is positive.
8
- If the angle is a right angle (both vectors perpendicular), then the dot product is zero.
9
- If the angle is obtuse, then the dot product is negative.
5
A · B = \|A\| × \|B\| × cos(θ)
6
7
Where:
8
\|A\| is the magnitude (length) of vector A,
9
\|B\| is the magnitude (length) of vector B,
10
and θ is the angle between A and B.
11
12
So we multiply the length of A times the length of B, then multiply by the cosine of the angle between A and B.
13
14
We can also calculate it algebraically this way:
15
16
A · B = Ax × Bx + Ay × By + Az × Bz
17
18
So we multiply the x's, multiply the y's, multiply the z's, and then sum them all together.
19
20
The result is a [[number]] (called a "scalar" so we know it's not a vector).
10 21
11 22
[[/uploads/Dot Product.png]]
12 23
24
## Right Angles
25
26
When two vectors are at right angles to each other the dot product is zero. This can be a handy way of checking if two vectors are perpendicular.
27
28
If the angle formed by the two input vectors is acute, the dot product is positive.
29
30
If the angle is obtuse, then the dot product is negative.
31
13 32
## Example
14 33
15 34
If the two input vectors are unit vectors (vectors with length of 1), the dot product outputs the cosine of the angles formed by those two vectors. If the two input aren't unit vectors, we can still find the cosine of the angle with two methods:
Fancade Wiki