Math
Mathematics · Built to be Seen, Not Just Read

The Language of Arrows

A vector is just an arrow: a size and a direction. That one picture explains how to add journeys, split forces, measure angles, and find areas, without memorising anything. Everything below is draggable. And every "small" question you were afraid to ask in class? We answer it here.

start from zero
vector a
vector b
result
unit vector / special
angle
scaling / area

Keep this color code in mind, it's used everywhere below.

Step 1 · The idea

Some quantities need a direction

Say your friend calls from Kathmandu: "I walked 5 km today." You know how much she walked, but you have no idea where she ended up. Toward Bhaktapur? Toward Kirtipur? Round and round Tundikhel? The number 5 alone is not the full story.

Now compare: "I walked 5 km toward Bhaktapur." That's complete. Size and direction. Quantities like this, where direction is part of the information, are called vectors. Quantities that are just a size are called scalars.

Scalars, size only

  • temperature, 25 °C
  • mass, 60 kg
  • time, 45 minutes
  • distance, 5 km
  • speed, 40 km/h

Vectors, size and direction

  • displacement, 5 km toward Bhaktapur
  • velocity, 40 km/h heading north
  • force, a 20 N push to the right
  • weight, pull of gravity straight down
  • wind, 30 km/h from the mountains
Vector & scalar

A vector is a quantity with both a magnitude (size) and a direction. A scalar is a quantity with magnitude only. We draw a vector as an arrow: its length shows the magnitude, and the way it points shows the direction.

Notation you'll meet

In books, vectors are written in bold (a) or with a small arrow on top (a). An arrow from point A to point B is written AB, A is the tail (start), B is the head or tip (the pointed end). The magnitude of a is written |a| or just a (plain, not bold).

Drag the arrow's tip below and get a feel for the two ingredients, length and direction:

magnitude |a| = 3.6
direction = 34° from east, anticlockwise

↑ Drag the coral tip. Longer arrow = bigger magnitude. Turning it changes only the direction.

"Temperature can be −5. Negative! Doesn't that make it a vector?"

Lovely question, and no. The minus sign in −5 °C means "below zero," a position on a scale. It is not a direction in space. You can't point your finger along "−5 degrees." A vector's direction is a real spatial direction, north, up, toward the door. Sign ≠ direction. Temperature stays a scalar.

"Distance and displacement, aren't they the same thing?"

Walk all the way around Rani Pokhari and stop where you started. Your distance (path length, a scalar) might be 1 km. Your displacement (start-to-end arrow, a vector) is zero, you got nowhere! Distance cares about the journey; displacement only cares about start and finish, and which way.

"Speed vs velocity, same confusion?"

Same pattern exactly. Speed (scalar) is the number on the speedometer: 40 km/h. Velocity (vector) is 40 km/h heading north. A bus going around a roundabout at a steady 40 km/h has constant speed but constantly changing velocity, because its direction keeps changing.

Vector = magnitude + direction, drawn as an arrow. Scalar = just a number with a unit.

Step 2 · Meet the family

When are two arrows "the same vector"?

Here is the single most important, and most surprising, rule about vectors, and it's the one students silently get wrong for months: a vector does not have a location. Only its length and its direction matter. Where you happen to draw it is not part of the vector.

Equal vectors

Two vectors are equal if they have the same magnitude and the same direction, full stop. They may be drawn in different corners of the page; they are still the same vector. Think of "3 steps east": whether you take those steps in Pokhara or in Kathmandu, the instruction is identical.

Try it with your hands. Below, the teal arrow is fixed. Drag the coral arrow's tip until the two are equal, same length, same direction, even though they live in different places:

target: 2.0 east, 1.5 north
yours:
not equal yet, keep adjusting…

↑ When they match, press "move my arrow", notice the vector doesn't change at all when its home changes. That's the whole lesson.

"If I move an arrow somewhere else, isn't it a different arrow now?"

It's a different drawing, but the same vector, the way "3 steps east" written on two different pages is still the same instruction. A vector is the instruction, not the ink. (Mathematicians say vectors are "free", free to slide anywhere, as long as you don't stretch or turn them.)

Now the rest of the family, small definitions you'll use constantly:

Zero vector 0

The vector with magnitude 0, the "instruction" to not move at all. It's the only vector with no direction (an arrow of zero length points nowhere). It plays the same role as the number 0: a + 0 = a.

"A vector with no direction? Isn't that against the definition? Why do we even need it?"

Same reason we need the number 0. What is 5 − 5? What is your displacement after walking around Rani Pokhari? The answers need a name. Without a zero vector, subtraction breaks. It's a strange member of the family, but the family doesn't work without it.

Negative of a vector a

Same magnitude, exactly opposite direction. If a is "5 km toward Bhaktapur," then a is "5 km away from Bhaktapur." Adding them gives the zero vector: you go and come back, net movement zero.

Unit vector

Any vector whose magnitude is exactly 1. It carries pure direction with no size information, a "direction-only" vector. The unit vector along a is written â (read "a-hat"). Step 3 shows how to make one.

"Does a unit vector have to point along the x-axis or something?"

No, it can point anywhere. "Unit" is only about the length being 1. There are infinitely many unit vectors, one for every possible direction, and together their tips trace out a circle of radius 1.

Parallel (collinear) vectors

Vectors that point along the same line, either the same direction or exactly opposite. One is always a stretched/flipped copy of the other: b = k·a for some number k. (Same direction if k > 0, opposite if k < 0.)

A vector has no home. Same length + same direction = same vector, wherever it's drawn.

Step 3 · The master skill

Components: every arrow is "some east + some north"

Kathmandu's streets don't run diagonally for long, and neither does vector arithmetic. The trick that makes everything computable: describe any arrow by how far it goes across and how far it goes up. Two plain numbers replace one slanted arrow.

The standard unit vectors î and ĵ

î ("i-hat") is the unit vector pointing along the positive x-axis (east). ĵ ("j-hat") points along the positive y-axis (north). They are the official "one step east" and "one step north." Any 2-D vector can be built from them:

a = a₁î + a₂ĵ    means    "a₁ steps east, then a₂ steps north"

The numbers a₁ and a₂ are the components of the vector. (In 3-D there's a third friend, , pointing up out of the page, and vectors become a₁î + a₂ĵ + a₃k̂, everything in this tutorial extends by simply carrying one more component along.)

Magnitude from components

The vector, its east-part and its north-part form a right triangle, so Pythagoras gives the length:

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

Making a unit vector (normalising)

To get the pure direction of a, divide the vector by its own length:

â = a / |a|

Same direction, length shrunk (or grown) to exactly 1. Example: a = 3î + 4ĵ has |a| = 5, so â = (3/5)î + (4/5)ĵ = 0.6î + 0.8ĵ. Check: √(0.36 + 0.64) = √1 = 1 ✓.

a = 3.0î + 2.0ĵ
|a| = 3.6
â = 0.83î + 0.55ĵ (length 1)

↑ Drag the tip. Blue = east-part, magenta = north-part, and the little teal arrow is â, it hugs the unit circle no matter how long you stretch a.

"Components can be negative. But you said magnitude is always positive. Contradiction?"

No contradiction, they're answering different questions. A component answers "which way along this axis, and how far?", so −3 for the east-component means "3 steps west." The sign IS the direction along that axis. Magnitude answers "how long is the whole arrow?", and lengths are never negative. |−3î| = 3, just as a 3-metre rope is 3 metres long whichever way it lies.

"Is (3, 2) a point or a vector? I've seen both!"

Both notations exist, and yes, it's confusing. (3, 2) the point is a location on the map. 3î + 2ĵ the vector is the instruction "3 east, 2 north", which, if you start at the origin, lands on that point. They're deeply connected (Step 5 makes the connection official), but keep the roles straight: point = place, vector = movement.

"Why the hat on î and ĵ?"

The hat (ˆ) is the uniform worn by unit vectors, any vector wearing a hat has length exactly 1. î and ĵ are just the two most famous hat-wearers.

Any vector = (east number)·î + (north number)·ĵ. Length by Pythagoras. Divide by the length to get the pure direction â.

Step 4 · Arithmetic with arrows

Adding journeys, not numbers

What should "adding two vectors" even mean? Think of them as journeys. Walk journey a, then from where you stop, walk journey b. The sum a + b is the single straight journey from your original start to your final stop.

Triangle law (tip-to-tail) & parallelogram law

Place b's tail on a's tip; then a + b runs from a's tail to b's tip, that's the triangle law. Do it in the other order (a after b) and you trace the other half of a parallelogram, landing at the same spot, the parallelogram law. Both are the same idea drawn twice. In components it's beautifully boring: add the east-parts, add the north-parts.

(a₁î + a₂ĵ) + (b₁î + b₂ĵ) = (a₁+b₁)î + (a₂+b₂)ĵ

Subtraction

Subtracting is adding the reverse: ab = a + (−b), walk a, then walk b backwards. Handy picture: if a and b start from the same point, ab is the arrow from b's tip to a's tip.

a =
b =
a + b =

↑ Drag the blue and magenta tips. The dashed lines complete the parallelogram, both walking orders reach the same coral destination.

"Why can't I just add the lengths? 3 + 4 should be 7!"

Try it on foot: walk 3 km east, then 4 km north. Are you 7 km from home? No, you're 5 km away (Pythagoras: √(9+16) = 5). The two journeys partly "waste" each other by pointing different ways. Lengths only add straightforwardly when the vectors point the same direction. In the widget above, line a and b up and watch |a + b| finally equal |a| + |b|.

"In tip-to-tail, which vector goes first?"

Either! a + b = b + a, that's exactly what the parallelogram picture proves. The two routes are the two ways around the parallelogram, and they end at the same corner.

Scaling: stretching and flipping

Multiplying a vector by an ordinary number k (a scalar, hence "scalar multiplication") stretches it. k = 2 doubles it. k = ½ halves it. And a negative k flips it around, then stretches: −2a is twice as long, pointing exactly backwards. Slide k below and watch, especially what happens as k passes through zero:

a = 2.0î + 1.0ĵ
k·a = 3.0î + 1.5ĵ

↑ k > 0 stretches, k between 0 and 1 shrinks, k = 0 collapses to the zero vector, k < 0 flips the direction. Notice −1·a is exactly the "negative vector" from Step 2.

"Multiplying a vector by a number is allowed. So can I multiply a vector by a vector?"

Ah, the question. Not the way you'd guess, and the honest answer takes two whole sections. Vectors have not one but two famous multiplications, invented for two different jobs, and neither works like number-times-number. That's Steps 6 and 7, the best part of the tutorial.

Add = tip-to-tail (components just add). Subtract = add the reverse. Scale by k = stretch; negative k also flips.

Step 5 · Points join the game

Position vectors: turning places into arrows

So far, points (places) and vectors (movements) have been different creatures. Here's the bridge between them, and it makes geometry problems solvable by pure arithmetic.

Position vector

Fix an origin O (any agreed reference point, the city centre, say). The position vector of a point A is the arrow OA from the origin to A, usually written a. It's the movement instruction "how to get to A from O." Every point now has its own personal vector, and vice versa.

The most useful little formula: AB = ba

The arrow from point A to point B is destination minus start. Why? To travel O→A→B along vectors: going backwards along a then forwards along b takes you from A to B, so AB = −a + b = ba.

Midpoint

The midpoint M of A and B has position vector m = (a + b)/2, the average of the two position vectors, component by component. (Halfway between the two addresses.)

a (to A) =
b (to B) =
AB = ba =
midpoint m =

↑ Drag points A and B. The coral arrow always equals "b minus a", check the components yourself. The teal dot faithfully stays halfway.

"A point is a dot. An arrow is a movement. How can a point BE a vector?"

It can't, quite, and your instinct is right. The position vector isn't the point; it's the trip to the point from the agreed origin. Once everyone agrees on the origin, "the point A" and "the trip to A" carry the same information, so we happily switch between them. The origin is the handshake that makes it work.

"Why b − a and not a − b? I always mix them up."

Remember it on the number line first. From 2 to 5, how far do you move? 5 − 2 = 3, forwards. From 5 to 2? 2 − 5 = −3, backwards. It's always destination minus start, vectors just do this in two directions at once. And a − b would be the reverse arrow, BA.

"What if someone picks a different origin? Does everything break?"

Beautiful question. Position vectors do change (the trip to A from Patan differs from the trip from Thamel). But look at AB = ba: shifting the origin adds the same extra trip to both a and b, and the subtraction cancels it out. Arrows between actual points don't care where the origin is. The physics-flavoured facts survive; only the bookkeeping changes.

Point A ↔ arrow from origin to A. From A to B: destination minus start, b − a. Midpoint: the average.

Step 6 · Multiplying vectors, part one

The dot product: how much do two vectors agree?

Time to answer Step 4's cliffhanger. The first vector multiplication was invented to answer a very physical question: how much does one vector help another? If you pull a suitcase with a slanted handle, only the part of your pull along the floor moves the suitcase; the upward part is wasted. The dot product measures the useful, agreeing part.

Dot product (scalar product)

Two equivalent formulas, one geometric, one for computing:

a · b = |a| |b| cos θ   =   a₁b₁ + a₂b₂

where θ is the angle between them (tails together). The answer is a plain number (a scalar, hence the name). Read it as: (length of a) × (length of b's shadow on a). The cos θ is the "agreement factor": 1 when aligned, 0 when perpendicular, −1 when opposite.

Drag the two vectors below. Watch the teal shadow, that's b's projection onto a, and watch the dot product respond:

angle θ =
a·b = a₁b₁ + a₂b₂ =

↑ Make them perpendicular and watch the dot product hit exactly 0, the shadow vanishes. Push past 90° and it goes negative: b now leans against a.

Three readings of the same number:

The dot product's best trick: finding angles

Flip the geometric formula around and the angle between any two vectors pops out:

cos θ = (a · b) / (|a| |b|)

Example: a = 3î + ĵ and b = î + 2ĵ. Dot: 3·1 + 1·2 = 5. Lengths: √10 and √5. So cos θ = 5/√50 = 1/√2, giving θ = 45°. No protractor, no drawing, the components knew the angle all along. (Set the widget to roughly these vectors and check!)

"Why is the answer a number and not a vector? Multiplication should give the same kind of thing back!"

Because of the question it answers. "How much do these agree?" is an amount, not a direction, like a score, not an arrow. (Fun fact: this is exactly why complex-number multiplication had to be invented separately , but that's another tutorial.) When the answer genuinely needs a direction, we use the other product, in Step 7.

"What is a vector dotted with itself?"

The angle with itself is 0°, cos 0 = 1, so a·a = |a|², the length squared. In components: a₁² + a₂², which is Pythagoras again. A tidy freebie: dot any vector with itself to find its length.

"Who ordered the cos θ? Why cosine specifically?"

The shadow! Drop a perpendicular from b's tip onto a's line: basic trigonometry says the shadow's length is |b| cos θ. The dot product is |a| × (that shadow). Cosine isn't a decree from a textbook, it's just what shadows do.

a·b = |a||b|cos θ = a₁b₁ + a₂b₂, a number measuring agreement. Zero means perpendicular. It also finds angles.

Step 7 · Multiplying vectors, part two

The cross product: how much do two vectors spread apart?

The dot product loved alignment. The second multiplication is its opposite twin: it measures how much two vectors spread apart, and its favourite picture is area. Two vectors, tails together, frame a parallelogram. The cross product's size is exactly that parallelogram's area.

Cross product (vector product)

|a × b| = |a| |b| sin θ   =   area of the parallelogram

In 2-D components this area computes as a₁b₂ − a₂b₁ (up to sign). The result of a cross product is a vector: its magnitude is the area, and its direction is perpendicular to both a and b, in 2-D, straight out of (or into) the page, given by the right-hand rule below. The triangle with sides a and b has half that area: ½|a × b|.

angle θ =
area = |a×b| =
direction:,

↑ The shaded parallelogram IS the cross product's magnitude. Make the vectors perpendicular for maximum area; drag them parallel and watch the area, and the cross product, collapse to zero.

Notice the perfect symmetry with Step 6:

Dot · (cos θ)

Biggest when aligned (θ = 0°).
Zero when perpendicular.
Answer: a number (agreement).

Cross × (sin θ)

Zero when aligned (no area!).
Biggest when perpendicular.
Answer: a vector (area + turning direction).

So the two products split the work: dot detects perpendicular (= 0 there), cross detects parallel (= 0 there). Between them, any angle question is covered.

The right-hand rule

Point your right hand's fingers along a, curl them toward b (through the smaller angle): your thumb shows the direction of a × b. Curling from a to b anticlockwise on the page → thumb points out of the page at you (drawn ⊙, like an arrow tip). Clockwise → into the page (drawn ⊗, like arrow feathers). This is also why order matters: a × b = −(b × a), swap them and your curl reverses.

"Out of the page?? That sounds made up. Why does the answer leave the paper?"

Fair suspicion, here's the honest reason. The cross product describes a turning (a on its way toward b). A turning in this page can go two ways: anticlockwise or clockwise. What single arrow could label those two choices without unfairly favouring some direction inside the page? Only the perpendicular: out for one, in for the other. It's the same trick as a screw or a fan: the spin happens in a flat circle, but the screw advances along the axis. The perpendicular is the only honest home for the answer.

"Why sin now? Cos was for dot!"

Look at the parallelogram: its area is base × height = |a| × (|b| sin θ), the height is the part of b perpendicular to a, and perpendicular parts come with sine. Dot wanted b's shadow along a (cosine); cross wants b's reach away from a (sine). Each formula is just the geometry it measures.

"What is a × a?"

Zero vector. A "parallelogram" made of one vector twice is a flat line segment, no area. Same for any two parallel vectors: that's the "cross detects parallel" superpower.

Where you'll meet these in physics: the dot product computes work (W = F·d, only the force along the movement counts), and the cross product computes torque and magnetic forces (turning effects). The two tutorials, this one and the physics vectors one, meet exactly here.

|a×b| = |a||b|sin θ = the parallelogram's area; direction by the right-hand rule. Zero ⟺ parallel.

Step 8 · Try the ideas out

Three little challenges (with full answers)

Not exam drills, just three chances to feel the ideas working. Try each one in your head or on paper first, then read the walkthrough. The widgets above are your laboratory: set them up and verify!

1 · The angle without a protractor

Question: what's the angle between a = 3î + ĵ and b = î + 2ĵ?

Walkthrough: dot product first: a·b = (3)(1) + (1)(2) = 5. Lengths: |a| = √(9+1) = √10, |b| = √(1+4) = √5. Then cos θ = 5 / (√10·√5) = 5/√50 = 1/√2 → θ = 45°. Verify on the Step 6 widget: drag a and b to roughly these components and read the angle pill.

2 · Prove it's a right angle, no drawing needed

Question: u = 2î + ĵ and v = −î + 2ĵ. Perpendicular or not?

Walkthrough: u·v = (2)(−1) + (1)(2) = −2 + 2 = 0. Zero dot product = perpendicular, guaranteed, no picture required. (Notice how the components did it: swap them and flip one sign, that's the general recipe for building a perpendicular in 2-D.)

3 · The area of a triangle from its corners

Question: a triangle has corners A(0, 0), B(4, 1), C(1, 3). Its area?

Walkthrough: make two side vectors from A (Step 5!): AB = 4î + ĵ and AC = î + 3ĵ. Cross product size: |4·3 − 1·1| = 11, that's the parallelogram; the triangle is half: area = 5.5. Geometry became two multiplications and a subtraction. That's the whole point of vectors.

Putting it together

Everything on one page

  • Vector = magnitude + direction, drawn as an arrow; location is not part of it.
  • Components: every vector = a₁î + a₂ĵ; length by Pythagoras; â = a/|a| for pure direction.
  • Add tip-to-tail (components just add); subtract = add the reverse; k·a stretches (negative k flips).
  • Position vectors turn points into arrows; AB = b − a; midpoint = average.
  • Dot product a·b = |a||b|cos θ = a₁b₁ + a₂b₂, agreement; zero ⟺ perpendicular; finds angles.
  • Cross product |a×b| = |a||b|sin θ, the parallelogram's area; zero ⟺ parallel; direction by right hand.

Glossary, every term in one place

TermMeaning
scalarquantity with size only (mass, time, temperature, speed, distance)
vectorquantity with size and direction (displacement, velocity, force)
magnitude |a|the vector's length; never negative; √(a₁² + a₂²)
tail / head (tip)where the arrow starts / the pointed end where it ends
equal vectorssame magnitude and same direction, location irrelevant
zero vector 0magnitude 0, no direction; the "don't move" instruction
negative −asame magnitude, opposite direction
unit vector âany vector of length exactly 1; â = a/|a|
î, ĵ, k̂unit vectors along the x, y, z axes ("one step east / north / up")
components a₁, a₂the east-part and north-part; signs carry direction along each axis
parallel / collinearalong one line; b = k·a for some number k
triangle lawtip-to-tail addition: a then b, sum from start to finish
parallelogram lawsame addition drawn both orders, same destination
scalar multiplicationa: stretch by |k|, flip if k < 0
position vectorarrow from the origin to a point; the "trip to" the point
AB = baarrow between points: destination minus start
midpointposition vector (a + b)/2, the average
dot (scalar) producta·b = |a||b|cos θ = a₁b₁ + a₂b₂; a number; 0 ⟺ perpendicular
projection (shadow)the part of b lying along a; length |b| cos θ
cross (vector) product|a×b| = |a||b|sin θ = parallelogram area; 0 ⟺ parallel
right-hand rulecurl fingers a→b; thumb gives a×b's direction (⊙ out / ⊗ in)