Skip to main content

Adding and scaling vectors

Vectors can be added tip to tail and stretched by a number. See both operations as pictures and as arithmetic on coordinates, derive the eight rules they obey, and read a subtraction as the arrow that joins two tips.
M02.1.3L1 Core25 minIn review

Before this lesson

M02.1.1 Vectors as arrows M02.1.2 Vectors as lists of numbers

After this lesson you can

  • Add two vectors tip to tail in a picture and coordinate by coordinate in numbers, and explain why the two methods agree.
  • Scale a vector by a positive, negative or zero number and say what happens to its length and its direction.
  • Draw the difference of two vectors as the arrow from one tip to the other, pointing the right way.
  • Derive each of the eight rules of vector arithmetic from a rule for ordinary numbers.

In review. The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.

The question

A drone flies 1 kilometre east and 2 kilometres north. Then the wind carries it 3 kilometres east and 1 kilometre north. Where is it now? And where would it be if it had made the first flight twice? One question is about adding and the other about scaling, the two operations on which all of linear algebra is built. What do they look like, and what rules do they follow?

From the last lesson

1. How do you find the coordinates of the arrow from \(P\) to \(Q\)?

Show answer

Tip minus tail, one coordinate at a time: \((q_1 - p_1,\; q_2 - p_2)\).

2. What is the length of the vector \((2, 6, 3)\)?

Show answer

\(\sqrt{2^2 + 6^2 + 3^2} = \sqrt{4 + 36 + 9} = \sqrt{49} = 7\).

Intuition

A vector is a move. Two moves made one after the other add up to a single move, and that single move is the sum of the two vectors. In a picture, slide the second arrow until its tail sits on the tip of the first. The sum runs from the first tail to the last tip. This is the tip-to-tail rule.

A move can also be repeated, halved or reversed. That is scaling: the arrow keeps its line of direction and changes its length, and a negative number turns it round.

Two panels. The left panel, titled Add: tip to tail, shows a coordinate plane with a blue arrow u from the origin to (1, 2), a sky-blue arrow v drawn from the tip of u to the point (4, 3), and a vermillion arrow labelled u plus v from the origin straight to (4, 3). A dashed sky-blue copy of v starts at the origin, and a note says v slides to the tip of u. The right panel, titled Scale: stretch, shrink, flip, shows four parallel arrows standing on a horizontal line: minus u pointing down and to the left, one half u which is short, the blue arrow u, and 2 u which is twice as long. A note says same direction or its opposite, new length.
M02.1.3-F1

The two operations. Left: to add, put the tail of \(\vect{v}\) on the tip of \(\vect{u}\); the sum goes from start to finish. Right: to scale, keep the line of direction and change the length. In this lesson \(\vect{u} = (1, 2)\) and \(\vect{v} = (3, 1)\).

In the hook, the first flight is \(\vect{u} = (1, 2)\) and the wind adds \(\vect{v} = (3, 1)\). The picture says the drone ends 4 kilometres east and 3 kilometres north of where it began.

Build it up

Step 1. Add by walking. Walk along \(\vect{u}\), then along \(\vect{v}\). Because a vector may be drawn anywhere (lesson M02.1.1), we are free to slide \(\vect{v}\) so that it starts where \(\vect{u}\) ends.

Step 2. Read the sum off the grid. Going along \(\vect{u}\) takes you 1 across and 2 up. Going on along \(\vect{v}\) takes you a further 3 across and 1 up. In all you have gone \(1 + 3 = 4\) across and \(2 + 1 = 3\) up. The runs add and the rises add, so

\[ \vect{u} + \vect{v} = (1 + 3,\; 2 + 1) = (4, 3) . \]

Step 3. Try the other order. Walk along \(\vect{v}\) first and then along \(\vect{u}\). You go \(3 + 1\) across and \(1 + 2\) up, and arrive at the same point \((4, 3)\). The two routes are the two ways round a parallelogram, and the sum is its diagonal.

Two panels on the same coordinate plane. In the left panel, titled Runs add, and rises add, the blue arrow u goes from the origin to (1, 2), the sky-blue arrow v continues from there to (4, 3), and a vermillion arrow goes straight from the origin to (4, 3). Measuring lines under the picture show a run of 1 followed by a run of 3, with the note run: 1 plus 3 equals 4. Measuring lines at the side show a rise of 2 followed by a rise of 1, with the note rise: 2 plus 1 equals 3. In the right panel, titled Either order, same corner, the same three arrows are joined by a dashed copy of v from the origin and a dashed copy of u from the tip of that copy, completing a parallelogram whose far corner is (4, 3). A note reads u plus v equals v plus u.
M02.1.3-F2

Left: along the bottom the two runs lie end to end, and up the side so do the two rises. Right: \(\vect{u}\) then \(\vect{v}\), or \(\vect{v}\) then \(\vect{u}\), both end at the same corner of a parallelogram.

Step 4. Scale. Flying \(\vect{u}\) twice is \(\vect{u} + \vect{u} = (1 + 1,\; 2 + 2) = (2, 4)\). We write this \(2\vect{u}\): each coordinate has been doubled. In the same way \(\tfrac12 \vect{u} = (0.5, 1)\) is half the flight, and \((-1)\vect{u} = (-1, -2)\), written \(-\vect{u}\), is the flight home. The number that multiplies a vector is called a scalar, because it scales.

Step 5. Subtract by adding the opposite. \(\vect{v} - \vect{u}\) means \(\vect{v} + (-\vect{u})\): walk along \(\vect{v}\), then along \(-\vect{u}\). In coordinates, \(\vect{v} - \vect{u} = (3 - 1,\; 1 - 2) = (2, -1)\). There is a second way to see the same vector. Draw \(\vect{u}\) and \(\vect{v}\) from the origin. Then \(\vect{v} - \vect{u}\) is the arrow from the tip of \(\vect{u}\) to the tip of \(\vect{v}\): it is what you must add to \(\vect{u}\) to reach \(\vect{v}\).

Two panels on the same coordinate plane. In the left panel, titled Add the opposite, a sky-blue arrow v goes from the origin to (3, 1), a blue arrow labelled minus u goes from there down to (2, minus 1), and a vermillion arrow labelled v minus u goes from the origin to (2, minus 1). A dashed blue arrow shows u from the origin to (1, 2). In the right panel, titled From the tip of u to the tip of v, the blue arrow u and the sky-blue arrow v both start at the origin, and a vermillion arrow labelled v minus u joins the tip of u to the tip of v. A dashed vermillion arrow from the origin to (2, minus 1) is labelled the same vector, from the origin.
M02.1.3-F3

Two pictures of one subtraction. Left: \(\vect{v} - \vect{u}\) as \(\vect{v}\) followed by \(-\vect{u}\). Right: the same vector, slid so that it joins the two tips.

The formal statement

NoteDefinition: addition and scaling in \(\R^n\)

For vectors \(\vect{u}, \vect{v}\) in \(\R^n\) and a real number \(c\),

\[ \begin{aligned} \vect{u} + \vect{v} &= (u_1 + v_1,\; \dots,\; u_n + v_n), \\ c\,\vect{v} &= (c\,v_1,\; \dots,\; c\,v_n) . \end{aligned} \]

Also \(-\vect{v} = (-1)\vect{v}\) and \(\vect{u} - \vect{v} = \vect{u} + (-\vect{v})\), so that \(\vect{u} - \vect{v} = (u_1 - v_1,\; \dots,\; u_n - v_n)\).

Two vectors can be added only when they have the same number of coordinates. The definition works for any \(n\). In the plane it agrees with the pictures, and here is why.

Tip to tail gives the same answer. Put the tail of \(\vect{u}\) at the origin, so that its tip is the point \((u_1, u_2)\). Slide \(\vect{v}\) until its tail is at that point, and call its tip \((t_1, t_2)\). The coordinates of an arrow are tip minus tail (lesson M02.1.2), so

\[ t_1 - u_1 = v_1 \quad\text{and}\quad t_2 - u_2 = v_2 . \]

Solving for the tip gives \((t_1, t_2) = (u_1 + v_1,\; u_2 + v_2)\). The sum arrow runs from the origin to this point, so those are its coordinates, as the definition says.

Scaling multiplies the length by \(\abs{c}\). For \(\vect{v} = (v_1, v_2)\),

\[ \begin{aligned} \norm{c\,\vect{v}} &= \sqrt{(c v_1)^2 + (c v_2)^2} \\ &= \sqrt{c^2 (v_1^2 + v_2^2)} \\ &= \sqrt{c^2}\,\sqrt{v_1^2 + v_2^2} \\ &= \abs{c}\,\norm{\vect{v}} . \end{aligned} \]

The last step uses \(\sqrt{c^2} = \abs{c}\): a length is never negative. The same lines work with \(n\) terms under the root. As for direction, the triangle with run \(c v_1\) and rise \(c v_2\) is the triangle of \(\vect{v}\) with both sides multiplied by the same number, so it has the same slant. If \(c > 0\) the run and the rise keep their signs and the arrow points the same way. If \(c < 0\) both signs flip and it points the opposite way. (The angle note of lesson M02.1.1 confirms both.) If \(c = 0\) we get \((0, 0)\), the zero vector.

The difference joins the tips. Draw \(\vect{u}\) and \(\vect{v}\) from the origin, with tips at \((u_1, u_2)\) and \((v_1, v_2)\). The arrow from the tip of \(\vect{u}\) to the tip of \(\vect{v}\) has coordinates tip minus tail, \((v_1 - u_1,\; v_2 - u_2)\), and that is \(\vect{v} - \vect{u}\).

The eight rules. Let \(\vect{u}, \vect{v}, \vect{w}\) be vectors in \(\R^n\) and let \(a, b\) be numbers. Vector arithmetic obeys eight rules, and each one is a rule for ordinary numbers applied in every coordinate. Here is one written out in full:

\[ \begin{aligned} & a(\vect{u} + \vect{v}) \\ &\quad = a\,(u_1 + v_1,\, \dots,\, u_n + v_n) \\ &\quad = \big(a(u_1 + v_1),\, \dots,\, a(u_n + v_n)\big) \\ &\quad = (a u_1 + a v_1,\, \dots,\, a u_n + a v_n) \\ &\quad = (a u_1, \dots, a u_n) + (a v_1, \dots, a v_n) \\ &\quad = a\vect{u} + a\vect{v} . \end{aligned} \]

The first step uses the definition of addition and the second the definition of scaling. The third is the rule \(a(x + y) = ax + ay\) for numbers, used in every coordinate. The fourth is the definition of addition again, read from right to left, and the fifth is the definition of scaling.

The other seven go the same way. In the list below, each rule is followed by what it says about coordinate \(i\), which is a familiar fact about numbers. Two vectors whose coordinates all agree are equal (lesson M02.1.2), so each line is a complete proof.

  1. Order of adding. \(\vect{u} + \vect{v} = \vect{v} + \vect{u}\), because \(u_i + v_i = v_i + u_i\).
  2. Grouping of adding. \((\vect{u} + \vect{v}) + \vect{w} = \vect{u} + (\vect{v} + \vect{w})\), because \((u_i + v_i) + w_i = u_i + (v_i + w_i)\).
  3. Adding zero. \(\vect{v} + \vect{0} = \vect{v}\), because \(v_i + 0 = v_i\).
  4. Adding the opposite. \(\vect{v} + (-\vect{v}) = \vect{0}\), because \(v_i + (-v_i) = 0\).
  5. Multiplying by one. \(1\vect{v} = \vect{v}\), because \(1 \cdot v_i = v_i\).
  6. Grouping of multiplying. \(a(b\vect{v}) = (ab)\vect{v}\), because \(a(b v_i) = (ab) v_i\).
  7. Multiplying out a bracket of vectors. \(a(\vect{u} + \vect{v}) = a\vect{u} + a\vect{v}\), because \(a(u_i + v_i) = a u_i + a v_i\).
  8. Multiplying out a bracket of numbers. \((a + b)\vect{v} = a\vect{v} + b\vect{v}\), because \((a + b) v_i = a v_i + b v_i\).

Rule 1 is the parallelogram of Step 3. Rule 4 is the flight out followed by the flight home. Rule 7, the one written out above, says that enlarging a tip-to-tail triangle enlarges every side by the same factor.

Because of these rules you can handle vectors much as you handle numbers in school algebra: collect terms, move a term to the other side, multiply out a bracket. One thing is missing. The rules never multiply or divide one vector by another.

Go deeper: why exactly these eight?

These eight rules are the definition of a vector space: any collection of objects that can be added to each other and scaled by numbers so that the eight rules hold. Lists of numbers are the first example, and the one that data science uses most. Polynomials are another: add two and you get a polynomial, scale one and you get a polynomial, and the eight rules hold. So are sound signals and functions.

The pay-off is economy. A fact proved using only the eight rules, and never the coordinates, is true in every vector space at once. More advanced courses take that road. For now, a vector is a list of numbers, and the rules are things we have checked, not things we assume.

Frontier note: one scale and one add: a training step

The rule by which many machine-learning models learn is called gradient descent. If \(\cparam{\vect{w}_t}\) holds all the weights of a model after \(t\) steps, the next step is

\[ \cparam{\vect{w}_{t+1}} = \cparam{\vect{w}_t} - \eta\,\cgrad{\nabla L(\vect{w}_t)} . \]

Here \(\cgrad{\nabla L}\) is the gradient, a vector with one coordinate for each weight (course M05 explains where it comes from), and \(\eta\) is a small positive scalar called the learning rate. The update is one scaling, by \(-\eta\), and one addition. For a model with a million weights these are vectors in \(\R^{1{,}000{,}000}\), and the arithmetic is exactly the arithmetic of this lesson.

Worked example

Take \(\vect{u} = (1, 2)\) and \(\vect{v} = (3, 1)\).

(a) The sum. \(\vect{u} + \vect{v} = (1 + 3,\; 2 + 1) = (4, 3)\).

(b) Two scalings. \(2\vect{v} = (2 \cdot 3,\; 2 \cdot 1) = (6, 2)\) and \(-\vect{u} = (-1 \cdot 1,\; -1 \cdot 2) = (-1, -2)\).

(c) A combination: \(2\vect{v} - \vect{u}\). Build it from the two pieces of part (b), tip to tail.

A coordinate plane showing the calculation of 2 v minus u in three numbered steps. A blue arrow u goes from the origin to (1, 2). A sky-blue arrow goes from the origin through the tip of v at (3, 1), marked with a dot, on to (6, 2); it is labelled 2 v, and step 1 reads 2 v equals (6, 2). A blue arrow labelled minus u goes from (6, 2) down to (5, 0), and step 2 reads minus u equals (minus 1, minus 2). A vermillion arrow along the horizontal axis from the origin to (5, 0) is labelled 2 v minus u, and step 3 reads 2 v minus u equals (5, 0). A sentence underneath says: scale v by 2, flip u, then add tip to tail.
M02.1.3-F4

The combination \(2\vect{v} - \vect{u}\) as a trace. Each step is one scaling or one addition, and the answer lands on the horizontal axis at \((5, 0)\).

\[ \begin{aligned} 2\vect{v} - \vect{u} &= (6, 2) + (-1, -2) \\ &= (6 - 1,\; 2 - 2) = (5, 0) . \end{aligned} \]

(d) The difference. \(\vect{v} - \vect{u} = (3 - 1,\; 1 - 2) = (2, -1)\). This is the arrow from the tip of \(\vect{u}\) to the tip of \(\vect{v}\). Check it: \(\vect{u} + (\vect{v} - \vect{u}) = (1 + 2,\; 2 - 1) = (3, 1) = \vect{v}\).

(e) Lengths. \(\norm{\vect{u}} = \sqrt{1 + 4} = \sqrt{5} \approx 2.24\) and \(\norm{\vect{v}} = \sqrt{9 + 1} = \sqrt{10} \approx 3.16\), while \(\norm{\vect{u} + \vect{v}} = \sqrt{16 + 9} = 5\). The sum is shorter than \(2.24 + 3.16 = 5.40\). Going straight there beats going round the corner. Also \(\norm{2\vect{v}} = \sqrt{36 + 4} = \sqrt{40} \approx 6.32\), which is \(2 \times 3.16\), as the scaling result says.

Code

From scratch, for vectors with any number of coordinates.

def add(u, v):
    if len(u) != len(v):
        raise ValueError("vectors must have the same number of coordinates")
    return tuple(a + b for a, b in zip(u, v))

def scale(c, v):
    return tuple(c * x for x in v)

def subtract(u, v):
    return add(u, scale(-1, v))

u, v = (1, 2), (3, 1)
print("u + v  =", add(u, v))
print("2v     =", scale(2, v), "  -u =", scale(-1, u))
print("2v - u =", subtract(scale(2, v), u))
print("v - u  =", subtract(v, u))
u + v  = (4, 3)
2v     = (6, 2)   -u = (-1, -2)
2v - u = (5, 0)
v - u  = (2, -1)

With NumPy arrays the same operations are written +, - and *. The loop then tests all eight rules on random vectors in \(\R^5\).

import numpy as np

u, v = np.array([1, 2]), np.array([3, 1])
print(u + v, 2 * v - u, v - u)
print("lengths:", np.linalg.norm(u).round(2), np.linalg.norm(v).round(2), np.linalg.norm(u + v))

rng = np.random.default_rng(0)
rules_hold = True
for _ in range(1000):
    x, y, z = rng.normal(size=(3, 5))
    a, b = rng.normal(size=2)
    zero = np.zeros(5)
    rules_hold &= all([
        np.allclose(x + y, y + x), np.allclose((x + y) + z, x + (y + z)),
        np.allclose(x + zero, x), np.allclose(x + (-x), zero),
        np.allclose(1 * x, x), np.allclose(a * (b * x), (a * b) * x),
        np.allclose(a * (x + y), a * x + a * y), np.allclose((a + b) * x, a * x + b * x),
    ])
print("all eight rules hold on 1,000 random triples:", rules_hold)
[4 3] [5 0] [ 2 -1]
lengths: 2.24 3.16 5.0
all eight rules hold on 1,000 random triples: True

A warning before you move on. Plain Python lists use the same symbols for something else.

print([1, 2] + [3, 1])
print(2 * [3, 1])
[1, 2, 3, 1]
[3, 1, 3, 1]

For lists, + joins and * repeats. Vector arithmetic needs NumPy arrays, or functions like the ones above.

Explore

M02.1-X1

Vector playground

Drag the round handles at the tips of \(\vect{u}\) and \(\vect{v}\), or use the sliders. The picture shows the sum built tip to tail and a scaled copy \(c\vect{u}\), and the read-out gives every coordinate and length as a number.

A static picture in place of the interactive: on the left the blue arrow u from the origin to (1, 2), the sky-blue arrow v placed at its tip, and the vermillion sum from the origin to (4, 3); on the right four parallel arrows showing minus u, one half u, u and 2 u.

Things to try:

  1. Press Reset. Does the read-out give \(\vect{u} + \vect{v} = (4, 3)\), as in the worked example? Press Play to watch \(\vect{v}\) slide to the tip of \(\vect{u}\).
  2. Switch on Both orders and drag either handle. Do the two routes ever end at different corners?
  3. Drag \(\vect{v}\) until the sum is the zero vector. What is \(\vect{v}\) in terms of \(\vect{u}\)?
  4. Line \(\vect{v}\) up with \(\vect{u}\), pointing the same way. What does the read-out say about the length of the sum now?
  5. Move the \(c\) slider slowly from 2 down to \(-2\). What happens to \(c\vect{u}\) as \(c\) passes 0?
  6. Switch on Show v − u and drag \(\vect{u}\). Which tip does the difference arrow point at?

Pitfalls

Two panels, each showing the blue arrow u from the origin to (1, 2) and the sky-blue arrow v from the origin to (3, 1). In the left panel, marked with a cross and titled Pointing at u, a vermillion arrow runs from the tip of v to the tip of u and is labelled v minus u with a question mark; a note says this arrow is u minus v equals (minus 2, 1). In the right panel, marked with a tick and titled Pointing at v, a green arrow runs from the tip of u to the tip of v and is labelled v minus u; a note says check: u plus (v minus u) equals v.
M02.1.3-F5

Wrong beside right. The difference \(\vect{v} - \vect{u}\) starts at the tip of \(\vect{u}\) and points at the tip of \(\vect{v}\): it is what you add to \(\vect{u}\) to get \(\vect{v}\).

“\(\vect{v} - \vect{u}\) is the arrow from \(\vect{v}\) to \(\vect{u}\).”

It is the other way round. \(\vect{v} - \vect{u}\) points at \(\vect{v}\), the vector that is not being taken away. Test it by adding: \(\vect{u} + (\vect{v} - \vect{u})\) must come out as \(\vect{v}\). The sign matters in machine learning, where an error is a difference such as “prediction minus target”. Swap the two and every correction pushes the model the wrong way.

“The length of \(\vect{u} + \vect{v}\) is the length of \(\vect{u}\) plus the length of \(\vect{v}\).”

Coordinates add. Lengths do not. In the worked example the sum has length 5, not \(2.24 + 3.16 = 5.40\). The two are equal only when the arrows point the same way, so that tip to tail they make one straight line, or when one of them is the zero vector. Otherwise the sum is shorter, because the straight route between two points is the shortest one. This fact is called the triangle inequality.

“In Python, [1, 2] + [3, 1] adds the vectors.”

It joins the lists, giving [1, 2, 3, 1], and 2 * [3, 1] gives [3, 1, 3, 1]. No error is raised, so the bug can travel a long way before anyone notices. Convert to NumPy arrays first.

Check yourself

Recall

1. How do you add two vectors in a picture?

Show answer

Tip to tail: slide the second arrow so that its tail is on the tip of the first. The sum goes from the tail of the first to the tip of the second.

2. How do you add two vectors given by their coordinates?

Show answer

Add the matching coordinates: \(\vect{u} + \vect{v} = (u_1 + v_1, \dots, u_n + v_n)\). Both vectors must have the same number of coordinates.

3. What does multiplying a vector by \(-2\) do to its length and its direction?

Show answer

The length is doubled, because \(\norm{c\vect{v}} = \abs{c}\norm{\vect{v}}\), and the direction is reversed, because the scalar is negative.

4. With \(\vect{u}\) and \(\vect{v}\) drawn from the origin, where does the arrow \(\vect{v} - \vect{u}\) start and end?

Show answer

It starts at the tip of \(\vect{u}\) and ends at the tip of \(\vect{v}\).

5. Which of the eight rules says that the order of adding does not matter, and which picture shows it?

Show answer

Rule 1, \(\vect{u} + \vect{v} = \vect{v} + \vect{u}\). The parallelogram shows it: both ways round end at the same corner.

Exercises

1. ★ Let \(\vect{a} = (2, -1, 4)\) and \(\vect{b} = (-3, 5, 1)\). Find \(\vect{a} + \vect{b}\), \(3\vect{a}\) and \(\vect{a} - \vect{b}\).

Show solution

\(\vect{a} + \vect{b} = (2 - 3,\; -1 + 5,\; 4 + 1) = (-1, 4, 5)\).

\(3\vect{a} = (6, -3, 12)\).

\(\vect{a} - \vect{b} = (2 + 3,\; -1 - 5,\; 4 - 1) = (5, -6, 3)\).

2. ★★ Find the vector \(\vect{x}\) for which \(2\vect{x} + (1, 2) = (7, -4)\). Say which rules you use.

Show solution

Add \(-(1, 2)\) to both sides. On the left, rules 2, 4 and 3 give \(2\vect{x} + \big((1, 2) + (-(1, 2))\big) = 2\vect{x} + \vect{0} = 2\vect{x}\). On the right, \((7, -4) - (1, 2) = (6, -6)\). So \(2\vect{x} = (6, -6)\).

Scale both sides by \(\tfrac12\). On the left, rules 6 and 5 give \(\tfrac12(2\vect{x}) = (\tfrac12 \cdot 2)\vect{x} = 1\vect{x} = \vect{x}\). On the right, \(\tfrac12 (6, -6) = (3, -3)\). So \(\vect{x} = (3, -3)\).

Check: \(2(3, -3) + (1, 2) = (6 + 1,\; -6 + 2) = (7, -4)\).

3. ★★★ Draw \(\vect{u}\) and \(\vect{v}\) from the origin. Show that the point halfway between their tips is the tip of \(\tfrac12(\vect{u} + \vect{v})\). Then find that point for \(\vect{u} = (1, 2)\) and \(\vect{v} = (3, 1)\).

Show solution

To reach the halfway point, go to the tip of \(\vect{u}\) and then half of the way along the arrow that joins the tips, which is \(\vect{v} - \vect{u}\). That is the vector \(\vect{u} + \tfrac12(\vect{v} - \vect{u})\). Now simplify with the rules:

\[ \begin{aligned} & \vect{u} + \tfrac12(\vect{v} - \vect{u}) \\ &\quad = \vect{u} + \tfrac12\vect{v} - \tfrac12\vect{u} \\ &\quad = \big(1 - \tfrac12\big)\vect{u} + \tfrac12\vect{v} \\ &\quad = \tfrac12\vect{u} + \tfrac12\vect{v} \\ &\quad = \tfrac12(\vect{u} + \vect{v}) . \end{aligned} \]

The first step uses rules 7 and 6, the second rules 1, 2, 5 and 8, and the last rule 7 again.

For the two vectors of this lesson, \(\tfrac12\big((1, 2) + (3, 1)\big) = \tfrac12 (4, 3) = (2, 1.5)\). The midpoint is the average of the two vectors, coordinate by coordinate.

Summary card

Add tip to tail, scale along the line: in coordinates, both are done entry by entry.

The anchor figure again: on the left u, then v placed at its tip, with the sum running from the origin to (4, 3); on the right four parallel arrows showing minus u, one half u, u and 2 u.
M02.1.3-F1

Adding and scaling.

  • Add. \(\vect{u} + \vect{v} = (u_1 + v_1, \dots, u_n + v_n)\).
  • Scale. \(c\vect{v} = (c v_1, \dots, c v_n)\), and \(\norm{c\vect{v}} = \abs{c}\,\norm{\vect{v}}\).
  • Subtract. \(\vect{v} - \vect{u}\) runs from the tip of \(\vect{u}\) to the tip of \(\vect{v}\).
  • Eight rules. Each is a rule for numbers, applied in every coordinate.
  • Watch out. Lengths do not add: \(\norm{\vect{u} + \vect{v}}\) is usually less than \(\norm{\vect{u}} + \norm{\vect{v}}\).

Sources and next steps

Sources. Each was opened and checked against this lesson on 12 November 2026.

  • Sheldon Axler, Linear Algebra Done Right, 4th edition (open access). Section 1A defines addition (1.13) and scalar multiplication (1.18) coordinate by coordinate, proves commutativity from the commutativity of numbers (1.14), and describes the tip-to-tail picture of a sum. Section 1B, definition 1.20, lists the eight properties: commutativity, two forms of associativity, additive identity, additive inverse, multiplicative identity and two distributive properties.
  • Stephen Boyd and Lieven Vandenberghe, Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares (free PDF), Sections 1.2 and 1.3. The properties of vector addition and of scalar multiplication, each verified entry by entry, and the reading of \(\vect{p} - \vect{q}\) as the displacement from \(\vect{q}\) to \(\vect{p}\).
  • Grant Sanderson, Vectors, what even are they?, 3Blue1Brown, Linear Algebra, chapter 1. Adding as one movement after another, tip to tail, and the word scalar for a number that scales.
  • Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra, Section 2.1, Vectors. The parallelogram law, and \(\vect{v} - \vect{w}\) as the vector from the head of \(\vect{w}\) to the head of \(\vect{v}\).
  • Marc Peter Deisenroth, A. Aldo Faisal and Cheng Soon Ong, Mathematics for Machine Learning (free PDF). Section 7.1, equation (7.6), is the gradient-descent update of the frontier note. Chapter 2 opens with polynomials and audio signals as examples of vectors.

Next. M02.1.4 Data as vectors uses subtraction to measure how far apart two data points are. After that, module M02.2 combines scaling and adding into one operation, the linear combination.

This lesson unlocks

M02.1.4 Data as vectors M02.2.1 Linear combinations

Your progress is saved in this browser only. No account, no tracking.
Back to top