Vector Calculator Add • Dot Product • Cross Product • Magnitude • Angle • Projection
The only free vector calculator that computes all operations simultaneously from one panel — no switching between separate tools. Enter vectors A and B once, instantly get: addition, subtraction, dot product (scalar product), cross product (vector product), magnitudes, unit vectors, angle between vectors (degrees and radians), scalar and vector projection of A onto B and B onto A, area of the parallelogram and triangle formed by the vectors, and direction cosines. A live SVG arrow diagram updates in real-time as you type — no button press. Switch between 2D and 3D instantly. Enter a third vector C for the scalar triple product and parallelepiped volume. Step-by-step working shown for every operation. Physics applications: torque (cross product), work done (dot product).
All Vector Operations — One Panel, Instant Results
Enter vectors A and B. All results update live as you type.
Vector quick reference
Rate this tool
Vectors, Scalars, and Vector Operations — The Complete Guide
A vector is a mathematical object defined by both magnitude (length) and direction. In contrast, a scalar is defined only by magnitude (a single number). Vectors are typically written as bold letters (a, b) or with an arrow (a⃗), and expressed as ordered tuples of components: a = (a₁, a₂, a₃) in 3D Cartesian coordinates.
Vectors arise naturally in physics (displacement, velocity, acceleration, force, electric field, magnetic field), computer graphics (surface normals, camera directions, lighting), machine learning (feature vectors, gradients), and engineering (stress, moment, flux). The four fundamental vector operations — addition, dot product, cross product, and magnitude — are the foundation of all of these applications.
| Operation | Formula | Result type | Key property |
|---|---|---|---|
| Addition a+b | (a₁+b₁, a₂+b₂, a₃+b₃) | Vector | Tip-to-tail / parallelogram rule |
| Subtraction a−b | (a₁−b₁, a₂−b₂, a₃−b₃) | Vector | Equivalent to a + (−b) |
| Dot product a⋅b | a₁b₁ + a₂b₂ + a₃b₃ | Scalar | Commutative; zero if perpendicular |
| Cross product a×b | (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁) | Vector | Anti-commutative; zero if parallel |
| Magnitude |a| | √(a₁²+a₂²+a₃²) | Scalar (≥0) | Zero only for zero vector |
| Unit vector â | a / |a| | Vector, |â|=1 | Pure direction, no magnitude |
| Angle θ | arccos(a⋅b / (|a||b|)) | Scalar [0, π] | Uses dot product formula |
| Scalar projection | a⋅b / |b| | Scalar (signed) | Negative if angle > 90° |
| Vector projection | (a⋅b / b⋅b) × b | Vector along b | Component of a in direction of b |
| Scalar triple product | a⋅(b×c) | Scalar (signed) | Volume of parallelepiped |
Dot Product Calculator — Formula, Geometric Meaning & Applications
The dot product formula
Geometric form: a ⋅ b = |a| |b| cosθ
From these: cosθ = (a ⋅ b) / (|a| |b|)
Therefore: θ = arccos(a ⋅ b / (|a| |b|))
What does the dot product tell you?
The dot product measures directional alignment between two vectors. If a⋅b > 0, the vectors point in a similar direction (acute angle). If a⋅b = 0, they are perpendicular. If a⋅b < 0, they point in opposite directions (obtuse angle). The magnitude equals |a||b| times the cosine of the angle between them.
Dot product worked example
Step 1: a ⋅ b = (3)(2) + (1)(4) + (0)(0) = 6 + 4 + 0 = 10
Step 2: |a| = √(9+1+0) = √10 ≈ 3.162
Step 3: |b| = √(4+16+0) = √20 ≈ 4.472
Step 4: cosθ = 10 / (√10 × √20) = 10 / √200 ≈ 0.7071
Step 5: θ = arccos(0.7071) = 45°
Real-world dot product applications
| Application | Formula | Physical meaning |
|---|---|---|
| Work done by force F over displacement d | W = F ⋅ d (joules) | Only the component of force along displacement does work |
| Power P = F ⋅ v | P = F ⋅ v (watts) | Rate of doing work; only parallel components contribute |
| Angle between vectors | θ = arccos(a⋅b / |a||b|) | Standard method; works in 2D and 3D |
| Projection (shadow of a onto b) | compᵇa = a⋅b̂ | How much of vector a goes along vector b |
| Orthogonality check | If a⋅b = 0, perpendicular | Used in linear algebra and geometry |
| Lighting (computer graphics) | I = L ⋅ N (Lambertian shading) | Angle between light direction and surface normal |
Cross Product Calculator — Formula, Right-Hand Rule & Applications
The cross product formula
Expanded from the 3×3 determinant:
| i j k |
| a₁ a₂ a₃ |
| b₁ b₂ b₃ |
Magnitude: |a × b| = |a| |b| sinθ
Direction: right-hand rule (curl fingers from a toward b; thumb = direction)
Cross product worked example
i component: (1)(0) − (0)(4) = 0
j component: −[(3)(0) − (0)(2)] = 0
k component: (3)(4) − (1)(2) = 12 − 2 = 10
a × b = (0, 0, 10)
|a × b| = 10 (Area of parallelogram = 10)
Area of triangle = 5
Right-hand rule explained
To find the direction of a×b: point the fingers of your right hand in the direction of a, then curl them toward b (through the smaller angle). Your thumb points in the direction of a×b. This means: if a points along +x and b points along +y, then a×b points along +z. Reversing the order: b×a = −(a×b) (the direction flips).
Cross product key properties
| Property | Formula |
|---|---|
| Anti-commutative | a × b = −(b × a) |
| Anti-parallel / parallel vectors | a × b = 0 (zero vector) |
| Self cross product | a × a = 0 |
| Distributive over addition | a × (b+c) = a×b + a×c |
| Scalar association | k(a × b) = (ka) × b = a × (kb) |
| Standard basis | i×j=k, j×k=i, k×i=j |
Cross product physics applications
| Application | Formula | Meaning |
|---|---|---|
| Torque | τ = r × F | Rotational force; perpendicular to both r and F |
| Magnetic force (Lorentz) | F = q(v × B) | Force on charge q moving at velocity v in field B |
| Angular momentum | L = r × p | Rotational equivalent of linear momentum |
| Surface normal | n̂ = (a × b) / |a × b| | Unit vector perpendicular to the plane |
| Area of parallelogram | Area = |a × b| | Geometric area spanned by two edge vectors |
| Area of triangle | Area = |a × b| / 2 | Half the parallelogram area |
Vector Addition, Magnitude, Unit Vector & Projection
How to add two vectors
Example: (3,1,2) + (1,4,-1) = (4,5,1)
Geometric interpretation:
Tip-to-tail: place tail of b at tip of a; sum = tail of a to tip of b
Parallelogram: diagonal of the parallelogram formed by a and b
How to find the magnitude of a vector
3D: |v| = √(x² + y² + z²)
nD: |v| = √(v₁² + v₂² + ... + vₙ²)
Example: v = (3, 4, 0): |v| = √(9+16+0) = √25 = 5
Key property: |v|² = v ⋅ v (the dot product of a vector with itself)
How to find the unit vector
Example: v = (3, 4, 0), |v| = 5
v̂ = (3/5, 4/5, 0/5) = (0.6, 0.8, 0)
Verify: |v̂| = √(0.36+0.64+0) = √1 = 1 ✓
Vector projection formulas
compᵇa = (a ⋅ b) / |b|
Vector projection of a onto b (vector along b):
projᵇa = [(a ⋅ b) / (b ⋅ b)] × b
Orthogonal component (perpendicular to b):
perp = a − projᵇa
Example: a=(3,1,0), b=(1,0,0)
compᵇa = 3×1+1×0+0×0 = 3 (scalar)
projᵇa = 3 × (1,0,0) = (3,0,0) (vector along x-axis)
Direction cosines
Identity: cos²α + cos²β + cos²γ = 1
The direction cosines are the components of the unit vector.
Example: v=(3,4,0), |v|=5
cosα=0.6 → α=53.13°, cosβ=0.8 → β=36.87°, cosγ=0 → γ=90°
Scalar triple product and parallelepiped volume
Volume of parallelepiped = |a ⋅ (b × c)|
If [a, b, c] = 0, the three vectors are coplanar.
Cyclic property: a⋅(b×c) = b⋅(c×a) = c⋅(a×b)
LazyTools Vector Calculator vs Competitors
| Feature | LazyTools | Omni Calculator | MathPortal | eMathHelp |
|---|---|---|---|---|
| All operations from one panel | ✅ All simultaneous | ❌ 4+ separate tools | ⚠ One op at a time | ⚠ Sequential |
| Live SVG vector diagram | ✅ Real-time as you type | ❌ No diagram | ❌ No diagram | ❌ No diagram |
| Scalar triple product | ✅ Built-in with C input | ❌ Separate tool | ❌ No | ✅ Yes |
| Direction cosines | ✅ Auto-shown | ❌ No | ❌ No | ⚠ Separate |
| Parallel / orthogonal detection | ✅ Auto property flags | ❌ No | ❌ No | ⚠ Separate |
| Area parallelogram + triangle | ✅ Auto-computed | ⚠ Partial | ❌ No | ⚠ Separate |
| Step-by-step all operations | ✅ 6 tabbed panels | ❌ No | ✅ Yes | ✅ Yes |
| No account required | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Vector Calculator FAQ
a⋅b = a₁b₁ + a₂b₂ + a₃b₃. Example: (3,1,0)⋅(2,4,0) = 6+4+0 = 10. Also equals |a||b|cosθ. Zero means perpendicular vectors. Enter your vectors above for instant result and steps.
a×b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). Result is a vector perpendicular to both. |a×b| = |a||b|sinθ = area of parallelogram. Zero means parallel vectors. Direction: right-hand rule.
|v| = √(x²+y²+z²). Example: (3,4,0): |v| = √(9+16) = 5. Shortcut: |v|² = v⋅v. Always non-negative. Zero only for the zero vector.
v̂ = v/|v|. Divide each component by the magnitude. Example: (3,4,0), |v|=5. Unit vector = (0.6, 0.8, 0). Verify: √(0.36+0.64) = 1 ✓.
θ = arccos(a⋅b / (|a||b|)). Example: a=(3,1,0), b=(2,4,0). a⋅b=10, |a|=√10, |b|=√20. cosθ=10/√200≈0.707. θ=45°.
Dot product: scalar result, measures directional alignment, commutative (a⋅b=b⋅a), zero means perpendicular. Cross product: vector result perpendicular to both inputs, anti-commutative (a×b=−b×a), zero means parallel, 3D only.
a×b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). From the 3×3 determinant with rows i,j,k / a / b. Direction follows right-hand rule.
Add component-wise: (a₁+b₁, a₂+b₂, a₃+b₃). Example: (3,1,2)+(1,4,-1)=(4,5,1). Geometrically: tip-to-tail rule or diagonal of parallelogram.
Scalar projection of a onto b: (a⋅b)/|b|. Vector projection: [(a⋅b)/(b⋅b)]×b. Negative scalar projection means angle > 90°. Used for work, force components, and decomposition.
a⋅(b×c). Scalar result equal to the determinant of the 3×3 matrix [a,b,c]. |a⋅(b×c)| = volume of parallelepiped. If zero, the three vectors are coplanar.
Cosines of angles with each coordinate axis: cosα=x/|v|, cosβ=y/|v|, cosγ=z/|v|. Identity: cos²α+cos²β+cos²γ=1. They equal the components of the unit vector.
Area = |a×b| = |a||b|sinθ. Example: (3,1,0)×(2,4,0)=(0,0,10), area=10. Triangle area = |a×b|/2 = 5.
Enter vectors A and B above — all 12 results compute instantly: addition, subtraction, dot product, cross product, magnitudes, unit vectors, angle, projection, areas, direction cosines, triple product. Live diagram updates as you type. Free, no account.
Point right-hand fingers along a, curl toward b. Thumb points in direction of a×b. Reversing order flips direction: b×a = −(a×b). Standard basis: i×j=k, j×k=i, k×i=j.
Torque: τ=r×F. Magnetic force: F=q(v×B). Angular momentum: L=r×p. Surface normal: n̂=(a×b)/|a×b|. Area: |a×b|=parallelogram area.
When vectors are parallel or anti-parallel (sin0°=sin180°=0), when one vector is zero, or when vectors are scalar multiples of each other. The tool above shows a ‘Parallel’ flag automatically when a×b≈0.
a⋅b = |a||b|cosθ. Positive: similar direction (θ<90°). Zero: perpendicular (θ=90°). Negative: opposite direction (θ>90°). Also: work done W=F⋅d; lighting I=L⋅N.