Vector Algebra Calculator

Dot Product, Cross Product, Magnitude, Unit Vector & Angle Between Vectors

Dimension:

Dot product gives a scalar, used for angle calculation.

Cross product gives a vector perpendicular to both (only 3D). In 2D, returns scalar magnitude.

Magnitude = √(x² + y² [+ z²]), unit vector = v/|v|.

Quick Answer – What is Vector Algebra?

Vector algebra deals with quantities having both magnitude and direction. The dot product (scalar product) yields a scalar representing the product of magnitudes and the cosine of the angle. The cross product (vector product) yields a vector perpendicular to both, with magnitude equal to the area of the parallelogram they span.

Key Formulas

Magnitude: |v| = √(x² + y² + z²)
Unit vector: v̂ = v / |v|
Dot: a · b = axbx + ayby [+ azbz]
Cross (3D): a × b = (aybz − azby)i + (azbx − axbz)j + (axby − aybx)k
Angle: cosθ = (a · b) / (|a||b|)

Solved Examples

Example 1: Dot product (2,3) and (4,−1) = 2×4 + 3×(−1) = 5

Example 2: Cross product (1,2,3) × (4,5,6) = (−3, 6, −3)

Example 3: Unit vector of (3,4) → (0.6, 0.8)

Frequently Asked Questions

Q1. What vector dimensions are supported?
Both 2D and 3D vectors. The cross product is naturally 3D, but you can compute a 2D cross product (scalar magnitude) via the determinant.
Q2. How do I enter negative components?
Simply type a minus sign before the number, e.g., −5. Decimals and scientific notation are also accepted.
Q3. Does the calculator give the angle in degrees?
Yes, the angle from the dot product is displayed in degrees.
Q4. How precise are the results?
Results are rounded to 4 decimal places, using double-precision arithmetic.
Q5. Can I compute the projection of one vector onto another?
The dot product and magnitude values allow you to compute projection manually: projba = (a·b / |b|²) b. This calculator shows the dot product and magnitudes needed.