2D Vector Calculator
Calculate 2D vector magnitudes, dot product, signed determinant, angle, areas, unit vectors, and projections.
A 2D vector is an ordered pair of components that represents magnitude and direction. Enter two vectors to calculate their lengths, products, angle, areas, and projections.
- Magnitude and unit vectors
- Dot product and angle
- Signed determinant and area
- Scalar and vector projection
Calculations run in this page; values are not saved in the URL.
Results
- Magnitude |A|
- 5.0000
- Magnitude |B|
- 2.2361
- Dot product A · B
- 11.0000
- Signed determinant (2D z-component)
- 2.0000
- Parallelogram area |det(A, B)|
- 2.0000
- Triangle area
- 1.0000
- Angle between A and B
- 10.3048°
- Unit vector of A
- (0.6000, 0.8000)
- Unit vector of B
- (0.4472, 0.8944)
- A + B
- (4.0000, 6.0000)
- A − B
- (2.0000, 2.0000)
- Scalar projection of A onto B
- 4.9193
- Vector projection of A onto B
- (2.2000, 4.4000)
Updated results: magnitude A 5.0000, magnitude B 2.2361, dot product 11.0000, angle 10.3048 degrees.
The 2D determinant is a signed scalar: it is the z-component of A × B when both vectors are embedded in 3D with z = 0. Its absolute value is the parallelogram area.
How to use the 2D vector calculator
- Enter the x and y components of vectors A and B.
- Read each result with its formula and sign convention; use a copy button to copy one value.
- Reset the example to restore A = (3, 4) and B = (1, 2).
Formulas and example
For A = (aₓ, aᵧ) and B = (bₓ, bᵧ): |A| = √(aₓ² + aᵧ²), unit(A) = A / |A|, A + B = (aₓ + bₓ, aᵧ + bᵧ), A − B = (aₓ − bₓ, aᵧ − bᵧ), A · B = aₓbₓ + aᵧbᵧ, and det(A, B) = aₓbᵧ − aᵧbₓ.
The angle in degrees is θ = atan2(|det(A, B)|, A · B) × 180/π. The parallelogram area is |det(A, B)| and the triangle area is |det(A, B)| / 2. The scalar projection of A onto B is (A · B) / |B|; the vector projection is ((A · B) / |B|²)B. For A=(3,4), B=(1,2), the dot product is 11 and the vector projection is (2.2, 4.4).
Unit vectors, the angle, and projection onto B are undefined when their required vector is zero. This calculator uses decimal floating-point arithmetic and displays four decimal places.
Frequently asked questions
What does the dot product tell me?
The dot product is a scalar. For nonzero vectors, its sign indicates whether they point generally together or apart; a zero dot product means they are perpendicular.
Is the 2D determinant the same as a vector cross product?
In 2D, the determinant is a signed scalar. It equals the z-component of the 3D cross product after setting both z components to zero. Its absolute value gives the parallelogram area.
Why is an angle or unit vector undefined for a zero vector?
A zero vector has no direction, so it cannot be normalized and has no defined angle with another vector.
What is the difference between scalar and vector projection?
The scalar projection is the signed length of A along B. The vector projection is the vector in B’s direction with that signed length.