# Vector Math & 3D Dot/Cross Product Calculator

Perform 2D and 3D vector calculations including magnitude, angle, dot product, and cross product with this free math calculator.

---

- **Canonical URL:** https://dothecalculation.com/calculators/vector-math-calculator
- **Category:** Math calculators
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Vector Algebra, Dot & Cross Product Calculator

Perform 2D and 3D vector addition, subtraction, dot products, and cross products, with magnitude and angle-between-vectors calculations.

- Vector addition, subtraction & magnitude \(\|\mathbf{v}\|\) in 2D or 3D
- Dot product \(\mathbf{a} \cdot \mathbf{b}\) with angle-between-vectors calculation
- Cross product \(\mathbf{a} \times \mathbf{b}\) with a live vector diagram

## Vector Fundamentals: Magnitude, Direction & Component Notation

A vector is a mathematical quantity possessing both magnitude (length) and direction, contrasting with a scalar quantity, which has only magnitude (such as temperature or mass). Vectors represent physical quantities including velocity, acceleration, force, and displacement.

In Cartesian space \(\mathbb{R}^3\), a 3D vector \(\mathbf{v}\) is written as an ordered triple or a combination of unit basis vectors \(\mathbf{i}, \mathbf{j}, \mathbf{k}\): $$\mathbf{v} = \begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix} = v_x \mathbf{i} + v_y \mathbf{j} + v_z \mathbf{k}$$

The magnitude (Euclidean norm) of \(\mathbf{v}\) uses the Pythagorean distance formula: $$\|\mathbf{v}\| = \sqrt{v_x^2 + v_y^2 + v_z^2}$$

A unit vector \(\hat{\mathbf{v}}\) has magnitude 1 and points in the same direction as \(\mathbf{v}\), found by normalizing: $$\hat{\mathbf{v}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}$$

Vector addition and scalar multiplication are done entry-wise: \(\mathbf{u} + \mathbf{v} = (u_x + v_x, u_y + v_y, u_z + v_z)\) and \(c\mathbf{v} = (cv_x, cv_y, cv_z)\) — this calculator computes both directly for 2D or 3D input vectors.

## The Dot Product (Scalar Product): Angle & Orthogonality

The dot product of two vectors \(\mathbf{a}\) and \(\mathbf{b}\) yields a scalar value. Algebraically, it's the sum of component products: $$\mathbf{a} \cdot \mathbf{b} = a_x b_x + a_y b_y + a_z b_z$$ Geometrically, it connects vector magnitudes with the cosine of the enclosed angle \(\theta\) (\(0 \le \theta \le \pi\)): $$\mathbf{a} \cdot \mathbf{b} = \|\mathbf{a}\| \|\mathbf{b}\| \cos\theta$$

This calculator uses that relationship to solve for the angle between the two input vectors directly: $$\theta = \arccos\left( \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|} \right)$$

Two non-zero vectors are orthogonal (perpendicular, \(\theta = 90^\circ\)) if and only if \(\mathbf{a} \cdot \mathbf{b} = 0\). In physics, mechanical work \(W\) done by a force \(\mathbf{F}\) along a displacement \(\mathbf{d}\) is the dot product \(W = \mathbf{F} \cdot \mathbf{d}\).

## Vector Projection: Reference Formulas (Not Computed by This Tool)

This calculator does not compute vector projections directly, but you can derive one by hand from its dot product and magnitude outputs.

The scalar projection of \(\mathbf{a}\) onto \(\mathbf{b}\) is the signed length of \(\mathbf{a}\)'s shadow cast onto \(\mathbf{b}\): $$\text{comp}_{\mathbf{b}} \mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}$$

The vector projection is the vector parallel to \(\mathbf{b}\) with that scalar length: $$\text{proj}_{\mathbf{b}} \mathbf{a} = \left( \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|^2} \right) \mathbf{b}$$

The vector rejection — the component of \(\mathbf{a}\) perpendicular to \(\mathbf{b}\) — is \(\mathbf{a} - \text{proj}_{\mathbf{b}} \mathbf{a}\). This decomposition is used in the Gram-Schmidt process for building orthogonal bases, and in physics to split forces into parallel and perpendicular components on an inclined plane.

## The Cross Product (Vector Product): 3D Geometry & Area

The cross product of two 3D vectors \(\mathbf{a}\) and \(\mathbf{b}\) yields a new vector \(\mathbf{c} = \mathbf{a} \times \mathbf{b}\) that is perpendicular to both, computed via a determinant expansion: $$\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix} = (a_y b_z - a_z b_y)\mathbf{i} - (a_x b_z - a_z b_x)\mathbf{j} + (a_x b_y - a_y b_x)\mathbf{k}$$

Geometrically, the magnitude of the cross product equals the area of the parallelogram formed by \(\mathbf{a}\) and \(\mathbf{b}\): $$\|\mathbf{a} \times \mathbf{b}\| = \|\mathbf{a}\| \|\mathbf{b}\| \sin\theta$$

Its direction follows the right-hand rule: curl your right-hand fingers from \(\mathbf{a}\) to \(\mathbf{b}\), and your thumb points along \(\mathbf{a} \times \mathbf{b}\). The cross product is anti-commutative: \(\mathbf{b} \times \mathbf{a} = -(\mathbf{a} \times \mathbf{b})\). This calculator always evaluates the cross product using all three components — if you're in 2D mode, the z-components default to 0.

## Triple Products: Reference Material (Needs a Third Vector)

This calculator works with two vectors at a time, so triple products — which need a third vector \(\mathbf{c}\) — aren't computed directly, but you can combine two calculator runs to get there by hand.

The scalar triple product \(\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c})\) is a determinant whose absolute value equals the volume of the parallelepiped formed by the three vectors; if it equals zero, the vectors are coplanar. The vector triple product \(\mathbf{a} \times (\mathbf{b} \times \mathbf{c})\) is evaluated using the "BAC-CAB" identity: $$\mathbf{a} \times (\mathbf{b} \times \mathbf{c}) = \mathbf{b}(\mathbf{a} \cdot \mathbf{c}) - \mathbf{c}(\mathbf{a} \cdot \mathbf{b})$$

## How to Use This Calculator

Choose 2D or 3D mode and an operation (add, subtract, dot, or cross), then enter the components of Vector A and Vector B. The calculator shows the result, both vector magnitudes, and (for the dot product) the angle between the vectors.

## Worked Example: A = (3, 4), B = (1, 2)

Using the calculator's default 2D vectors:

$$\mathbf{A} + \mathbf{B} = (3+1,\; 4+2) = (4, 6)$$

$$\|\mathbf{A}\| = \sqrt{3^2+4^2} = 5, \qquad \|\mathbf{B}\| = \sqrt{1^2+2^2} \approx 2.236$$

$$\mathbf{A} \cdot \mathbf{B} = 3(1) + 4(2) = 11, \qquad \theta = \arccos\!\left(\frac{11}{5 \times 2.236}\right) \approx 10.3°$$

With \(z=0\) for both vectors, the cross product is \(\mathbf{A} \times \mathbf{B} = (0, 0, 2)\) — matching what the calculator returns for its default inputs.

## Related Calculators

For linear systems and determinants beyond two vectors, use the [matrix solver](/calculators/matrix-solver). To find angle coordinates on a unit circle rather than between two vectors, see the [unit circle calculator](/calculators/unit-circle-calculator).

## Physics Applications: Torque, Angular Momentum & the Lorentz Force

The cross product describes several rotational and electromagnetic quantities. Torque \(\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}\) is the rotational force created about a pivot by a force \(\mathbf{F}\) applied at position \(\mathbf{r}\). Angular momentum \(\mathbf{L} = \mathbf{r} \times \mathbf{p}\) describes a particle's rotational momentum. The Lorentz magnetic force \(\mathbf{F}_B = q(\mathbf{v} \times \mathbf{B})\) acts on a moving charge \(q\) inside a magnetic field \(\mathbf{B}\), always perpendicular to both velocity and field — this is why charged particles follow helical paths in magnetic fields.

You can use this calculator's cross-product mode to work any of these three formulas by hand, entering the two relevant vectors as A and B.

## Frequently asked questions

### What is the difference between a vector and a scalar?

A scalar has only magnitude (e.g., mass, temperature). A vector has both magnitude and direction (e.g., velocity, force).

### How do you calculate vector magnitude?

For a 3D vector (vx, vy, vz), magnitude is the 3D Pythagorean formula: sqrt(vx² + vy² + vz²).

### What is a unit vector?

A vector normalized to a magnitude of 1, indicating pure direction, found by dividing a vector by its own magnitude.

### What is the dot product of two vectors?

A scalar equal to ax·bx + ay·by + az·bz = |a||b|cos(θ), used to find enclosed angles and mechanical work.

### What does a dot product of zero mean?

If the dot product of two non-zero vectors is zero, the vectors are orthogonal (perpendicular, a 90° angle).

### What is the cross product of two vectors?

The cross product of two 3D vectors yields a new 3D vector perpendicular to both, with magnitude equal to |a||b|sin(θ).

### What is the right-hand rule in cross products?

Curl your right-hand fingers from the first vector toward the second; your extended thumb points in the direction of the cross product.

### Does this calculator compute vector projections or triple products?

No — it computes addition, subtraction, dot product (with angle), and cross product only, for two vectors at a time. Projection and triple-product formulas are provided above as reference material you can work by hand from the calculator's outputs.

### What is the scalar triple product?

a · (b × c), a value whose absolute magnitude equals the volume of the parallelepiped formed by three vectors. Not computed directly by this calculator.

### How is the cross product used in physics?

It calculates rotational quantities including torque (r × F), angular momentum (r × p), and the magnetic force on a moving charge (q(v × B)).

## Related concepts

- **Dot Product** — A scalar operation measuring vector alignment, enclosed angles, and mechanical work.
- **Cross Product** — A vector operation generating a 3D vector perpendicular to two input vectors, measuring area and torque.
- **Unit Vector** — A vector normalized to length 1 that specifies pure direction in spatial coordinate systems.

## Related guides

- [Scientific Notation Guide: Powers of Ten Made Practical](https://dothecalculation.com/blog/math/scientific-notation-basics) — Learn how to convert, compare, and calculate with powers of ten using worked examples and the live DTC scientific calculator.

## Related calculators

- [Set Theory & Venn Diagram Solver](https://dothecalculation.com/calculators/set-theory-calculator) — Perform set operations including union, intersection, difference, and symmetric difference with clear Venn diagram visuals.
- [Confidence Interval Calculator](https://dothecalculation.com/calculators/confidence-interval-calculator) — Calculate confidence intervals for population means and proportions, including margin of error, with this free statistics calculator.
- [Cross Multiplication Calculator](https://dothecalculation.com/calculators/cross-multiplication-calculator) — Use our free cross multiplication calculator to solve equations with fractions. Shows step-by-step work for proportions and fraction comparisons.
- [Fibonacci & Golden Ratio Calculator](https://dothecalculation.com/calculators/fibonacci-golden-ratio-calculator) — Generate Fibonacci numbers, check sequence membership, and solve Golden Ratio proportions instantly with this free math calculator.
- [Modular Arithmetic & Congruence Solver](https://dothecalculation.com/calculators/modular-arithmetic-calculator) — Perform modular addition, multiplication, and exponentiation, and solve linear modular congruence equations with clear steps.
- [Quadratic Equation & Parabola Solver](https://dothecalculation.com/calculators/quadratic-solver) — Solve quadratic equations (ax² + bx + c = 0) with step-by-step discriminant calculations, real or complex roots, and a parabola graph shown instantly.

---

_This mathematical calculator is designed for educational, scientific, and engineering calculations. Always verify real vs complex roots, vector coordinate systems, and precision limits when applying results to physics or engineering systems._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/vector-math-calculator). Quote freely with attribution and a link to this page._
