How to use the 3D vector calculator
- Enter vector u as u x, u y and u z.
- Enter vector v as v x, v y and v z.
- Read Dot product (u·v) and Cross product (u×v).
- Check |u|, |v|, |u×v| (parallelogram area), Angle between, u + v and u − v.
What it does and when to use it
Three-dimensional vectors are used in physics, engineering, 3D graphics and robotics. The cross product gives a direction at right angles to two others: the normal to a surface for lighting a 3D model, the axis of a torque, or the direction of a magnetic force. Its length is the area of the parallelogram the two vectors span. The dot product and angle tell you how closely two directions line up, for example the angle between two edges of a roof frame.
For flat problems, the 2D vector calculator adds the projection and unit vector. The length of a vector from one point to another is the 3D distance between them. For bigger systems, the matrix calculator handles determinants, which are closely linked to cross products.
How it works
For u = (u.x, u.y, u.z) and v = (v.x, v.y, v.z):
- Dot product: u.x·v.x + u.y·v.y + u.z·v.z
- Cross product: (u.y·v.z − u.z·v.y, u.z·v.x − u.x·v.z, u.x·v.y − u.y·v.x)
- Magnitude: |u| = √(u.x² + u.y² + u.z²)
- Parallelogram area: |u×v|
- Angle: θ = arccos(u·v ÷ (|u| × |v|)), from 0° to 180°
Worked examples
Cross product, step by step. u = (2, −1, 3) and v = (1, 4, −2).
- x part: (−1)(−2) − (3)(4) = 2 − 12 = −10.
- y part: (3)(1) − (2)(−2) = 3 + 4 = 7.
- z part: (2)(4) − (−1)(1) = 8 + 1 = 9.
The tool shows Cross product (u×v): (-10, 7, 9) and a parallelogram area of 15.16575089. The dot product is 2 − 4 − 6 = −8, which is negative, so the angle is wider than 90°: Angle between: 117.8118431°.
Perpendicular vectors. u = (3, 0, 4) and v = (0, 5, 0). The dot product is 0 and the angle is 90°. Both vectors have length 5, so the parallelogram is a 5 by 5 square, and the tool shows |u×v| (parallelogram area): 25. The cross product is (−20, 0, 15).
Limits and tips
- If either vector is (0, 0, 0), the angle is shown as undefined.
- Points are not vectors. To get the vector from point P to point Q, subtract P from Q first.
- Results show up to 10 significant figures; components use whatever unit you typed.
- The calculation runs in your browser.
Frequently asked questions
Does the order of u and v matter?
How do I know the cross product is right?
How do I find the area of a triangle from two edge vectors?
Can I use it for 2D vectors?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.