➡️Vector Calculator
Perform 2D and 3D vector operations: addition, subtraction, dot product, cross product, magnitude, unit vector, scalar multiplication, and angle between vectors. Shows step-by-step component calculations.
Prefer to skip the form? Scroll down and Ask AI Instead. Just describe your situation and let AI handle the math for you in seconds.
Result
(4, 6)
Vector Component Comparison
✦ Ask AI Instead
Vector Calculator: Dot Product, Cross Product, Magnitude & More
A vector is a quantity with both magnitude and direction, written as A = (Ax, Ay) in 2D or A = (Ax, Ay, Az) in 3D. The magnitude (length) is |A| = √(Ax² + Ay² + Az²) and the unit vector  = A/|A| has length 1.
Dot product: A·B = AxBx + AyBy + AzBz = |A||B|cosθ — scalar; tells you how "aligned" two vectors are
| Operation | Formula | Result type |
|---|---|---|
| A + B | (Ax+Bx, Ay+By, Az+Bz) | Vector |
| A · B | AxBx + AyBy + AzBz | Scalar |
| A × B | (AyBz−AzBy, AzBx−AxBz, AxBy−AyBx) | Vector (3D) |
Vectors appear throughout physics (force, velocity, acceleration), computer graphics (surface normals, lighting), and linear algebra (basis vectors, transformations). This calculator handles all the standard operations for both 2D and 3D vectors.
Dot Product and Orthogonality
The dot product A·B = |A||B|cosθ gives a scalar equal to the product of magnitudes times the cosine of the angle between them. When A·B = 0, the vectors are perpendicular (orthogonal). When A·B = |A||B|, they point in the same direction. The dot product is used to find angles, compute projections, and check orthogonality.
Cross Product and the Right-Hand Rule
The cross product A×B (3D only) produces a vector perpendicular to both A and B. Its direction follows the right-hand rule: curl fingers from A toward B and your thumb points in the direction of A×B. Its magnitude |A×B| = |A||B|sinθ equals the area of the parallelogram spanned by A and B. When A×B = 0, the vectors are parallel (sinθ = 0).
Unit Vectors and Direction
A unit vector has magnitude 1 and represents pure direction. Any vector A can be written as A = |A|·Â where  = A/|A|. Unit vectors are used in physics for direction cosines, in 3D graphics for normals, and in any application where direction matters independently of magnitude.
Frequently Asked Questions
What is the difference between dot product and cross product?
The dot product A·B = AxBx + AyBy + AzBz is a scalar (single number). It equals |A||B|cosθ, so it measures how "aligned" two vectors are — positive if they point roughly the same way, negative if roughly opposite, zero if perpendicular. The cross product A×B is only defined in 3D and produces a vector perpendicular to both A and B with magnitude |A||B|sinθ — equal to the area of the parallelogram they form. Use dot product for angles and projections; use cross product for normals and areas.
How do you find the angle between two vectors?
Use the formula: θ = arccos(A·B / (|A|·|B|)). First compute the dot product A·B = AxBx + AyBy (+ AzBz for 3D). Then compute both magnitudes |A| = √(Ax²+Ay²+Az²) and |B|. Divide the dot product by the product of magnitudes to get cosθ. Apply arccos to find θ. Example: A=(1,0), B=(0,1). A·B = 0. cosθ = 0/(1·1) = 0. θ = arccos(0) = 90°. These vectors are perpendicular.
What is a unit vector and how do you find it?
A unit vector has magnitude exactly 1 and represents a direction without any scale. To find the unit vector  of vector A: (1) Compute |A| = √(Ax²+Ay²+Az²). (2) Divide each component by |A|:  = (Ax/|A|, Ay/|A|, Az/|A|). Example: A = (3, 4). |A| = √(9+16) = 5.  = (3/5, 4/5) = (0.6, 0.8). Check: |(0.6, 0.8)| = √(0.36+0.64) = √1 = 1 ✓. The zero vector (0,0,0) has no unit vector because division by zero is undefined.
How does vector addition work geometrically?
Vector addition A+B can be visualized two ways: (1) Tip-to-tail: place the tail of B at the tip of A; the resultant A+B goes from the tail of A to the tip of B. (2) Parallelogram: place both vectors at the same origin; the diagonal of the parallelogram formed by A and B is A+B. Algebraically, simply add corresponding components: A+B = (Ax+Bx, Ay+By, Az+Bz). Example: A=(2,1), B=(1,3). A+B = (3,4). Subtraction A-B is equivalent to adding the negative: A+(-B) where -B = (-Bx, -By).