Ekuation

Math

Vector Calculator

A comprehensive vector calculator that supports nine operations across 2D and 3D spaces. Compute vector addition, subtraction, scalar multiplication, dot products, cross products, magnitudes, unit vectors, angles between vectors, and vector projections with step-by-step results.

Vector Calculator Tips

Click to show tips

Try an Example

Pick a scenario to see how the calculator works, then adjust the values

Basic 2D Addition

Add two 2D vectors: (3, 4) + (1, 2).

Key values: v1 = (3, 4) · v2 = (1, 2) · Result = (4, 6)

3D Cross Product

Compute the cross product of two unit axis vectors.

Key values: v1 = (1, 0, 0) · v2 = (0, 1, 0) · Result = (0, 0, 1)

Angle Between Vectors

Find the angle between two perpendicular 2D vectors.

Key values: v1 = (1, 0) · v2 = (0, 1) · Angle = 90 deg

Documentation

Quick Navigation

Jump to any section for specific information about vector operations and formulas.

Understanding Vectors

A vector is a mathematical object that has both magnitude (length) and direction. Vectors are fundamental in physics, engineering, computer graphics, and many areas of mathematics. This calculator supports nine common vector operations in both 2D and 3D spaces.

Vectors are typically written as ordered tuples of components. In 2D, a vector is (x, y); in 3D, it is (x, y, z). Each component represents the displacement along the corresponding axis.


How to Use the Vector Calculator

  1. Select dimension: Choose between 2D and 3D mode. In 2D mode, z-components are automatically set to zero.
  2. Choose an operation: Select one of the nine available operations from the dropdown.
  3. Enter vector components: Fill in the x, y (and z for 3D) components for vector A. For two-vector operations, also fill in vector B.
  4. View results: The calculator displays the result vector or scalar, along with magnitudes and a summary.

Supported Operations

OperationInputsOutput
AdditionTwo vectorsVector
SubtractionTwo vectorsVector
Scalar MultiplicationOne vector + scalarVector
Dot ProductTwo vectorsScalar
Cross ProductTwo vectorsVector (3D) / Scalar (2D)
MagnitudeOne vectorScalar
Unit VectorOne vectorVector
AngleTwo vectorsScalar (degrees)
ProjectionTwo vectorsVector + Scalar

Key Formulas

Vector Magnitude

v=x2+y2+z2|\vec{v}| = \sqrt{x^2 + y^2 + z^2}

Dot Product

ab=axbx+ayby+azbz\vec{a} \cdot \vec{b} = a_x b_x + a_y b_y + a_z b_z

Cross Product (3D)

a×b=(aybzazbyazbxaxbzaxbyaybx)\vec{a} \times \vec{b} = \begin{pmatrix} a_y b_z - a_z b_y \\ a_z b_x - a_x b_z \\ a_x b_y - a_y b_x \end{pmatrix}

Angle Between Vectors

θ=arccos(abab)\theta = \arccos\left(\frac{\vec{a} \cdot \vec{b}}{|\vec{a}| \cdot |\vec{b}|}\right)

Vector Projection

projba=abb2b\text{proj}_{\vec{b}}\vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|^2} \vec{b}

Calculation Examples

Addition: (3, 4) + (1, 2)

(3,4)+(1,2)=(4,6)(3, 4) + (1, 2) = (4, 6)

Dot Product: (3, 4) . (1, 2)

(3)(1)+(4)(2)=3+8=11(3)(1) + (4)(2) = 3 + 8 = 11

Magnitude of (3, 4)

(3,4)=9+16=25=5|(3, 4)| = \sqrt{9 + 16} = \sqrt{25} = 5

Frequently Asked Questions

What is the difference between the dot product and the cross product?

The dot product returns a scalar that measures how parallel two vectors are. The cross product returns a vector perpendicular to both input vectors (in 3D) or a scalar z-component (in 2D). The dot product is zero for perpendicular vectors; the cross product is zero for parallel vectors.

Why is the cross product only defined in 3D?

The cross product as a vector is only defined in 3D (and 7D). In 2D, the calculator returns the z-component of the cross product, which is the scalar value v1.x * v2.y - v1.y * v2.x. This scalar represents the signed area of the parallelogram formed by the two vectors.

What is a unit vector and when is it useful?

A unit vector has magnitude 1 and points in the same direction as the original vector. It is computed by dividing the vector by its magnitude. Unit vectors are useful for representing directions without magnitude, normalizing data, and constructing coordinate systems.

What does vector projection mean?

The projection of vector v1 onto vector v2 gives the component of v1 that lies along the direction of v2. The scalar projection is the signed length of this component, and the vector projection is the actual vector along v2.

Related Calculators

6 Calculators

More Math calculators

Calculator Search

Search and find calculators