0

Vector Calculator

Compute the dot product, cross product, magnitude, unit vector and angle between two 2D or 3D vectors — with the term-by-term dot product expansion, the i/j/k determinant mnemonic, and exact simplified radicals like 5√2 shown at every step.

Vector a

Vector b

Buy Me a Coffee at ko-fi.com
Processing... 0%
Reading vector components
Computing operations
Done

Result

A vector calculator answers the handful of questions that come up whenever two vectors interact: how much they point in the same direction (the dot product), what vector is perpendicular to both of them (the cross product, in three dimensions), how long each one is (the magnitude), what a vector of length one in the same direction looks like (the unit vector), and how many degrees separate them (the angle between them). This tool computes all five in a single run, for either 2D vectors (x, y) or 3D vectors (x, y, z), and shows the arithmetic behind every one of them rather than just the final numbers.

The dot product is expanded term by term exactly the way it would be written by hand: a·b = (2)(-1) + (-1)(4) + (5)(0) = -2 - 4 + 0 = -6, with each product and each signed term visible before the sum. The cross product, defined only for three dimensions, is built from the classic i/j/k determinant mnemonic — the unit vectors on top, vector a in the middle row and vector b on the bottom row — expanded into i(a2b3 - a3b2) - j(a1b3 - a3b1) + k(a1b2 - a2b1) with your numbers substituted in, so (1, 0, 0) × (0, 1, 0) visibly resolves to (0, 0, 1) rather than appearing from nowhere.

Magnitudes are where exactness matters most: a vector of (5, 5) has length √50, and instead of stopping at the decimal ≈ 7.0711 the calculator factorizes 50 into 2 × 5² and reports the exact simplified radical 5√2 next to the decimal. The same simplified radical is reused to express each unit vector component as an exact fraction over the magnitude before its decimal is shown, and the angle between the two vectors is computed from θ = arccos((a·b) / (|a||b|)) with the substituted numbers on display, reported in both degrees and radians.

Vectors like these show up anywhere direction and magnitude matter together: physics forces and velocities, 3D graphics normals and lighting, robotics headings, or a plain 2D displacement between two points. Everything runs locally in your browser — nothing is uploaded, there is no registration, and you can check as many vector pairs as you like on desktop or mobile.