Linear Algebra, Interactive EditionXYZ Homework Edition

⇩ Download ▾

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 800800 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 |𝐯||\mathbf{v}|. 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 (2,1,2)(2, 1, 2) is the vector (2,1,2)(2, 1, 2), and its three numbers are its components. A vector with all components zero is the zero vector 0\mathbf{0}; it has length 00 and no direction at all. Vectors are written in bold, 𝐯\mathbf{v}, 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 𝐯=(2,1,c)\mathbf{v} = (2, 1, c) with its third component on a slider, and it draws the components as a staircase: over 22, across 11, up cc.

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 dashed 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 dotted 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 hidden, thinner arrow starting at a gray point A = (-2, 1, 1) instead of the origin can be revealed; 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 in 3D (opens in a new tab)
The vector 𝐯=(2,1,c)\mathbf{v} = (2, 1, c) as an arrow from the origin, with its three components drawn as a dashed staircase — 22 along xx in red, then 11 along yy in green, then cc straight up in blue — and its gray shadow on the floor. A hidden, thinner copy of the same arrow starts at A=(2,1,1)A = (-2, 1, 1) instead of the origin.

Explore the figure

  1. At the starting value c=2c = 2, follow the staircase from the origin: 22 units in the xx direction, 11 in the yy direction, then 22 up. The tip is at (2,1,2)(2, 1, 2), and those three walks are the components. Now compute the length the way the last section measured distance: |𝐯|2=4+1+4=9|\mathbf{v}|^2 = 4 + 1 + 4 = 9, so |𝐯|=3|\mathbf{v}| = 3.
  2. Drag cc down to 00. The vector lies flat on the floor, on top of its own gray shadow, and its length is the shadow's length, 4+1=52.24\sqrt{4 + 1} = \sqrt{5} \approx 2.24. The third leg of the staircase has vanished.
  3. Keep going to c=2c = -2. The vector now points below the floor, yet its length is 4+1+4=3\sqrt{4 + 1 + 4} = 3 again. A component's sign records which way the walk went; the square in the length formula forgets it.
  4. Return to c=2c = 2 and reveal the thinner copy that starts at A=(2,1,1)A = (-2, 1, 1). It climbs the same staircase — over 22, across 11, up 22 — and ends at (0,2,3)(0, 2, 3). Same length, same direction, different place: it is the same vector (2,1,2)(2, 1, 2). Drag cc and watch the two arrows move in step.

Components are displacements

The dashed copy explains how to read the components of any arrow, wherever it is drawn. An arrow with tail at A=(a1,a2,a3)A = (a_1, a_2, a_3) and head at B=(b1,b2,b3)B = (b_1, b_2, b_3) describes the displacement from AA to BB: to get from tail to head you move b1a1b_1 - a_1 in the first direction, b2a2b_2 - a_2 in the second and b3a3b_3 - a_3 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 AA to BB is

head tail = ( b 1 a 1 , b 2 a 2 , b 3 a 3 ) \text{head} - \text{tail} = (b_1 - a_1, \; b_2 - a_2, \; b_3 - a_3)

In the figure, the copy runs from (2,1,1)(-2, 1, 1) to (0,2,3)(0, 2, 3), and head minus tail is (0+2,21,31)=(2,1,2)(0 + 2, \; 2 - 1, \; 3 - 1) = (2, 1, 2): the vector on the slider at c=2c = 2. The formula is the same in the plane with two components, and the same in n\mathbb{R}^n with nn of them.

Length comes along for free. The length of 𝐯=(v1,v2,v3)\mathbf{v} = (v_1, v_2, v_3) is the distance from its tail at the origin to its head at (v1,v2,v3)(v_1, v_2, v_3), and the last section already computed that:

| 𝐯 | = v 1 2 + v 2 2 + v 3 2 |\mathbf{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2}

For a vector in n\mathbb{R}^n the root covers nn 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.

5+c2\sqrt{5 + c^{2}}
The length on the slider ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The length on the slider, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The length of 𝐯=(2,1,c)\mathbf{v} = (2, 1, c) as a function of the slider, computed symbolically: c2+5\sqrt{c^2 + 5}. This is one card covering the whole slider rather than the three positions the exploration steps visit — it gives 33 at c=2c = 2 and at c=2c = -2, and 5\sqrt{5} at c=0c = 0.

33
And at the figure's starting value ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text And at the figure's starting value, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The same vector with the slider at its default. The engine returns the whole number 33, not 9\sqrt{9} — the components were chosen so that it would.

33\sqrt{33}
The worked example's length ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The worked example's length, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The arrow from (3,1,2)(3, -1, 2) to (1,4,0)(1, 4, 0), given to the engine as its head-minus-tail differences: length 33\sqrt{33}, and the tail never enters the computation.

3,33,\; -3
The missing component, solved ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The missing component, solved, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The length condition for 𝐰=(2,y,6)\mathbf{w} = (2, y, 6), handed to a computer algebra system: two roots, y=3y = 3 and y=3y = -3, one for each mirror image.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Its chapter sequence is aligned to Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL); this work is original, copies nothing from it, and is not affiliated with or endorsed by its authors. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.