Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Vector Calculator

Vectors in 2D, 3D or n dimensions — exact roots and angles, every step and a diagram.

Math No upload Works offline Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 for 30 days

Try before you buy.

  • Free preview: your vectors and a watermarked diagram at preview size, with the result you asked for, the working and every other quantity hidden.
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Components separated by commas or spaces — 3, −1, 2 or (3 −1 2) — in 2D, 3D or up to 10 dimensions. Fractions, √ (sqrt) and π work: 1/2, sqrt(3). You can also write 3i − j + 2k.

Try:

Result

Result

Next steps

About the Vector Calculator

Type vectors as components — 3, −1, 2 or (3 −1 2) or 3i − j + 2k — in 2D, 3D or up to 10 dimensions, pick an operation and get the answer with every step: sum and difference, scalar multiples and combinations, magnitude, unit vector, dot product, cross product, the angle between two vectors, the vector and scalar projection, the part orthogonal to another vector, the scalar triple product, direction cosines, the distance between two points, and the areas and volumes that vectors span. A diagram draws the vectors in 2D or in a 3D view.

Answers stay exact where they can: magnitudes as square roots (√14), unit vectors as (√2/2, √2/2), and angles as standard values (45° = π/4, 120° = 2π/3) when the cosine is one of them, with decimals beside them. A second mode converts points between Cartesian, polar, cylindrical and spherical coordinates, in degrees or radians, in the physics or the maths convention.

How to use it

  1. Choose the operation, then type vector a (and b, and c for the triple product or a volume). Fractions, square roots and π work: 1/2, sqrt(3).
  2. Read the result at the top and the steps below it — each formula is written out with your numbers substituted.
  3. Look at the diagram: a and b from the origin, the result in another colour, and for a sum the parallelogram; in 3D each tip is dropped to the xy-plane so you can read its position.
  4. For a point, switch to Convert coordinates, choose the system you have and type its coordinates; the page gives the same point in the other systems with the formulas used.
  5. Copy the result, or download the diagram as a picture or the working as text — with a Pro pass or after unlocking this result; without one you see the free preview.

Examples

Cross product
Input
a = (3, −1, 2), b = (1, 4, 0)
Result
a × b = (−8, 2, 13)

(a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁) = (−1·0 − 2·4, 2·1 − 3·0, 3·4 − (−1)·1). It is perpendicular to both: (−8, 2, 13) · (3, −1, 2) = 0.

Angle between vectors
Input
a = (1, 0), b = (1, 1)
Result
θ = 45° = π/4

cos θ = (a · b)/(|a||b|) = 1/(1 · √2) = √2/2.

Projection
Input
a = (3, −1, 2) onto b = (1, 4, 0)
Result
proj_b a = (−1/17, −4/17, 0)

a · b = −1 and b · b = 17, so the projection is (−1/17)·b; it points opposite to b because the angle is obtuse.

Unit vector
Input
a = (1, 2, 2)
Result
â = (1/3, 2/3, 2/3)

|a| = √(1 + 4 + 4) = 3.

Cartesian to spherical
Input
(1, 1, √2)
Result
r = 2, θ = 45°, φ = 45° (physics convention)

r = √(1 + 1 + 2) = 2; θ = arccos(√2/2) from the +z axis; φ = atan2(1, 1) around it.

Common uses

  • Checking physics and engineering homework: forces, work (a dot product), torque and angular momentum (cross products).
  • Finding the angle between two directions or testing whether two vectors are perpendicular or parallel.
  • Computing areas of triangles and volumes of parallelepipeds and tetrahedra from their edge vectors.
  • Converting points between Cartesian, polar, cylindrical and spherical coordinates for calculus or graphics work.

The formulas

  • Magnitude: |a| = √(a₁² + a₂² + … + aₙ²); the unit vector is â = a/|a|.
  • Dot product: a · b = a₁b₁ + a₂b₂ + … + aₙbₙ = |a||b| cos θ, so cos θ = (a · b)/(|a||b|). It is 0 exactly when the vectors are orthogonal.
  • Cross product (3D): a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁), perpendicular to a and b, with length |a||b| sin θ — the area of the parallelogram they span. In 2D only its z-component a₁b₂ − a₂b₁ is non-zero.
  • Projection of a onto b: proj_b a = ((a · b)/(b · b)) b; the scalar projection is (a · b)/|b|, and a − proj_b a is perpendicular to b.
  • Scalar triple product: a · (b × c), the determinant of the matrix with rows a, b, c. Its absolute value is the volume of the parallelepiped; it is 0 when the three vectors lie in one plane.
  • Direction cosines: cos α = a₁/|a|, cos β = a₂/|a|, cos γ = a₃/|a|, and cos²α + cos²β + cos²γ = 1.

Coordinate systems

  • Polar: x = r cos θ, y = r sin θ; r = √(x² + y²), θ = atan2(y, x) — the two-argument arctangent, which picks the right quadrant (atan(y/x) alone cannot tell (1, 1) from (−1, −1)).
  • Cylindrical: x = ρ cos φ, y = ρ sin φ, z = z.
  • Spherical (physics, ISO 80000-2): x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ, where θ is measured from the +z axis (0° to 180°) and φ around it from the +x axis. Many calculus books swap the names, using θ for the angle around and φ from the +z axis — choose Maths to use that convention.

Limitations

  • Vectors have up to 10 components. Diagrams are drawn for 2D and 3D vectors only.
  • The cross product, triple product and volume need 3D vectors (the cross product also accepts 2D vectors and gives its z-component).
  • Exact answers are kept for rational numbers, square roots and multiples of π; anything else is shown as a decimal. Angles are exact only when their cosine is a standard value (such as 1/2 or √2/2).
  • Components are separated by commas or spaces, so write numbers without thousands separators (1000, not 1,000).

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

What do I get without a pass?

Without a pass, Vector Calculator shows your vectors and a watermarked diagram at preview size, with the result you asked for, the working and every other quantity hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

How do I find the angle between two vectors?

Use cos θ = (a · b)/(|a||b|) and take the arccosine. For a = (1, 0) and b = (1, 1): a · b = 1, |a| = 1 and |b| = √2, so cos θ = √2/2 and θ = 45°.

What is the difference between the dot product and the cross product?

The dot product gives a number, |a||b| cos θ, which measures how much two vectors point the same way (0 when perpendicular). The cross product, defined in 3D, gives a vector perpendicular to both, of length |a||b| sin θ (0 when parallel).

How do I know if two vectors are orthogonal or parallel?

They are orthogonal when their dot product is 0, and parallel when one is a multiple of the other (in 3D, when their cross product is the zero vector). Choose “Parallel or orthogonal?” to test both at once.

What is the projection of one vector onto another?

The vector proj_b a = ((a · b)/(b · b)) b is the shadow of a on the line of b. Its signed length (a · b)/|b| is the scalar projection, and what is left, a − proj_b a, is perpendicular to b.

Which spherical coordinate convention should I use?

Physics and engineering texts (and ISO 80000-2) write (r, θ, φ) with θ measured from the +z axis and φ around it. Many maths and calculus books use φ from the +z axis and θ around. Both describe the same point; pick the one your course uses.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.