Vector Calculator

Dot and cross products, magnitude, angle and projection for 2D/3D vectors.

About this tool

Enter two vectors with two or three components each, such as 1, 2, 3, plus a scalar if you need it. The calculator lists a + b, a โˆ’ b, the dot and cross products, both magnitudes and unit vectors, the angle between them, the projection of a onto b, the scalar multiple and the area of the parallelogram they span. It also tells you when the vectors are perpendicular or parallel.

How vector operations work

A vector has both a size and a direction, written as components such as (1, 2, 3). Adding and subtracting work component by component. The magnitude, or length, is the square root of the sum of the squared components: |(1, 2, 3)| = โˆš14 โ‰ˆ 3.742. Dividing a vector by its magnitude gives a unit vector pointing the same way. The dot product, aโ‚bโ‚ + aโ‚‚bโ‚‚ + aโ‚ƒbโ‚ƒ, is a single number. It's zero when the vectors are perpendicular and links to the angle between them: cos ฮธ = a ยท b รท (|a||b|). The cross product of two 3D vectors is a new vector perpendicular to both, following the right-hand rule, and its length is the area of the parallelogram they form. For a = (1, 2, 3) and b = (4, 5, 6), a ยท b = 32, a ร— b = (โˆ’3, 6, โˆ’3) and the angle between them is about 12.93ยฐ. The projection of a onto b is the shadow of a along b's direction. These operations underpin physics, where work is a dot product and torque a cross product, and 3D graphics, where cross products give surface normals. Honest limits: the cross product is defined for 3D vectors; 2D inputs are treated as having z = 0, so only a z-component appears. Results are rounded to six decimal places. The matrix calculator handles transformations and the scientific calculator covers trigonometry.

Frequently asked questions

What does the dot product tell you?

How much two vectors point the same way. It's zero for perpendicular vectors and gives the angle between them.

What is the cross product used for?

Finding a vector perpendicular to two others, such as a surface normal, and quantities like torque.

How do you find the angle between two vectors?

ฮธ = arccos(a ยท b รท (|a| ร— |b|)).

Is my data saved?

No. The calculation runs in your browser and nothing is stored or sent.