Skip to content
RK Calculator
Menu

Vector Calculator

Add, subtract, and find the dot product, cross product, angle, projection, magnitude, unit vector and norms of 2-D or 3-D vectors.

Change the values and press Calculate to work out your own figures.

Vector addition

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
a + b
(4, 6)

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

Show the working
  1. Add the components

Vector subtraction

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
a − b
(2, 2)

(3, 4) − (1, 2) = (2, 2).

Show the working
  1. Subtract the components

Dot product

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
Dot product a · b
11
Perpendicular?
no

a · b = 11.

Show the working
  1. a · b = 3 × 1 + 4 × 2 = 11

Cross product

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
Cross product a × b
(0, 0, 2)
Magnitude
2

a × b = (0, 0, 2).

Show the working
  1. a × b = (a_y b_z − a_z b_y, a_z b_x − a_x b_z, a_x b_y − a_y b_x)

Angle between two vectors

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
Angle between a and b
10.30484647°
In radians
0.1798534998
cos θ
0.9838699101

The angle between the vectors is 10.30484647°.

Show the working
  1. cos θ = (a · b) ÷ (|a| |b|)

Projection of a onto b

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About b xx-component of vector b.
About b yy-component of vector b.
About a zz-component of vector a.
About b zz-component of vector b.
Result
Projection of a onto b
(11/5, 22/5)
Scalar projection
4.91934955

proj_b a = (11/5, 22/5).

Show the working
  1. proj_b a = ((a · b) ÷ |b|²) b = 11/5 b

Magnitude

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About a zz-component of vector a.
Result
Magnitude |a|
5
Decimal
5

|(3, 4)| = 5.

Show the working
  1. |a| = √(3² + 4²) = √25

Unit vector

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About a zz-component of vector a.
Result
Unit vector â
(0.6, 0.8)
Magnitude of a
5

The unit vector in the direction of (3, 4) is (0.6, 0.8).

Show the working
  1. â = a ÷ |a|

Vector norms

Enter the vector components (leave z blank for 2-D).

About a xx-component of vector a.
About a yy-component of vector a.
About a zz-component of vector a.
Result
Euclidean norm ‖a‖₂
5
L1 norm ‖a‖₁
7
L∞ norm ‖a‖∞
4
‖a‖₂ as a decimal
5

‖(3, 4)‖₂ = 5.

Show the working
  1. ‖a‖₁ = Σ|aᵢ|; ‖a‖₂ = √Σaᵢ²; ‖a‖∞ = max|aᵢ|

How to use it

Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D). Enter the vector components (leave z blank for 2-D).

Enter coordinates as whole numbers, decimals or fractions (3/4). Show the working gives the formula with your numbers.

Key facts

a · b = Σ aᵢbᵢ; |a| = √(a · a)

2-D and 3-D

Leave the z-components blank for plane vectors; the cross product treats them as lying in the plane z = 0.

Questions

What is (3, 4) · (1, 2)?

11.

What is |(3, 4)|?

5.

Formulas

a · b = Σ aᵢbᵢ; |a| = √(a · a)

Sources

Limitations

  • Vectors have two or three components (leave z blank for 2-D).
  • Earth distances assume the WGS 84 ellipsoid (sea level).

Formula version 0.1.0Reviewed