Vector Calculator (Dot / Cross / Add-Sub / Angle / Projection)
Enter 2D/3D vectors A, B to compute addition, subtraction, dot product, cross product, magnitudes, angle and projection.
Input Data
Results
At a glance:Dot product A·B = aₓbₓ + aᵧbᵧ + a_z b_z = |A||B|cosθ, a scalar; it is 0 when perpendicular. Cross product A×B is defined only in 3D and gives a vector perpendicular to both with magnitude |A||B|sinθ (parallelogram area). Projection proj_B A = (A·B/|B|²)B.
Formula
Add: A ± B = (aₓ±bₓ, aᵧ±bᵧ, a_z±b_z).
Dot: A·B = aₓbₓ + aᵧbᵧ + a_z b_z.
Cross: A×B = (aᵧb_z−a_z bᵧ, a_z bₓ−aₓb_z, aₓbᵧ−aᵧbₓ).
Angle: cosθ = (A·B)/(|A||B|).
Projection: proj_B A = (A·B/|B|²)·B.
$$\mathbf{A}\cdot\mathbf{B} = |\mathbf{A}||\mathbf{B}|\cos\theta$$$$\mathbf{A}\times\mathbf{B} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix}$$How to Use
- Enter A, B components x, y (and z; 0 for 2D).
- The tool gives magnitudes, dot, cross, angle and projection.
- Pick 'Operation (detail)' to see add/sub/projection vector result.
- Compare with the case studies for hand-working.
Vector operations
| Op | Result | Meaning |
|---|---|---|
| A + B | vector | parallelogram rule |
| A·B | scalar | |A||B|cosθ; 0 if perpendicular |
| A×B | vector (3D) | perpendicular; area=|A×B| |
| angle θ | angle | cosθ=(A·B)/(|A||B|) |
| proj_B A | vector | A's component along B |
Cross is only meaningful in 3D; 2D gives just the z component (scalar).
Case Studies
A=(3,2,0), B=(1,4,0)
|A|=√13≈3.6056, |B|=√17≈4.1231.
A·B = 3·1+2·4 = 11.
A×B = (0,0,10); cosθ=11/(√13√17)≈0.7401 → θ≈42.2737°.
Orthogonal A=(1,0), B=(0,1)
A·B = 0 → perpendicular (θ=90°).
2D cross (z) = 1·1−0·0 = 1.
Parallel A=(2,4), B=(1,2)
A = 2B, parallel.
A×B = 0 (zero vector), angle 0°.
Projection proj_B A
A=(3,2), B=(1,4): A·B=11, |B|²=17.
proj = (11/17)(1,4) = (0.6471, 2.5882).
3D cross A=(1,0,0), B=(0,1,0)
A×B = (0,0,1) (along z, right-hand rule).
|A×B|=1 = |A||B|sin90° (unit square area).
Physics: work W = F·d
Dot of force F and displacement d is work.
e.g. F=(3,2), d=(1,4) → W=11 (same as the dot above).
FAQ
Dot vs cross product?
The dot A·B is a scalar measuring 'alignment' (0 if perpendicular); the cross A×B is a vector perpendicular to A, B whose magnitude equals the parallelogram area they span.
Is cross only 3D?
Strictly, cross product is defined in 3D (yielding a vector). In 2D with z=0 it reduces to the z component (scalar, the signed area).
How to find the angle?
cosθ = (A·B)/(|A||B|), then arccos. If A·B=0 the vectors are perpendicular (θ=90°).
What is the projection vector?
proj_B A = (A·B/|B|²)·B is A's component along B; its length is the scalar projection of A onto B.
Must I fill z for 2D?
No, leave z=0; the cross gives the z component and dot/angle are unaffected.
Negative dot product?
A·B<0 means the angle is obtuse (θ>90°), i.e. the vectors point more opposite.
Relation to physics?
Work W=F·d (dot), torque τ=r×F (cross), magnetic flux etc. all use vector operations.
Which way does cross point?
Right-hand rule: curl fingers A→B, thumb points along A×B. Note A×B = −(B×A).
Related Tools
References
Content review: Calculatorism Science Team. Dot, cross, angle and projection logic verified. Results are for reference only.