Vector Calculator: Dot Product, Cross Product, Magnitude and Angle in 3D
Magnitude, sum, difference, dot and cross product, angle and projection of two vectors in three dimensions.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Enter the x, y and z components of vectors A and B. The calculator gives the magnitude of each from the square root of the sum of the squares, and the unit vector of A. It adds and subtracts the vectors head-to-tail.
The dot product is a number that measures how much they point the same way. It gives the angle between them and the projection of A on B. The cross product is a vector at right angles to both, and its magnitude is the area of the parallelogram they make.
Use it for forces, displacements, velocities, torque (position cross force), work (force dot displacement) and the angle between two directions.
Formulas used
- |\vec A| = \sqrt{A_x^2 + A_y^2 + A_z^2}
- \vec A\cdot\vec B = |A||B|\cos\theta
- |\vec A\times\vec B| = |A||B|\sin\theta
Worked example
With the default numbers in the calculator above:
- Magnitude of A and of B: A = 3.00, B = 4.00
- Unit vector of A: (1, 0, 0)
- Sum A + B: (3, 4, 0)
- Magnitude of A + B: 5.00
- Difference A - B: (3, -4, 0), magnitude 5.00
- Dot product: 0.00
- Angle between A and B: 90.00 °
- Projection of A on B (the part of A along B): 0.00
- Cross product A x B: (0, 0, 12)
- Magnitude of the cross product (the area of the parallelogram): 12.00
Change the numbers in the calculator to see the full working, every step, for your own case.
A second worked example
A different case, with these numbers: Vector A: x component 1; Vector A: y component 2; Vector A: z component 3; Vector B: x component 4; Vector B: y component 5; Vector B: z component 6.
- Magnitude of A and of B: A = 3.74, B = 8.77
- Unit vector of A: (0.26726, 0.53452, 0.80178)
- Sum A + B: (5, 7, 9)
- Magnitude of A + B: 12.45
- Difference A - B: (-3, -3, -3), magnitude 5.20
- Dot product: 32.00
- Angle between A and B: 12.93 °
- Projection of A on B (the part of A along B): 3.65
- Cross product A x B: (-3, 6, -3)
- Magnitude of the cross product (the area of the parallelogram): 7.35
Common questions
What does a zero dot product mean?
The vectors are at right angles.
Does the order matter?
For the dot product no. For the cross product yes: B x A is the opposite of A x B.
How do I use it for 2D?
Set the z components to 0.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Any engineering mathematics or physics text (vector algebra); Kreyszig, Advanced Engineering Mathematics.
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →