0.2 Vectors and Their Lengths
Temperature, mass and cost are single numbers: they have size but no direction, and we call such quantities scalars. A velocity is different. Saying that a plane moves at kilometers per hour leaves out where it is going; the full description is an arrow — a speed and a direction — and that is a vector. In a picture a vector is drawn as an arrow with a tail and a head; its length, also called its magnitude, is the length of the arrow, written . Two arrows that have the same length and the same direction are the same vector, wherever they happen to be drawn, and that freedom is the whole difference between a vector and a point.
Because of that freedom, every vector can be slid so that its tail sits at the origin, and then it is completely described by where its head lands. A vector in that standard position is named by the coordinates of its head: the vector from the origin to the point is the vector , and its three numbers are its components. A vector with all components zero is the zero vector ; it has length and no direction at all. Vectors are written in bold, , to keep them apart from scalars, and sometimes as a column of numbers rather than a row — the same three components, stacked. The column form is the one matrices will want later; for now a list is a list.
The figure draws the vector with its third component on a slider, and it draws the components as a staircase: over , across , up .
Explore in 3D (opens in a new tab)A thick shaded arrow from the origin to the point (2, 1, c), where c is set by a slider that starts at 2. Three colored legs trace its components as a staircase: a red leg of length 2 along the x axis, then a green leg of length 1 parallel to the y axis, then a blue vertical leg of height c up to the arrow's tip. A thin gray segment on the floor is the vector's shadow, of length the square root of 5. Dragging the slider slides the tip straight up and down and the blue leg grows and shrinks with it: at c = 2 the arrow has length exactly 3, at c = 0 it lies flat on the floor on top of its own shadow with length the square root of 5, and at c = -2 it points below the floor with length 3 again. A second, thinner arrow starts at a gray point A = (-2, 1, 1) instead of the origin; it has the same rise, run and height and swings in step with the slider, showing that a vector is a displacement and not a location.
Explore the figure
- At the starting value , follow the staircase from the origin: units in the direction, in the direction, then up. The tip is at , and those three walks are the components. Now compute the length the way the last section measured distance: , so .
- Drag down to . The vector lies flat on the floor, on top of its own gray shadow, and its length is the shadow's length, . The third leg of the staircase has vanished.
- Keep going to . The vector now points below the floor, yet its length is again. A component's sign records which way the walk went; the square in the length formula forgets it.
- Return to and look at the thinner copy that starts at . It climbs the same staircase — over , across , up — and ends at . Same length, same direction, different place: it is the same vector . Drag and watch the two arrows move in step.
Components are displacements
The thinner copy explains how to read the components of any arrow, wherever it is drawn. An arrow with tail at and head at describes the displacement from to : to get from tail to head you move in the first direction, in the second and in the third. Slide the arrow so its tail is at the origin and its head lands at exactly those three numbers. So the component form of the vector from to is
In the figure, the copy runs from to , and head minus tail is : the vector on the slider at . The formula is the same in the plane with two components, and the same in with of them.
Length comes along for free. The length of is the distance from its tail at the origin to its head at , and the last section already computed that:
For a vector in the root covers squares. The formula has two consequences worth stating once. A vector's length is zero only when every component is zero — only the zero vector has no size. And scaling every component by the same number scales the length by the size of that number, which is the subject of the section after next.
The length of as a function of the slider, computed symbolically: . This is one card covering the whole slider rather than the three positions the exploration steps visit — it gives at and at , and at .
The same vector with the slider at its default. The engine returns the whole number , not — the components were chosen so that it would.
The arrow from to , given to the engine as its head-minus-tail differences: length , and the tail never enters the computation.
The length condition for , handed to a computer algebra system: two roots, and , one for each mirror image.
An original work of XYZ Homework, built around interactive XYZ 3D figures. Chapters 1–6 follow the topic sequence of Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL). Chapter 0's scope (its topics, their order, and the idea each figure shows) follows the Vectors chapter of Ximera's Linear Algebra: An Interactive Introduction. The prose, worked examples and figures were written for this book, which is not affiliated with or endorsed by the authors of either work. License: CC-BY-NC-SA-4.0.