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.
Keep this color code in mind, it's used everywhere below.
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.
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.
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:
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.
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.
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.
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.
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:
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:
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.
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.
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.
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.
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.
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.
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.
î ("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, k̂, 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.)
The vector, its east-part and its north-part form a right triangle, so Pythagoras gives the length:
|a| = √(a₁² + a₂²)
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 ✓.
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.
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.
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 â.
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.
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₂)ĵ
Subtracting is adding the reverse: a − b = a + (−b), walk a, then walk b backwards. Handy picture: if a and b start from the same point, a − b is the arrow from b's tip to a's tip.
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|.
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.
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:
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.
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.
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 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 = b − a.
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.)
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.
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.
Beautiful question. Position vectors do change (the trip to A from Patan differs from the trip from Thamel). But look at AB = b − a: 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.
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.
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:
Three readings of the same number:
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!)
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.
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.
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.
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.
|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|.
Notice the perfect symmetry with Step 6:
Biggest when aligned (θ = 0°).
Zero when perpendicular.
Answer: a number (agreement).
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.
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.
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.
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.
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.
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!
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.
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.)
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.
| Term | Meaning |
|---|---|
| scalar | quantity with size only (mass, time, temperature, speed, distance) |
| vector | quantity 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 vectors | same magnitude and same direction, location irrelevant |
| zero vector 0 | magnitude 0, no direction; the "don't move" instruction |
| negative −a | same 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 / collinear | along one line; b = k·a for some number k |
| triangle law | tip-to-tail addition: a then b, sum from start to finish |
| parallelogram law | same addition drawn both orders, same destination |
| scalar multiplication | k·a: stretch by |k|, flip if k < 0 |
| position vector | arrow from the origin to a point; the "trip to" the point |
| AB = b − a | arrow between points: destination minus start |
| midpoint | position vector (a + b)/2, the average |
| dot (scalar) product | a·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 rule | curl fingers a→b; thumb gives a×b's direction (⊙ out / ⊗ in) |