Vector Calculator

Add vectors, find magnitude and direction, and compute dot, cross, and unit vectors step by step
Resultant of (3, -4) and (-1, 7)
Components of a vector with magnitude 20 at 35 degrees
Cross product of (1, 2, 3) and (4, 5, 6)
Unit vector in the direction of (6, -8)

Vector Basics: Components, Magnitude, Direction

A vector carries both magnitude and direction. In component form vโƒ—=(v1,v2)\vec{v} = (v_1, v_2) or (v1,v2,v3)(v_1, v_2, v_3).

Magnitude (length) is the distance formula applied to the components:

โˆฅvโƒ—โˆฅ=v12+v22โˆฅvโƒ—โˆฅ=v12+v22+v32\|\vec{v}\| = \sqrt{v_1^2 + v_2^2} \qquad \|\vec{v}\| = \sqrt{v_1^2 + v_2^2 + v_3^2}

Direction angle in 2D, measured counter-clockwise from the positive xx-axis:

ฮธ=arctanโกโ€‰โฃ(v2v1),ย thenย addย 180โˆ˜ย ifย v1<0\theta = \arctan\!\left(\frac{v_2}{v_1}\right), \text{ then add } 180^\circ \text{ if } v_1 < 0

Back to components from magnitude rr and direction ฮธ\theta:

v1=rcosโกฮธ,v2=rsinโกฮธv_1 = r\cos\theta, \qquad v_2 = r\sin\theta

Unit vector โ€” same direction, length 1:

v^=vโƒ—โˆฅvโƒ—โˆฅ\hat{v} = \frac{\vec{v}}{\|\vec{v}\|}

This is defined only for vโƒ—โ‰ 0โƒ—\vec{v} \ne \vec{0}. Two vectors are equal when their components match; position on the page is irrelevant.

Adding Vectors and the Two Products

Addition and the resultant

Add component by component:

uโƒ—+vโƒ—=(u1+v1,โ€…โ€Šu2+v2)\vec{u} + \vec{v} = (u_1 + v_1,\; u_2 + v_2)

The sum is the resultant โ€” the single vector with the same effect as applying both. Scalar multiplication kvโƒ—=(kv1,kv2)k\vec{v} = (kv_1, kv_2) scales the length by โˆฃkโˆฃ|k| and reverses direction when k<0k < 0. Subtraction is uโƒ—โˆ’vโƒ—=uโƒ—+(โˆ’vโƒ—)\vec{u} - \vec{v} = \vec{u} + (-\vec{v}).

A warning that costs marks: โˆฅuโƒ—+vโƒ—โˆฅโ‰ โˆฅuโƒ—โˆฅ+โˆฅvโƒ—โˆฅ\|\vec{u} + \vec{v}\| \ne \|\vec{u}\| + \|\vec{v}\| unless the vectors point the same way. Always add components first, then take the magnitude.

Dot product โ€” output is a scalar

uโƒ—โ‹…vโƒ—=u1v1+u2v2+u3v3=โˆฅuโƒ—โˆฅโˆฅvโƒ—โˆฅcosโกฮธ\vec{u}\cdot\vec{v} = u_1v_1 + u_2v_2 + u_3v_3 = \|\vec{u}\|\|\vec{v}\|\cos\theta

Zero means perpendicular. Used for angles, projections, and work.

Cross product โ€” output is a vector, 3D only

uโƒ—ร—vโƒ—=(u2v3โˆ’u3v2,โ€…โ€Šu3v1โˆ’u1v3,โ€…โ€Šu1v2โˆ’u2v1)\vec{u}\times\vec{v} = (u_2v_3 - u_3v_2,\; u_3v_1 - u_1v_3,\; u_1v_2 - u_2v_1)

The result is perpendicular to both inputs, which is how you get a normal vector to a plane. Its length โˆฅuโƒ—โˆฅโˆฅvโƒ—โˆฅsinโกฮธ\|\vec{u}\|\|\vec{v}\|\sin\theta equals the area of the parallelogram they span, and order matters: vโƒ—ร—uโƒ—=โˆ’(uโƒ—ร—vโƒ—)\vec{v}\times\vec{u} = -(\vec{u}\times\vec{v}).

Common Mistakes to Avoid

  • Adding magnitudes instead of components. Two forces of 5 at right angles give a resultant of 50โ‰ˆ7.07\sqrt{50} \approx 7.07, not 10.
  • Ignoring the quadrant in arctanโก\arctan. A calculator returns (โˆ’90โˆ˜,90โˆ˜)(-90^\circ, 90^\circ) only, so (โˆ’3,โˆ’4)(-3, -4) and (3,4)(3, 4) produce the same raw output. Check the signs of the components and add 180โˆ˜180^\circ when v1<0v_1 < 0.
  • Confusing the two products. The dot product returns a number; the cross product returns a vector and exists only in 3D.
  • Reversing the cross product. Each component uses the other two indices in cyclic order, and the middle term u3v1โˆ’u1v3u_3v_1 - u_1v_3 is the one most often written backwards.
  • Forgetting to normalise. A "unit normal" must be divided by its own magnitude โ€” a raw cross product is rarely of length 1.
  • Mixing 2D and 3D. The cross product is undefined for two 2D vectors; embed them as (u1,u2,0)(u_1, u_2, 0) first if you need it.

Examples

Step 1: Add components: uโƒ—+vโƒ—=(3+(โˆ’1),โ€…โ€Šโˆ’4+7)=(2,3)\vec{u} + \vec{v} = (3 + (-1),\; -4 + 7) = (2, 3)
Step 2: Magnitude: 22+32=4+9=13โ‰ˆ3.606\sqrt{2^2 + 3^2} = \sqrt{4 + 9} = \sqrt{13} \approx 3.606
Step 3: Direction: ฮธ=arctanโก(3/2)=arctanโก(1.5)โ‰ˆ56.31โˆ˜\theta = \arctan(3/2) = \arctan(1.5) \approx 56.31^\circ
Step 4: Both components are positive, so the resultant lies in quadrant I โ€” no adjustment needed
Answer: uโƒ—+vโƒ—=(2,3)\vec{u}+\vec{v} = (2,3), โˆฅuโƒ—+vโƒ—โˆฅ=13โ‰ˆ3.61\|\vec{u}+\vec{v}\| = \sqrt{13} \approx 3.61 at 56.31โˆ˜56.31^\circ

Step 1: v1=rcosโกฮธ=20cosโก35โˆ˜v_1 = r\cos\theta = 20\cos 35^\circ
Step 2: cosโก35โˆ˜โ‰ˆ0.81915\cos 35^\circ \approx 0.81915, so v1=20ร—0.81915=16.383v_1 = 20 \times 0.81915 = 16.383
Step 3: v2=rsinโกฮธ=20sinโก35โˆ˜v_2 = r\sin\theta = 20\sin 35^\circ, and sinโก35โˆ˜โ‰ˆ0.57358\sin 35^\circ \approx 0.57358
Step 4: v2=20ร—0.57358=11.472v_2 = 20 \times 0.57358 = 11.472
Step 5: Check: 16.3832+11.4722=268.4+131.6=400=20\sqrt{16.383^2 + 11.472^2} = \sqrt{268.4 + 131.6} = \sqrt{400} = 20 โœ“
Answer: vโƒ—โ‰ˆ(16.38,โ€…โ€Š11.47)\vec{v} \approx (16.38,\; 11.47)

Step 1: First component: u2v3โˆ’u3v2=2(6)โˆ’3(5)=12โˆ’15=โˆ’3u_2v_3 - u_3v_2 = 2(6) - 3(5) = 12 - 15 = -3
Step 2: Second component: u3v1โˆ’u1v3=3(4)โˆ’1(6)=12โˆ’6=6u_3v_1 - u_1v_3 = 3(4) - 1(6) = 12 - 6 = 6
Step 3: Third component: u1v2โˆ’u2v1=1(5)โˆ’2(4)=5โˆ’8=โˆ’3u_1v_2 - u_2v_1 = 1(5) - 2(4) = 5 - 8 = -3
Step 4: So uโƒ—ร—vโƒ—=(โˆ’3,6,โˆ’3)\vec{u}\times\vec{v} = (-3, 6, -3)
Step 5: Magnitude: 9+36+9=54=36โ‰ˆ7.348\sqrt{9 + 36 + 9} = \sqrt{54} = 3\sqrt{6} \approx 7.348
Step 6: Unit normal: (โˆ’3,6,โˆ’3)36=(โˆ’1,2,โˆ’1)6โ‰ˆ(โˆ’0.408,โ€‰0.816,โ€‰โˆ’0.408)\dfrac{(-3,6,-3)}{3\sqrt{6}} = \dfrac{(-1,2,-1)}{\sqrt{6}} \approx (-0.408,\, 0.816,\, -0.408)
Answer: uโƒ—ร—vโƒ—=(โˆ’3,6,โˆ’3)\vec{u}\times\vec{v} = (-3,6,-3), unit normal โ‰ˆ(โˆ’0.408,โ€‰0.816,โ€‰โˆ’0.408)\approx (-0.408,\, 0.816,\, -0.408)

Frequently Asked Questions

Square every component, add the squares, and take the square root: โ€–vโ€– = โˆš(vโ‚ยฒ + vโ‚‚ยฒ + vโ‚ƒยฒ). It is the distance formula applied to the components, so the magnitude is always non-negative and equals zero only for the zero vector.

The resultant is the sum of two or more vectors โ€” the single vector that has the same combined effect. Add corresponding components to find it, then take the magnitude of that sum if you need its size. Adding the individual magnitudes instead gives the wrong answer whenever the vectors point in different directions.

The dot product multiplies matching components and returns a single number, measuring how much two vectors point the same way; it is zero for perpendicular vectors. The cross product returns a vector perpendicular to both inputs, exists only in 3D, and its length equals the area of the parallelogram the two vectors span.

Take two non-parallel vectors lying in the plane โ€” often built by subtracting three known points โ€” and compute their cross product. The result is perpendicular to both, hence normal to the plane. Divide by its magnitude if you need a unit normal.

Related Solvers

Related Guides

Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving