Vector Calculator

Analyze any 2D or 3D vector: magnitude, direction angles, and unit vector with step-by-step solutions.

Enter Vector Components

Result

Magnitude |v|
--
units
Vector--
Magnitude--
Unit Vector--
Direction Angle--
Component Form--

Step-by-Step Solution

|v| = sqrt(x^2 + y^2)

What is a Vector?

A vector is a mathematical object that has both magnitude (length) and direction. Vectors are represented by arrows or by their components in a coordinate system. In 2D, a vector has two components (x, y), and in 3D it has three components (x, y, z). Vectors are fundamental in physics, engineering, computer graphics, and many areas of mathematics.

Vector Properties

Magnitude

The length or size of a vector, computed using the Pythagorean theorem.

|v| = sqrt(x^2 + y^2 + z^2)

Direction Angle (2D)

The angle the vector makes with the positive x-axis.

theta = atan2(y, x)

Direction Cosines (3D)

The cosines of the angles between the vector and each coordinate axis.

cos(alpha)=x/|v|, cos(beta)=y/|v|

Unit Vector

A vector with magnitude 1 pointing in the same direction.

u = v / |v|

Standard Basis

i = (1,0,0), j = (0,1,0), k = (0,0,1). Every vector can be written as a combination of these.

v = xi + yj + zk

Zero Vector

A vector with all components zero. It has zero magnitude and no defined direction.

0 = (0, 0, 0)

Applications of Vectors

  • Physics: Forces, velocity, acceleration, electric and magnetic fields.
  • Engineering: Structural analysis, fluid dynamics, control systems.
  • Computer Graphics: 3D rendering, lighting, camera positioning, animations.
  • Navigation: GPS systems, flight paths, maritime routing.
  • Machine Learning: Feature vectors, word embeddings, gradient descent.

Vector Notation

Vectors can be written in several forms: component form (3, 4), unit vector form (3i + 4j), or column vector form. The magnitude is denoted |v| or ||v||. A unit vector is often written with a hat: v-hat.