සංගතිකSangathika

SAM · සංගතික · Linear algebra · page 1

Vectors

A vector is a size and a direction given together.

Tell a friend to walk 5 km from the bus stand and they could end up anywhere on a circle. Tell them to walk 5 km on a bearing of 037° and they arrive at exactly one place. The second instruction is a vector: a size and a direction, given together.

The word comes from the Latin vehere, to carry. A vector carries you from where you are to somewhere else. Keep that picture of a carrier, a move, in mind. Most of this page grows out of it.

Before you start: you need coordinates on a grid and Pythagoras' theorem. Nothing else. This is the first lesson of the leaf.

Plate 1.1 · Walk 5 km

A size alone: every point on the dashed circle is 5 km from the start, and nothing tells them apart.
  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20

Layer 1 · Principle

Some quantities need a direction

Some quantities are fully described by one number. The temperature in Kandy at noon is 24 °C, and there is nothing more to ask. These are scalars. The name comes from the Latin scala, a ladder: one number on one scale, higher or lower.

Other quantities leave a question hanging. The wind is blowing at 25 km/h. Blowing which way? A fisherman putting out from Negombo needs the answer before anything else. These quantities need a size and a direction together. They are vectors, sometimes called Euclidean vectors in physics and engineering.

Scalar · a rung on a ladder

Temperature

24 °C. One number on one scale. Two readings compare simply: 26 °C is warmer, and that is the whole story.

Vector · a carrier

Wind

25 km/h from the south-west. Sri Lanka's south-west monsoon carries its direction in its name. Two winds at the same speed from different directions are different winds.

The test is a single question: is one number enough, or do I also need to know which way? Try it on eight everyday quantities. Two of them are traps that catch most people the first time.

Plate 1.2 · Scalar or vector?

The temperature in Kandy at noon: 24 °C

The south-west monsoon: 25 km/h from the south-west

The mass of a jackfruit: 8 kg

The weight of the same jackfruit: about 78 N

The distance you cover in one lap of a 400 m track

Your displacement after that same lap

A bus speedometer reading 60 km/h

A ship sailing at 20 knots on a bearing of 090°

A vector is a move, so it can start anywhere

The commonest mistake with vectors is to treat one as a place. It is a move. The difference is the difference between an address and a set of directions.

A place

An address

"No. 12, Galle Road" names one fixed spot. It makes no sense to start somewhere else and follow it.

A move

Directions

"Two blocks east, one block north." You can follow these from any corner. The instruction stays the same wherever you start. Only the destination changes.

A vector behaves like the directions. So the same arrow can be drawn anywhere on the page. What makes it that vector is how far it goes across and how far it goes up, whatever point its tail sits on.

Plate 1.3 · Same move, anywhere

Keyboard: arrow keys slide the tail, Shift + arrow keys move the tip.

Drag the square tail: the whole arrow slides and the move stays the same. Then drag the round tip: now you have changed the move itself. Watch the last line of the readout.

Tail at
Tip at
Tip − tail

Tip minus tail is the vector. An arrow from (1, 1) to (4, 3) and an arrow from (−2, 0) to (1, 2) are the same vector, (3, 2), because both carry you 3 across and 2 up.

When the tail sits at the origin, tip minus tail is just the tip, so the vector's numbers and the tip's coordinates agree. That arrow is called a position vector. From here on, as on page 17, eigenvectors, arrows start at the origin unless we say otherwise.

Layer 2 · Application

Describe it, add it, scale it

Two languages for the same arrow

Go back to the opening figure. "5 km on a bearing of 037°" and "3 km east, then 4 km north" land on the same spot. They are two ways of saying the same vector.

Components

A city laid out in blocks

"3 east, then 4 north." Easy to compute with: to combine two trips you add the easts and add the norths. These two numbers are the vector's components, written (3, 4).

Length and direction

A ship's officer

"5 km on 037°." Easy to picture and steer by: one distance, one heading. This is the vector's length (also called magnitude) and its direction.

Pythagoras translates from components to length: the length of (x, y) is √(x² + y²). Trigonometry gives the angle. A bearing is measured clockwise from north, so 037° is 37° east of north, which is the same as 53° north of east.

The same two languages, written as code. This leaf keeps a small library, sam.js, and each lesson adds the rules it introduces. These are this page's:

len(vec(3, 4))              // 5: Pythagoras, √(3² + 4²)
add(vec(3, 0), vec(0, 4))   // [3, 4]: add the easts, add the norths
scale(-3, vec(2, -1))       // [-6, 3]: same line, opposite way, three times longer
bearing(vec(3, 4))          // 36.87: degrees clockwise from north

Plate 1.4 · One arrow, both descriptions

Drag the tip anywhere. The dashed legs are the components; the arrow is the hypotenuse of their right triangle.

Components
Length
Angle from east
Bearing

Notice that the components can be negative, but a length never is. A length only says how big. The signs of the components carry the direction.

Adding vectors: one move after another

Adding two vectors means making one move and then the other. Draw the second arrow starting at the tip of the first. The sum is the single arrow from the very start to the very end. This is called tip to tail. In components it is simple: add the easts, add the norths.

Scalars add one way

Money in a wallet

Rs 300 plus Rs 400 is always Rs 700. There is no other possible answer.

Vectors add many ways

Two people pushing a stalled car

Pushes of 300 N and 400 N. Same way: the car feels 700 N. Against each other: 100 N. One from behind, one from the side: 500 N. Direction decides the total.

Predict first: if a has length 3 and b has length 4, how long can a + b be?

Anywhere from 1 to 7. The sum is longest when the two point the same way (3 + 4 = 7) and shortest when they point in opposite directions (4 − 3 = 1). At a right angle you get the 3, 4, 5 triangle from the opening figure. Now check it on the plate.

Plate 1.5 · 3 + 4 is not always 7

  • a, length 3
  • b, length 4
  • a + b
a
b
a + b
Length

The same addition steers boats. A boat aims straight across the Kelani river at 4 km/h while the current carries it 3 km/h downstream. Its own effort and the river's push add as vectors: it actually moves at 5 km/h, at an angle, and lands downstream of the point it aimed at. Switch on "Show b first, then a" and you will see the order of the two moves does not change where you end up.

Subtraction follows from addition. a − b means a + (−b), and it is the move that takes you from the tip of b to the tip of a. You have already used it: tip minus tail in Plate 1.3.

Scaling: same line, new length

Multiply a vector by an ordinary number k and the arrow stretches or shrinks along its own line. This is where the word "scalar" earns its keep: a scalar is the number that does the scaling. Each component is multiplied by k, so k(2, 1) = (2k, k).

Positive k

A volume knob

Turn it up and the same song gets louder. Turn it down and it gets quieter. The size changes; the direction stays.

Negative k

Reverse gear

A volume knob cannot go below zero, so that analogy breaks here. A negative k is reverse gear: same road, opposite way, and stretched by the size of k.

Plate 1.6 · The scaling slider

  • line through v
  • v = (2, 1)
  • kv
kv
Length
Direction

Hold on to what you just saw: scaling never knocks an arrow off its line. Most moves a matrix makes do knock arrows off their lines. Page 17, eigenvectors, hunts for the arrows a matrix treats exactly like this slider, and writes the idea as Av = λv.

Layer 3 · Specifics

Every arrow is a recipe

Take two fixed ingredients: i, one step east, and j, one step north. Any arrow in the plane is some amount of i plus some amount of j. The arrow (3, 4) is 3i + 4j. The components you have been reading all along are simply the amounts in this recipe. Building an arrow this way, by scaling and adding, is called a linear combination.

Now change the ingredients. A paint shop that stocks different base tints can still mix the same shade, but the recipe card changes. Vectors work the same way. With a different pair of building blocks you can still reach every point, but the amounts are different. Choosing the ingredients is called choosing a basis, and it is why eigenvectors matter: they are often the ingredients that make a matrix easiest to describe.

Plate 1.7 · Reach the ring with two ingredients

Set the two amounts to reach the ring at (3, 3). Do it first with i and j. Then switch ingredients to u = (2, 1) and w = (−1, 1) and do it again. The faint grid shows how the new ingredients tile the plane.

Recipe

Beyond arrows

Arrows are the picture of a vector. The definition is about behaviour. A vector is anything you can add to another of its kind, and multiply by a number, and still get something sensible of the same kind. Arrows pass that test, and so do many things that are not arrows at all.

Test four lists of numbers against it. Decide the last column yourself before you reveal it.

The listAdd two of them?Double one?Verdict
A grocery order: 2 kg rice, 1 kg dhal, 6 eggsTwo orders combine item by itemTwice the order makes sense?
A screen colour: red, green and blue light levelsTwo lights shining togetherTwice as bright?
A GPS position: latitude, longitudeKandy plus Galle means nothingTwice Kandy means nothing?
A phone numberMeaninglessMeaningless?

The GPS row closes the loop with Layer 1. A place is an address. The move between two places is a set of directions, and only the move is a vector.

A vector is a quantity with a size and a direction. It is drawn as an arrow, written as a list of components, and defined by what you can do with it: add it and scale it.

Retrieval · Check yourself

Check your understanding: six questions, one per idea

QUESTION 1 OF 6

A friend phones: "I am 2 km from the station." Why can you not walk straight to her?

QUESTION 2 OF 6

Vector a has length 3 and vector b has length 4. Which of these can the length of a + b NOT be?

QUESTION 3 OF 6

One arrow runs from (1, 1) to (4, 3). Another runs from (−2, 0) to (1, 2). Are they the same vector?

QUESTION 4 OF 6

v = (2, −1). What is −3v?

QUESTION 5 OF 6

Which of these is not a vector?

QUESTION 6 OF 6

With ingredients u = (2, 1) and w = (−1, 1), which recipe makes the arrow (1, 2)?

Challenges · Seed and Branch

Two challenges

Each challenge declares its level. Commit an answer before the solution opens. Hints open one at a time.

Seed

Every arrow of length 5

Needs: this page (length from components).

The arrow (3, 4) has length 5. How many different vectors with whole-number components have length exactly 5? Count every sign and every order: (3, 4) and (4, 3) are different vectors.

Hint 1

Write the length rule as an equation: x² + y² = 25, where x and y are whole numbers, positive, negative or zero.

Hint 2

Try each size of x from 0 to 5 and ask whether 25 − x² is a perfect square.

Hint 3

Sizes 0 and 5 give arrows along the axes. Sizes 3 and 4 give slanted arrows. Each slanted solution has four sign versions.

Hints used: 0 of 3

Branch

Crossing the Kelani straight

Needs: this page (adding vectors tip to tail, and length).

A boat moves at 5 km/h through still water. The river current runs at 3 km/h downstream. The captain wants to land directly opposite her starting point, so she aims a little upstream. How fast does the boat actually cross, measured straight across the river?

Hint 1

The boat's own velocity and the current add as vectors, tip to tail, as in Plate 1.5.

Hint 2

To land straight across, the sum must have no downstream part. So the boat's own velocity must have an upstream component of exactly 3 km/h.

Hint 3

The boat's own velocity has length 5 and an upstream component of 3. Pythagoras gives its other component.

Hints used: 0 of 3

Next · page 2, span

You can now scale an arrow and add two arrows. The next lesson takes two arrows and asks what all their combinations can reach.

With two arrows, and any amount of each, which points of the plane can you reach?

Page 2, span, is the next lesson to be written.

For the teacher: how this page is sequenced

Each step is chosen to set up the next, and the 3, 4, 5 triangle runs as a thread from the opening figure through Plates 1.4 and 1.5 and the river example.

  1. Hook through uncertainty. The opening figure shows the problem a vector solves before naming it: a size alone leaves a whole circle of answers, and adding a direction collapses the circle to one point.
  2. Classify before operating. Plate 1.2 makes learners apply the size-plus-direction test, with two deliberate traps: mass against weight, and distance against displacement (where the displacement is the zero vector).
  3. Remove the commonest misconception early. Learners tend to treat a vector as a point. The address against directions contrast and Plate 1.3 establish it as a move, which is what makes tip-to-tail addition feel natural later.
  4. Two representations, one object. Components and length-with-bearing are introduced as two languages, with Pythagoras as the translator.
  5. Predict before manipulating. Plate 1.5 asks for a prediction first, because the scalar habit "3 + 4 = 7" is exactly what it needs to break.
  6. Paired analogies, with the break point named. Every analogy sits beside a contrasting one. Where an analogy fails (the volume knob at zero), the page says so and hands over to the second analogy.
  7. Abstraction last. Ingredients and the "is it a vector?" test move from arrows to behaviour, and set up basis change and the scaling idea needed for Eigenvectors.
  8. Retrieval. Six questions, one per idea, each with its reasoning shown after the answer.
  9. Challenges. Seed 1.1 is hard because the page shows one arrow of length 5 and the challenge asks for all of them: the length rule must be run backwards, and signs and order counted with care. Branch 1.2 is hard because it reverses the page's river example: the learner chooses a direction that makes one component of a sum zero, instead of reading the sum off a picture.
  10. Plate 1.1, purpose. A size alone leaves a whole circle of answers; adding a direction collapses the circle to one point. The 3, 4, 5 arrow it lands on is the first appearance of the triangle that recurs across the whole tree.