Free · 2D & 3D

Vector Calculator

Add, subtract, scale, find magnitude, dot product, cross product, angle between, and unit vector — with live formula working and a 2D diagram.

Vector a

2D Vector Diagram

xya
a

|a|

5
∣a∣=32+42=5|\mathbf{a}| = \sqrt{3^2 + 4^2} = 5

Step-by-step working

1

Formula

∣a∣=x2+y2|\mathbf{a}| = \sqrt{x^2 + y^2}
2

Substitute

=(3)2+(4)2= \sqrt{(3)^2 + (4)^2}
3

Result

=5= 5

Vector Identities & Key Facts

Magnitude

∣a∣=ax2+ay2+az2|\mathbf{a}| = \sqrt{a_x^2+a_y^2+a_z^2}

Unit vector

a^=a∣a∣\hat{\mathbf{a}} = \dfrac{\mathbf{a}}{|\mathbf{a}|}

Dot product

a⋅b=∣a∣∣b∣cos⁡θ\mathbf{a}\cdot\mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta

Cross product magnitude

∣a×b∣=∣a∣∣b∣sin⁡θ|\mathbf{a}\times\mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta

Perpendicular iff

a⋅b=0\mathbf{a}\cdot\mathbf{b} = 0

Parallel iff

a×b=0\mathbf{a}\times\mathbf{b} = \mathbf{0}

Scalar triple product

a⋅(b×c)\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})

Cauchy–Schwarz

∣a⋅b∣≤∣a∣ ∣b∣|\mathbf{a}\cdot\mathbf{b}| \leq |\mathbf{a}|\,|\mathbf{b}|