Result
Enter vectors and click Calculate
Supports 13 vector operations including dot product, cross product, projection, and more.
Interactive Graph
Calculate vectors to see the graph.
No recently used tools
Loading categories...
Free online vector calculator with step-by-step solutions. Compute dot product, cross product, magnitude, projection, angle, and more for 2D and 3D vectors. Includes interactive graph, LaTeX export, and Python NumPy code.
Supports 13 vector operations including dot product, cross product, projection, and more.
Calculate vectors to see the graph.
A vector is a mathematical object with both magnitude (length) and direction. Unlike scalars (plain numbers), vectors encode directional information. In component form, a vector in 2D is written as v = (x, y) and in 3D as v = (x, y, z).
Geometrically, a vector is represented as an arrow from the origin to a point. The magnitude is the arrow's length: |v| = √(x² + y²) in 2D or |v| = √(x² + y² + z²) in 3D. A unit vector has magnitude 1 and indicates pure direction.
Points from the origin to a point P. If P = (3, 4), the position vector is <3, 4> with magnitude 5.
In 3D: î = (1,0,0), ĵ = (0,1,0), k̂ = (0,0,1). Any vector = xî + yĵ + zk̂.
The vector 0 = (0, 0, 0) has no direction and zero magnitude. It is the additive identity.
Vectors are added and subtracted component-wise. Geometrically, addition follows the parallelogram rule or tip-to-tail method.
Scalar multiplication scales each component: k·v = (kvx, kvy, kvz). If k > 0 the direction is preserved; if k < 0 the direction is reversed.
The dot product of two vectors produces a scalar. It has two equivalent definitions:
Key properties:
The cross product of two 3D vectors produces a new vector perpendicular to both inputs. It is computed using the determinant of a 3×3 matrix:
Key facts: |a × b| = |a||b|sinθ = area of the parallelogram. The direction follows the right-hand rule. The cross product is anti-commutative: a × b = −(b × a). It is only defined in 3D.
The projection of b onto a gives the component of b in the direction of a. The rejection is the perpendicular remainder.
The projection and rejection are always orthogonal: proj · rej = 0. Together they decompose b into parallel and perpendicular components relative to a. This decomposition is fundamental in physics (work = F · d), computer graphics (lighting), and signal processing.
Force, velocity, acceleration, momentum, electric/magnetic fields are all vectors. Work = F · d (dot product). Torque = r × F (cross product).
Surface normals (cross product), lighting calculations (dot product), camera direction, ray tracing, and 3D transformations.
Structural analysis, fluid dynamics, navigation (GPS vectors), robotics (joint angles), and electromagnetic field analysis.
Feature vectors, cosine similarity (dot product), gradient descent, word embeddings, and high-dimensional data representation.
| Operation | Formula | Returns | Dim |
|---|---|---|---|
| Addition | a + b = (ai+bi) | Vector | 2D/3D |
| Subtraction | a − b = (ai−bi) | Vector | 2D/3D |
| Scalar Multiply | k·a = (k·ai) | Vector | 2D/3D |
| Dot Product | ∑ aibi | Scalar | 2D/3D |
| Cross Product | det[î ĵ k̂; a; b] | Vector | 3D only |
| Magnitude | √(∑ ai²) | Scalar | 2D/3D |
| Unit Vector | a / |a| | Vector | 2D/3D |
| Angle | arccos(a·b / |a||b|) | Angle | 2D/3D |
| Projection | (a·b/a·a)·a | Vector | 2D/3D |
| Rejection | b − proja(b) | Vector | 2D/3D |
| Area | |a × b| or |axby−aybx| | Scalar | 2D/3D |
| Triple Scalar | a · (b × c) | Scalar | 3D only |
| Linear Indep. | a × b ≠ 0 (3D) or det ≠ 0 (2D) | Boolean | 2D/3D |