Vector Addition and Length

A vector has direction and size. Add vectors component by component.

a + b = (a₁ + b₁, a₂ + b₂)  |a| = √(a₁² + a₂²)

In the picture, a + b is the arrow from the start of a to the tip of b placed after it (the diagonal of a parallelogram).

The length comes from the Pythagorean theorem.

Calculator

Change a value and the result and picture update instantly.

Result

Sum: x4
Sum: y4
Length of sum5.65685

Animated picture

The picture follows your values. Some points and shapes can be dragged.

Use in game development

Adding velocity to position, acceleration to velocity, or combining wind forces — the basis of all movement.

Code example (JavaScript)

pos.x += vel.x * dt; pos.y += vel.y * dt; // add velocity to position

What the symbols mean

SymbolMeaning
axa: x
aya: y
bxb: x
byb: y
sxSum: x
sySum: y
lenLength of sum

More formulas in this category

Frequently asked questions

What is the formula for Vector Addition and Length?
The formula for Vector Addition and Length is a + b = (a₁ + b₁, a₂ + b₂)  |a| = √(a₁² + a₂²). A vector has direction and size. Add vectors component by component.

Math Formula Quiz Vectors & Matrices

Sources

Checked: 2026-11-29