Skip to content
Explainer · Vector Lab

Vectors Explained: Sum, Dot Product, Cross Product

Learn how vectors add tip to tail, how the dot product detects right angles, what the cross product points to, and how projection casts a shadow.

4 min readPublished

A vector is an arrow: it has a length and a direction. Physics uses them for forces and velocities, and graphics uses them for everything on screen. Four operations cover most of what you need: adding, the dot product, the cross product and projection. Each one answers a simple geometric question.

What is a vector?

A number like 5 says how much. A vector says how much and which way. In three dimensions we store it as three components, written (x, y, z), which tell you how far to move along each axis.

The vector (2, 1, 0) means: two units along x, one along y, none along z. It does not say where to start. Slide the arrow anywhere in space and, as long as its length and direction stay the same, it is the same vector.

Its length (or magnitude) comes from Pythagoras: |v| = √(x² + y² + z²). That formula is the foundation for the dot product later.

Adding vectors tip to tail

To add two vectors, place the start of the second at the tip of the first. The sum is the arrow from the very start to the very end. In components, you simply add matching parts:

a + b = (aₓ + bₓ, a_y + b_y, a_z + b_z)

Think of walking 3 blocks east and then 4 blocks north. Your total displacement is the straight arrow from where you began to where you finished, and it does not matter whether you walked east or north first. That is why vector addition is commutative.

This is how forces combine. If two ropes pull a crate in different directions, the crate responds to the resultant, the sum of the two pulls. Subtraction works the same way: subtracting b is adding the arrow that points the opposite way.

The dot product: how much do two arrows agree?

The dot product multiplies matching components and adds the results:

a · b = aₓbₓ + a_yb_y + a_zb_z

It also equals |a||b|cos θ, where θ is the angle between the arrows. That connects a pure calculation to geometry, and it gives the dot product its meaning:

  • Positive: the arrows point broadly the same way.
  • Zero: the arrows are perpendicular (orthogonal).
  • Negative: the arrows point broadly against each other.

The zero case is the useful trick. You can test for a right angle with arithmetic alone, with no protractor. For example, (1, 2, 0) · (2, −1, 5) is 2 − 2 + 0 = 0, so those two vectors meet at exactly 90°. One caveat: a zero vector has no direction, so it is not said to form an angle with anything.

The cross product: an arrow out of the plane

The dot product returns a single number. The cross product returns a new vector, and it only exists in three dimensions. The result a × b has three properties:

  • it is perpendicular to both a and b;
  • its length equals the area of the parallelogram the two vectors span;
  • its direction follows the right-hand rule: curl the fingers of your right hand from a towards b and your thumb points along the result.

Order matters here: b × a = −(a × b), so swapping the inputs flips the arrow. And if a and b are parallel, the parallelogram collapses to nothing and the cross product is the zero vector.

Engineers and physicists lean on it constantly: torque, angular momentum and the direction of the magnetic force on a moving charge all use cross products.

Projection: the shadow of an arrow

Shine a light straight down onto the line along vector b. The shadow that vector a casts on that line is the projection of a onto b:

proj_b(a) = ((a · b) / (b · b)) b

The dot product measures how much of a lies along b, dividing by b · b rescales it, and multiplying by b turns that amount back into an arrow along b. The segment joining the tip of a to its shadow is perpendicular to b, which is why projection and right angles are tied together.

If the dot product is negative, the shadow points against b. Projection is how you split a force into a part along a ramp and a part pushing into it, or find the closest point on a line to a given point.

Live lab Live vector lab. Drag the arrows and watch the sum, dot product and projection update. Open the full Vector Lab lab →

Common mistakes to avoid

  • Calling the dot product a vector. It is a single number. The cross product is the vector.
  • Assuming order never matters. It does not for sums and dot products, but it does for cross products.
  • Mixing up zero results. A zero dot product means perpendicular; a zero cross product means parallel.
  • Forgetting the vector has no fixed start. Only its length and direction define it.

How to explore this in the lab

The Vector Lab lets you drag arrows in 3D and read the components change live. The free first world follows this order:

  1. Build a resultant in Tip to tail.
  2. Find a right angle with arithmetic in A right angle without a protractor.
  3. Watch the parallelogram and the right-hand rule in An arrow out of a plane.
  4. Cast a shadow in The shadow of an arrow.

The lab is a simplified teaching model with clean numbers, so keep an eye on the signs: they carry as much meaning as the sizes.

Key takeaways
  • A vector has length and direction; add vectors by adding components or placing them tip to tail.
  • The dot product is zero exactly when two nonzero vectors are perpendicular.
  • The cross product is perpendicular to both inputs, and its length is the parallelogram area.
  • Projection is the shadow of one vector on another: ((a·b)/(b·b)) b.
Free lesson · Vector Lab

Tip to tail

About 8 minutes. Free, no account, runs in your browser.

Start the free lesson

Report a mistake

What is wrong?
0 / 2000 · at least 10 characters
Sent along with your report
  • Page
  • About Vectors Explained: Sum, Dot Product, Cross Product · vector-addition-dot-and-cross-product-explained
Plus your browser type. Reports go to our support system; see the privacy notice.

Simulations on Novareka are teaching models, simplified on purpose. They show how an idea behaves; they are not a substitute for professional, medical or engineering advice.