Vector Calculator: Magnitude, Angle, Add & Dot Product (2D and 3D)
AlgebraFreeNo sign-up
A vector calculator works component by component. To add vectors, add matching components: ⟨3, 4⟩ + ⟨1, −2⟩ = ⟨4, 2⟩. The magnitude of ⟨3, 4⟩ is √(3² + 4²) = 5, and the dot product ⟨3, 4⟩ · ⟨1, −2⟩ = 3 − 8 = −5, so the angle between the two vectors is about 116.57°. The tool below does this in 2D and 3D with exact square roots.
a + b = ⟨3, 4⟩ + ⟨1, −2⟩ = ⟨4, 2⟩, with length 2√5 (≈ 4.4721).
Green: a. Gold: b, moved so its tail sits on the tip of a (its original position is dashed). Black: the sum a + b.
Show steps
- Line up the components: a = ⟨3, 4⟩ and b = ⟨1, −2⟩.
- Add each pair of matching components: ⟨3 + 1, 4 + (−2)⟩ = ⟨4, 2⟩.
- Length of the result: |a + b| = √(4² + 2²) = √(20) = 2√5 ≈ 4.4721.
- Picture it: put the tail of b on the tip of a (tip-to-tail). The arrow from the start of a to the tip of b is a + b, the diagonal of the parallelogram built on a and b.
Everything about a and b
| a | ⟨3, 4⟩ |
| b | ⟨1, −2⟩ |
| |a| | 5 |
| |b| | √5 ≈ 2.2361 |
| a + b | ⟨4, 2⟩ |
| a − b | ⟨2, 6⟩ |
| a · b | −5 |
| Angle θ | ≈ 116.5651° (≈ 2.0344 rad) |
| proj of a onto b | ⟨−1, 2⟩ |
| a × b (z = 0) | ⟨0, 0, −10⟩ |
How to use the vector calculator
- Choose 2D or 3D, and how you want to enter each vector: as components, as a start and end point, or (in 2D) as a magnitude and direction angle.
- Pick the operation: add, subtract, scalar multiple, magnitude and unit vector, dot product and angle, cross product, projection or triple products.
- Type the components. Whole numbers, decimals, fractions such as 1/3 and roots such as 2√3 or sqrt(2) all work.
- Read the answer at the top, in exact form (for example 2√5) with a decimal beside it, and look at the arrow diagram.
- Open Show steps for the working, and Everything about a and b for every result at once.
Vector formulas
For a = ⟨a₁, a₂, a₃⟩ and b = ⟨b₁, b₂, b₃⟩ (in 2D, leave out the third component):
| Operation | Formula | Result |
|---|---|---|
| Addition | a + b = ⟨a₁ + b₁, a₂ + b₂, a₃ + b₃⟩ | vector |
| Subtraction | a − b = ⟨a₁ − b₁, a₂ − b₂, a₃ − b₃⟩ | vector |
| Scalar multiple | k a = ⟨k a₁, k a₂, k a₃⟩ | vector |
| Magnitude | |a| = √(a₁² + a₂² + a₃²) | number |
| Unit vector | â = a / |a| | vector of length 1 |
| Dot product | a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ | number |
| Angle between | θ = arccos(a · b / (|a||b|)) | 0° to 180° |
| Cross product | a × b = ⟨a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁⟩ | vector (3D) |
| Projection of a onto b | projb a = (a · b / |b|²) b | vector |
| Scalar triple product | a · (b × c) | number (signed volume) |
The direction angle of a 2D vector ⟨x, y⟩ is the angle θ measured counterclockwise from the positive x-axis, with cos θ = x / |v| and sin θ = y / |v|. Always check the quadrant: tan θ = y / x alone cannot tell ⟨1, 1⟩ from ⟨−1, −1⟩.
Vector examples
Magnitude and direction of ⟨−5, 12⟩
The magnitude is √((−5)² + 12²) = √169 = 13. The vector points up and to the left (quadrant II), so θ = 180° − arctan(12/5) ≈ 180° − 67.38° = 112.62°. The unit vector is ⟨−5/13, 12/13⟩.
Angle between ⟨1, 2, 3⟩ and ⟨4, 5, 6⟩
The dot product is 1·4 + 2·5 + 3·6 = 32. The magnitudes are √14 and √77, so cos θ = 32 / √1078 = 32 / (7√22) ≈ 0.9746 and θ ≈ 12.93°. A positive dot product always means an acute angle; a dot product of 0 means the vectors are perpendicular.
Cross product of ⟨3, 4, 2⟩ and ⟨1, −2, 5⟩
x: 4·5 − 2·(−2) = 24. y: 2·1 − 3·5 = −13. z: 3·(−2) − 4·1 = −10. So a × b = ⟨24, −13, −10⟩. Its length is √(576 + 169 + 100) = √845 = 13√5 ≈ 29.07, the area of the parallelogram spanned by a and b. Check: ⟨24, −13, −10⟩ · ⟨3, 4, 2⟩ = 72 − 52 − 20 = 0.
Resultant of two forces
A force of 5 N at 30° and a force of 4 N at 135° act on the same point. In components they are ⟨5 cos 30°, 5 sin 30°⟩ ≈ ⟨4.330, 2.5⟩ and ⟨4 cos 135°, 4 sin 135°⟩ ≈ ⟨−2.828, 2.828⟩. The resultant is their sum, about ⟨1.502, 5.328⟩, with magnitude ≈ 5.536 N at a direction of ≈ 74.26°. Choose “magnitude + angle” in the tool to enter forces this way.
Projection of ⟨3, 4⟩ onto ⟨1, −2⟩
a · b = −5 and |b|² = 5, so projb a = (−5/5)⟨1, −2⟩ = ⟨−1, 2⟩. The negative factor means the shadow of a points against b, which matches the obtuse angle of about 116.57°.
Dot product vs cross product
The dot product gives a number that measures how much two vectors point the same way; it is largest when they are parallel and 0 when they are perpendicular. The cross product works in 3D and gives a new vector perpendicular to both, whose length |a||b| sin θ is the parallelogram area. Order matters for the cross product (b × a = −(a × b)) but not for the dot product. The scalar triple product a · (b × c) combines both: its absolute value is the volume of the box built on three vectors, and it is 0 exactly when the vectors lie in one plane. For ⟨1, 0, 0⟩, ⟨0, 1, 0⟩ and ⟨0, 0, 1⟩ it equals 1, the volume of a unit cube.
Common vector mistakes
- Typing the wrong sign. A vector pointing left or down has a negative component; ⟨−5, 12⟩ and ⟨5, 12⟩ point in different directions.
- Subtracting in the wrong order. a − b and b − a are opposite vectors. The vector from point P to point Q is Q − P.
- Using arctan without the quadrant. arctan(12/−5) gives −67.38°, but ⟨−5, 12⟩ points at 112.62°.
- Rounding too early. Keep √5 exact until the end; rounding |b| to 2.24 before dividing changes the angle.
- Forgetting the middle sign in the cross product. The y-component is a₃b₁ − a₁b₃, not a₁b₃ − a₃b₁.
- Treating the dot product as a vector. a · b is a single number.
When to work by hand
On tests you usually need to show the component work, so practice small problems by hand: write both vectors in component form, apply the formula, then estimate. A sum should look like the diagonal of the parallelogram; a unit vector should have length 1. Use the calculator to check your answer, to handle roots and fractions, and to see the arrow diagram when a sign looks wrong.
Vectors practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Add matching components: 2 + (−5) = −3 and −3 + 7 = 4. Subtracting gives ⟨7, −10⟩, and multiplying the components gives ⟨−10, −21⟩.
|v| = √(6² + 8²) = √(36 + 64) = √100 = 10. Adding the components (14) or forgetting the square root (100) are common slips.
Multiply matching components and add: 2 × 3 + 5 × (−1) = 6 − 5 = 1. The dot product is a number, not the vector ⟨6, −5⟩.
4 × 3 + (−6) × 2 = 12 − 12 = 0. Two nonzero vectors are perpendicular exactly when their dot product is 0; their lengths do not matter.
The magnitude is 4, so divide each component by 4: ⟨0, −4⟩ / 4 = ⟨0, −1⟩. It keeps the direction (straight down) and has length 1.
Using a × b = ⟨a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁⟩ gives ⟨0 − 0, 0 − 0, 1 − 0⟩ = ⟨0, 0, 1⟩, so i × j = k. Reversing the order would give ⟨0, 0, −1⟩.
A scalar multiple multiplies every component: ⟨3 × 2, 3 × (−1), 3 × 4⟩ = ⟨6, −3, 12⟩. Adding 3 to each component or multiplying only the first one are mistakes.
arctan(−1/−1) = arctan(1) = 45°, but the vector points into quadrant III, so the angle is 180° + 45° = 225°.
The dot product is 1, and the magnitudes are 1 and √2, so cos θ = 1/√2 and θ = 45°.
The vector from P to Q is Q − P = ⟨4 − 1, 6 − 2⟩ = ⟨3, 4⟩, and its length is √(3² + 4²) = 5. P − Q points the other way, and adding the points is not a displacement.
Quiz complete
Frequently asked questions
How do you add vectors?
Add the matching components: ⟨a₁, a₂⟩ + ⟨b₁, b₂⟩ = ⟨a₁ + b₁, a₂ + b₂⟩. On a diagram, place the tail of the second vector at the tip of the first; the sum runs from the start of the first to the tip of the second.
How do you find the resultant vector?
Write every vector in components (for a magnitude r at angle θ, use ⟨r cos θ, r sin θ⟩), add all the x-components and all the y-components, then find the magnitude and direction of the sum. The sum is the resultant.
How do you find a unit vector?
Divide the vector by its magnitude. For ⟨1, 2, 2⟩ the magnitude is √9 = 3, so the unit vector is ⟨1/3, 2/3, 2/3⟩. The zero vector has no unit vector because it has no direction.
How do you multiply vectors?
There are three kinds of multiplication: a scalar multiple k a multiplies each component by k; the dot product a · b gives a number; and the cross product a × b (3D) gives a vector perpendicular to both.
How do you find the magnitude and direction of a vector?
The magnitude of ⟨x, y⟩ is √(x² + y²). The direction is the angle θ from the positive x-axis with cos θ = x / |v| and sin θ = y / |v|, adjusted to the correct quadrant. For ⟨3, 4⟩ that is a magnitude of 5 at about 53.13°.
Related calculators
- Matrix calculator
- Polar and rectangular coordinates converter
- Distance and midpoint calculator
- Pythagorean theorem calculator
- Unit circle calculator
- Radical simplifier
More algebra calculators
Related to This Article
More math articles
- Free Grade 5 English Worksheets for Arkansas Students
- How to Be A Great SAT/ACT Math Tutor?
- Free Grade 6 English Worksheets for Alabama Students
- CLEP vs. DSST vs. AP: Which Credit-by-Exam Path Saves the Most in 2027?
- The Most Effective Methods for Learning Math Facts and Improving Number Sense
- How to Evaluate Credit Reports: Personal Financial Literacy
- Work, Pay, and Occupational Segregation
- Free Grade 4 Math Worksheets: 43 Printable PDFs with Answers
- The Best Grade 7 ELA Practice Tests for South Dakota Students
- How is the CHSPE Test Scored?












What people say about "Vector Calculator: Magnitude, Angle, Dot & Cross Product"?
No one replied yet.