Vector dot and cross product calculator
The dot product measures alignment and the cross product measures the area they span, pointing perpendicular to both.
Dot product
32
- Cross product x
- -3
- Cross product y
- 6
- Cross product z
- -3
- Magnitude of the cross product
- 7.348 469 228 35
- Magnitude of A
- 3.741 657 386 77
- Magnitude of B
- 8.774 964 387 39
- Angle between them
- 12.933 15 degrees
Show the working
- A x = 1
- A y = 2
- A z = 3
- B x = 4
- B y = 5
- B z = 6
- Dot product = 1*4 + 2*5 + 3*6 = 32
- Cross product x = 2*6 - 3*5 = -3
- Cross product y = 3*4 - 1*6 = 6
- Cross product z = 1*5 - 2*4 = -3
- Magnitude of A = hypot(1, 2, 3) = 3.741 66
- Magnitude of B = hypot(4, 5, 6) = 8.774 96
- Magnitude of the cross product = hypot(-3, 6, -3) = 7.348 47
- Angle between them = 3.741 66 * 8.774 96 != 0 ? deg(acos(clamp(32/(3.741 66*8.774 96), -1, 1))) : 0 = 12.9332
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- A . B = ax bx + ay by + az bz
- A x B = (ay bz - az by, az bx - ax bz, ax by - ay bx)
- angle = arccos(A . B / (|A| |B|))