Vector Calculator

Vector Calculator

Growing AI Skill PRO

Enter Calculation

Formula

A→·B→=AxBx+AyBy+AzBz\vec{A}\cdot\vec{B} = {{\text{A}_x}}\,{{\text{B}_x}} + {{\text{A}_y}}\,{{\text{B}_y}} + {{\text{A}_z}}\,{{\text{B}_z}}

Example

A→·B→=1·4+2·5+3·6=32\vec{A}\cdot\vec{B} = 1 \cdot 4 + 2 \cdot 5 + 3 \cdot 6 = 32
Show calculation steps (4)
  1. Magnitude of A

    ‖A→‖=Ax2+Ay2+Az2\lVert\vec{A}\rVert = \sqrt{{{\text{A}_x}}^{2} + {{\text{A}_y}}^{2} + {{\text{A}_z}}^{2}}

    Length of vector A

  2. Magnitude of B

    ‖B→‖=Bx2+By2+Bz2\lVert\vec{B}\rVert = \sqrt{{{\text{B}_x}}^{2} + {{\text{B}_y}}^{2} + {{\text{B}_z}}^{2}}

    Length of vector B

  3. Cross Product

    A→×B→=(AyBz−AzByAzBx−AxBzAxBy−AyBx)\vec{A}\times\vec{B} = \begin{pmatrix} {{\text{A}_y}}\,{{\text{B}_z}} - {{\text{A}_z}}\,{{\text{B}_y}} \\ {{\text{A}_z}}\,{{\text{B}_x}} - {{\text{A}_x}}\,{{\text{B}_z}} \\ {{\text{A}_x}}\,{{\text{B}_y}} - {{\text{A}_y}}\,{{\text{B}_x}} \end{pmatrix}

    Vector cross product A x B with components Cx, Cy, Cz

  4. Angle Between Vectors

    θ=arccos⁡(A→·B→‖A→‖‖B→‖)×180π\theta = \arccos\!\left( \dfrac{\vec{A}\cdot\vec{B}}{\lVert\vec{A}\rVert\,\lVert\vec{B}\rVert} \right) \times \dfrac{180}{\pi}

    Angle in degrees between A and B from the dot product

Usage stats

Advertisement

Results

Dot Product (A · B)
32
scalar
Magnitude of A 3.7417
Magnitude of B 8.775
Cross Product A × B (-3, 6, -3)
Magnitude of A × B 7.3485
Angle between A and B 12.93°

Report an error on this page

What is the Vector Calculator?

This Vector Calculator works with two three-dimensional vectors, A and B, each defined by its X, Y, and Z components. From those six numbers it computes the most common vector quantities used in mathematics, physics, and engineering: the magnitude (length) of each vector, the dot product, the cross product, and the angle between the two vectors. It is a universal mathematical tool — no jurisdiction or unit system is assumed.

How to use it

Enter the X, Y, and Z components for Vector A and Vector B. Use 0 for any component you don't need (for a 2D vector, set Z to 0). Press calculate and you'll see the dot product highlighted, plus a breakdown of magnitudes, the cross product vector, its magnitude, and the angle between A and B in degrees.

Cross product of two vectors showing the perpendicular result vector and right-hand rule
The cross product A×B yields a vector perpendicular to both, following the right-hand rule.

The formulas explained

The magnitude of a vector is the square root of the sum of its squared components: \(\lVert\vec{v}\rVert = \sqrt{x^{2} + y^{2} + z^{2}}\). The dot product multiplies matching components and adds them:

$$\vec{A}\cdot\vec{B} = \text{A}_x\,\text{B}_x + \text{A}_y\,\text{B}_y + \text{A}_z\,\text{B}_z$$

and it relates to the angle \(\theta\) via \(\vec{A}\cdot\vec{B} = \lVert\vec{A}\rVert\,\lVert\vec{B}\rVert\cos\theta\). The cross product produces a new vector perpendicular to both inputs, with components

$$\vec{A}\times\vec{B} = \begin{pmatrix} \text{A}_y\,\text{B}_z - \text{A}_z\,\text{B}_y \\ \text{A}_z\,\text{B}_x - \text{A}_x\,\text{B}_z \\ \text{A}_x\,\text{B}_y - \text{A}_y\,\text{B}_x \end{pmatrix}$$
Advertisement

Worked example

Let A = (1, 2, 3) and B = (4, 5, 6). Dot product = \(1\cdot4 + 2\cdot5 + 3\cdot6 = 4 + 10 + 18 = 32\). \(\lVert\vec{A}\rVert = \sqrt{1+4+9} = \sqrt{14} \approx 3.7417\), \(\lVert\vec{B}\rVert = \sqrt{16+25+36} = \sqrt{77} \approx 8.7750\). Cross product = \((2\cdot6 - 3\cdot5,\ 3\cdot4 - 1\cdot6,\ 1\cdot5 - 2\cdot4) = (-3, 6, -3)\), with magnitude \(\sqrt{9+36+9} = \sqrt{54} \approx 7.3485\). The angle = \(\arccos\!\left( \dfrac{32}{3.7417\cdot8.7750} \right) \approx 12.93^\circ\).

Two 3D vectors from a common origin showing the angle between them on coordinate axes
Two vectors A and B sharing an origin, with the angle θ between them on the x, y, z axes.

FAQ

Can I use 2D vectors? Yes — set the Z component to 0 for both vectors and the formulas still work correctly.

What does the cross product tell me? It gives a vector perpendicular to both inputs; its magnitude equals the area of the parallelogram they span.

What if a vector is zero? The magnitude will be 0 and the angle is undefined, so this tool reports the angle as 0 in that case.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators