Level 5 · Mathematics M5.6

Vectors and matrices

Use vectors for position and direction, and matrices to move shapes and solve equations.

Add and subtract vectors, find their length and direction, and use them to prove that lines are parallel and to divide a line in a ratio. Work in three dimensions with i, j and k, use the scalar product to find angles and to test for right angles, and write lines as r = a + tb. Then add and multiply matrices, use matrices to turn, flip and enlarge shapes, read the area change from the determinant, and solve simultaneous equations with an inverse matrix.

You are ready for this book if

You can translate a shape on a grid by a column vector.

Written and drawn by attnom. Free to read, print and share.

M5.6.1 Chapter 1

Vectors: size and direction

How can one pair of numbers say how far to go and which way?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

Some quantities are only a size: a mass of 5 kg, a time of 12 s, a distance of 7 km. These are scalars. Others need a direction too. A move of 5 km is not enough to find where you end up. You need to know 5 km which way. A quantity with both a size and a direction is a vector.

You met vectors as slides in Level 4. A vector in a plane is written with two components: how far across (the x part) and how far up (the y part). In a picture we write them as a column. In a line of text we write them as (3, 2): the first number is across and the second is up. The word "vector" says that it is a move, so (3, 2) means 3 across and 2 up, not the point at (3, 2).

A grid with the x axis x and the y axis y. An arrow named a starts at the origin and ends at the point (3, 2). A dashed arrow runs along the x axis from the origin to (3, 0) and is labelled 3 across. A second dashed arrow runs up from (3, 0) to (3, 2) and is labelled 2 up.−112345−112340xya3 across2 up
The vector a is (3, 2): 3 across and 2 up. The two dashed arrows are its components.

A vector says how far to move. It does not say where to start. An arrow that starts at (0, 0) and an arrow that starts at (5, 1) are the same vector if they have the same components. So the arrows in a picture are only one drawing of it.

To add two vectors, join them head to tail. Draw a. Then draw b starting where a ends. The single move from the start of a to the end of b is the sum a + b. In components, add the across parts and add the up parts.

Draw it first

Adding two vectors

  1. A grid with the x axis x and the y axis y. Step 1 draws the arrow a from the origin to (3, 2). Step 2 draws the arrow b from the end of a to (4, 6). Step 3 draws the arrow a + b from the origin to (4, 6), closing the triangle.−1123456−112345670xya

    1 Draw a, which is (3, 2).

  2. A grid with the x axis x and the y axis y. Step 1 draws the arrow a from the origin to (3, 2). Step 2 draws the arrow b from the end of a to (4, 6). Step 3 draws the arrow a + b from the origin to (4, 6), closing the triangle.−1123456−112345670xyab

    2 From the end of a, draw b, which is (1, 4).

  3. A grid with the x axis x and the y axis y. Step 1 draws the arrow a from the origin to (3, 2). Step 2 draws the arrow b from the end of a to (4, 6). Step 3 draws the arrow a + b from the origin to (4, 6), closing the triangle.−1123456−112345670xyaba + b

    3 Draw the arrow from the start of a to the end of b. This is a + b = (4, 6).

Worked example

Find a + b and a − b when a = (3, 2) and b = (1, 4).

  1. Add the across parts and the up parts separately.
  2. a + b = (3 + 1, 2 + 4) = (4, 6).
  3. For a − b, subtract each part. The across part is 3 − 1 = 2.
  4. The up part is 2 − 4 = −2.
  5. So a − b = (2, −2).

Answer: a + b = (4, 6) and a − b = (2, −2).

The same two vectors can also be drawn from one point, as two sides of a parallelogram. The diagonal from that point is a + b, the same move as before. Because a + b and b + a land on the same corner, the order does not matter.

A grid with the x axis x and the y axis y. Two arrows start at the origin O. The arrow a ends at A, (4, 1), and the arrow b ends at B, (1, 3). Dashed arrows complete a parallelogram with its fourth corner at C, (5, 4). A solid arrow from O to C is labelled a + b.−1123456−11234560xyOABCaba + b
From O the vectors a and b make two sides of a parallelogram. Its diagonal OC is a + b = (5, 4).

Subtracting is adding the opposite. The vector −b has the same length as b and points the other way. So a − b = a + (−b). If a and b start at the same point, then a − b is the arrow from the end of b to the end of a. Check it: b + (a − b) lands on the end of a.

A grid with the x axis x and the y axis y. The arrows a, to (4, 3), and b, to (1, 4), start at the origin. A dashed arrow labelled a − b runs from the end of b to the end of a.−112345−1123450xyaba − b
With a and b drawn from the same point, a − b runs from the end of b to the end of a. Here it is (3, −1).

A number times a vector is a scalar multiple. In 2a each component is doubled, so the arrow is twice as long and points the same way. In −a each component changes sign, so the arrow is the same length and points the other way. In ½a the arrow is half as long. A vector that is a scalar multiple of another is parallel to it.

A grid with the x axis x and the y axis y. Three parallel arrows. The arrow a goes from the origin to (2, 1). The arrow 2a starts at (0, 2) and is twice as long. The arrow −a starts at (4, −1) and ends at (2, −2), the same length as a but pointing the other way.−112345−2−1123450xya2a−a
Three vectors in the same line of direction. 2a is twice as long as a. −a is the same length as a and points the other way.

Worked example

Find 3a − 2b when a = (2, −1) and b = (−1, 3).

  1. Multiply each vector by its number first.
  2. 3a = (3 × 2, 3 × (−1)) = (6, −3).
  3. 2b = (2 × (−1), 2 × 3) = (−2, 6).
  4. Subtract the across parts: 6 − (−2) = 8.
  5. Subtract the up parts: −3 − 6 = −9.
  6. So 3a − 2b = (8, −9).

Answer: The vector is (8, −9).

The length of a vector is also called its magnitude, written |a|. The components are the two short sides of a right angled triangle and the vector is the long side. So |(x, y)| = √(x² + y²). The signs vanish because squares are never negative.

A grid with the x axis x and the y axis y. An arrow named v runs from the origin to (-6, 8). A dashed arrow runs from the origin along the x axis to (-6, 0) and is labelled 6 left. A second dashed arrow runs up from (-6, 0) to the end of v and is labelled 8 up. The three arrows form a right angled triangle.−6−4−224680xyv6 left8 up
The vector v = (−6, 8) is the long side of a right angled triangle with short sides 6 and 8.

Worked example

Find |v| for v = (−6, 8), and then the vector of length 1 in the same direction.

  1. |v| = √((−6)² + 8²).
  2. (−6)² = 36 and 8² = 64.
  3. 36 + 64 = 100.
  4. The square root of 100 is 10, so |v| = 10.
  5. A vector of length 1 is a unit vector. Divide each component by 10.
  6. The unit vector is (−6 ÷ 10, 8 ÷ 10) = (−0.6, 0.8).

Answer: |v| = 10 and the unit vector is (−0.6, 0.8).

The direction of a vector is the angle it makes with the positive x axis, measured anticlockwise. Use tan θ = up ÷ across. A calculator gives an angle between −90° and 90°. So look at the signs of the components to find which quarter the vector points into, and adjust. Let α be the acute angle from tan α = |up| ÷ |across|. In the top right quarter the direction is α. In the top left it is 180° − α, since the angle is measured on from the positive x axis. In the bottom left it is 180° + α, and in the bottom right it is 360° − α.

Two arrows start at the point O. The arrow named x axis points right along the positive x axis. The arrow named v points up and to the left, with components -4 across and 3 up. The angle between them is marked and labelled 143.1°.143.1°x axisvO
v = (−4, 3) points into the top left quarter, so its direction is 180° − 36.9° = 143.1°.

Worked example

Find the direction of v = (−4, 3) as an angle from the positive x axis.

  1. The across part is −4, so v points left. The up part is 3, so v points up. It is in the top left quarter.
  2. The acute angle with the x axis has tan = 3 ÷ 4. Its size is 36.9°.
  3. Measured anticlockwise from the positive x axis, the angle is 180° − 36.9° = 143.1°.

Answer: 143.1°

See it three ways

With things

Stand in a field. Walk 3 paces east, then 2 paces north. Another person starts somewhere else and does the same walk. You both made the same move, so you made the same vector.

As a picture

A grid with the x axis x and the y axis y. An arrow named a runs from the origin to (3, 2), with dashed parts labelled 3 across and 2 up.−112345−112340xya3 across2 up

In words

A vector is a move with a size and a direction. It is written as an across part and an up part. Its length is found by Pythagoras.

In symbols

a = (3, 2), |a| = √(3² + 2²) ≈ 3.61.

Try it

Measure a vector on squared paper

You need: squared paper with squares 1 cm wide, a ruler, a pencil.

  1. Draw a point near the bottom left of the paper. Call it O.
  2. Draw the vector (3, 4). Go 3 squares across and 4 squares up, and draw an arrow from O to there.
  3. Measure the arrow with the ruler. Write the length in centimetres.
  4. Draw the vector (6, 8) in the same way and measure it. Then do (5, 12).

What you will see: Your lengths are 5 cm, 10 cm and 13 cm. The vector (6, 8) is twice (3, 4), so it is twice as long. Each length agrees with √(x² + y²).

If you cannot try it, this is what happens.
A table with the heads vector and length in cm. The rows read (3, 4) and 5, (6, 8) and 10, (5, 12) and 13.vectorlength in cm(3, 4)5(6, 8)10(5, 12)13

A wrong idea many people have

The length of a + b is the length of a plus the length of b.

Why it feels right: If you walk along a and then along b, the length you walk is |a| + |b|. It seems that the move should be that long.

The test that breaks it: Take a = (3, 0) and b = (0, 4). Then |a| + |b| = 3 + 4 = 7. But a + b = (3, 4), and |a + b| = √(9 + 16) = 5.

What is true: The move a + b goes straight from the start to the finish, so it is shorter than the walk along a and then b. In general |a + b| ≤ |a| + |b|. The two are equal only when a and b point the same way.

A wrong idea many people have

Two arrows in different places must be different vectors.

Why it feels right: They are drawn at different places on the page, and a point at (3, 2) is not the point at (5, 3).

The test that breaks it: Draw an arrow from (0, 0) to (3, 2) and another from (5, 1) to (8, 3). Both go 3 across and 2 up. Move one onto the other without turning it and they match.

What is true: A vector is a move, not a place. Arrows with the same components, the same length and the same direction are the same vector wherever they start.

Key words

vector
a quantity with a size and a direction, such as a move.
scalar
a quantity with a size only, such as a time or a mass.
component
one of the parts of a vector: how far across and how far up.
magnitude
the length of a vector, written |a|.
unit vector
a vector of length 1.
parallel
pointing the same way or the opposite way: one is a scalar multiple of the other.

Back to your guess

The answer is B: Walking 3 km east and then 4 km north puts you 5 km from the start.

The straight line back to the start is the long side of a right angled triangle with sides 3 km and 4 km. By Pythagoras it is √(9 + 16) = 5 km. Your walk is 7 km long, but the move from start to finish is a vector, and its size is 5 km.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. a = (2, 5) and b = (3, −1). What is a + b?

    Tap your answer.
    1. Not this one. You subtracted. For a + b, add the across parts and add the up parts. Read this page again. Try another.

    2. Not this one. You added the size of the last part instead of its value. The up part of b is −1, so 5 + (−1) is 4. Read this page again. Try another.

    3. Yes, that is right. Add the across parts: 2 + 3 = 5. Add the up parts: 5 + (−1) = 4. So a + b = (5, 4).

    4. Not this one. You added across parts to up parts. Add across to across and up to up. Read this page again. Try another.

    See the answer

    (5, 4)

    Add the across parts: 2 + 3 = 5. Add the up parts: 5 + (−1) = 4. So a + b = (5, 4).

    • If you chose A: You subtracted. For a + b, add the across parts and add the up parts. Read this page again.
    • If you chose B: You added the size of the last part instead of its value. The up part of b is −1, so 5 + (−1) is 4. Read this page again.
    • If you chose D: You added across parts to up parts. Add across to across and up to up. Read this page again.
  2. p = (4, −3) and q = (−2, 5). What is 2p − q?

    Tap your answer.
    1. Yes, that is right. 2p = (8, −6). Then 2p − q = (8 − (−2), −6 − 5) = (10, −11).

    2. Not this one. You added q. The sign in 2p − q means subtract q, so change the sign of each part of q. Read this page again. Try another.

    3. Not this one. You doubled both p and q. The 2 multiplies p only. Read this page again. Try another.

    4. Not this one. You doubled q instead of p. Work out 2p first. Read this page again. Try another.

    See the answer

    (10, −11)

    2p = (8, −6). Then 2p − q = (8 − (−2), −6 − 5) = (10, −11).

  3. What is |v| for v = (−7, 24)?

    Tap your answer.
    1. Not this one. You added the two parts. The length is the long side of a right angled triangle, so use Pythagoras. Read this page again. Try another.

    2. Not this one. You added the parts with their signs. The length uses squares, so the signs do not matter. Read this page again. Try another.

    3. Not this one. You squared and added but did not take the square root. That gives |v|², not |v|. Read this page again. Try another.

    4. Yes, that is right. |v| = √((−7)² + 24²) = √(49 + 576) = √625 = 25.

    See the answer

    25

    |v| = √((−7)² + 24²) = √(49 + 576) = √625 = 25.

    • If you chose A: You added the two parts. The length is the long side of a right angled triangle, so use Pythagoras. Read this page again.
    • If you chose B: You added the parts with their signs. The length uses squares, so the signs do not matter. Read this page again.
    • If you chose C: You squared and added but did not take the square root. That gives |v|², not |v|. Read this page again.
  4. ABCD is a parallelogram. AB = a and AD = b. Which vector is AC?

    A parallelogram ABCD on a grid with the x axis x and the y axis y. A is at (1, 1), B at (4, 2), C at (6, 5) and D at (3, 4). An arrow named a runs from A to B and an arrow named b runs from A to D.2462460xyABCDab
    Tap your answer.
    1. Not this one. That is DB, the other diagonal, which runs from D to B. Read this page again. Try another.

    2. Yes, that is right. Go from A to B, which is a, and then from B to C. BC is the same vector as AD, which is b. So AC = a + b. In components, AB = (3, 1) and AD = (2, 3), so AC = (5, 4).

    3. Not this one. That is BD, the other diagonal, which runs from B to D. Read this page again. Try another.

    4. Not this one. To go from A to C, go along AB once and then along BC once. BC is the same vector as AD, which is b. Read this page again. Try another.

    See the answer

    a + b

    Go from A to B, which is a, and then from B to C. BC is the same vector as AD, which is b. So AC = a + b. In components, AB = (3, 1) and AD = (2, 3), so AC = (5, 4).

    • If you chose A: That is DB, the other diagonal, which runs from D to B. Read this page again.
    • If you chose C: That is BD, the other diagonal, which runs from B to D. Read this page again.
    • If you chose D: To go from A to C, go along AB once and then along BC once. BC is the same vector as AD, which is b. Read this page again.
  5. What is the direction of v = (−3, 3), as an angle anticlockwise from the positive x axis?

    Tap your answer.
    1. Not this one. You found tan⁻¹(1) and ignored the signs. The vector points left and up, not right and up. Read this page again. Try another.

    2. Not this one. That is the direction of (3, −3), the opposite vector, which points down and right. Read this page again. Try another.

    3. Yes, that is right. v points left (−3) and up (3), into the top left quarter. The acute angle with the x axis is tan⁻¹(3 ÷ 3) = 45°. So the direction is 180° − 45° = 135°.

    4. Not this one. That is the direction of (−3, −3), which points down and left. Look at the sign of the up part: it is positive, so v points up. Read this page again. Try another.

    See the answer

    135°

    v points left (−3) and up (3), into the top left quarter. The acute angle with the x axis is tan⁻¹(3 ÷ 3) = 45°. So the direction is 180° − 45° = 135°.

    • If you chose A: You found tan⁻¹(1) and ignored the signs. The vector points left and up, not right and up. Read this page again.
    • If you chose B: That is the direction of (3, −3), the opposite vector, which points down and right. Read this page again.
    • If you chose D: That is the direction of (−3, −3), which points down and left. Look at the sign of the up part: it is positive, so v points up. Read this page again.
  6. Find the length of the vector (8, 15).

    See the answer

    17

    √(8² + 15²) = √289 = 17.

  7. a = (2, 1) and b = (−1, 3). Find 2a − 3b. Give your answer as (across, up).

    See the answer

    (7, −7)

    2a = (4, 2) and 3b = (−3, 9). Subtract the parts: (7, −7).

  8. Find the angle that the vector (5, 12) makes with the positive x axis, in degrees to 1 decimal place.

    See the answer

    67.4

    The vector points right and up, so the angle is tan⁻¹(12 ÷ 5) = tan⁻¹(2.4) ≈ 67.4°.

  9. a = (9, 0) and b = (0, 12). Which statement is true?

    Tap your answer.
    1. Not this one. You added the two lengths. The length of a sum is not the sum of the lengths, unless the vectors point the same way. Read this page again. Try another.

    2. Yes, that is right. a + b = (9, 12). Its length is √(9² + 12²) = √225 = 15.

    3. Not this one. You subtracted the lengths. Add the vectors first, then find the length of the sum. Read this page again. Try another.

    See the answer

    |a + b| = 15

    a + b = (9, 12). Its length is √(9² + 12²) = √225 = 15.

    • If you chose A: You added the two lengths. The length of a sum is not the sum of the lengths, unless the vectors point the same way. Read this page again.
    • If you chose C: You subtracted the lengths. Add the vectors first, then find the length of the sum. Read this page again.
  10. Find the direction of the vector (3, −4) as an angle anticlockwise from the positive x axis, to 1 decimal place.

    See the answer

    306.9

    The vector points right and down, into the bottom right quarter. The acute angle with the x axis is tan⁻¹(4 ÷ 3) ≈ 53.1°. So the direction is 360° − 53.1° = 306.9°.

Keep it

Copy this into your exercise book.

A vector has a size and a direction. Add head to tail, or part by part. Scalar multiples are parallel. |(x, y)| = √(x² + y²). The direction comes from tan θ = y ÷ x, and the quarter.

Draw: A triangle of two arrows a and b, head to tail, and the arrow a + b closing it.

M5.6.2 Chapter 2

Vectors in geometry

Can vectors prove a fact about a shape without measuring anything?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

In the last chapter a vector was a move. Now we use vectors to talk about points. Choose a fixed point O, the origin. The position vector of a point A is the vector OA, the move from O to A. We often write it as a lower case letter, so OA = a and OB = b. If A is the point (6, 2), then OA = (6, 2).

Two points A and B give a third vector, AB, the move from A to B. Go from A back to O, and then on to B: AB = AO + OB. The move AO is −a, so AB = −a + b = b − a. It is end minus start.

A grid with the x axis x and the y axis y. The points O, A and B are marked. The arrow a runs from O to A, (6, 2), and the arrow b runs from O to B, (2, 5). A dashed arrow labelled b − a runs from A to B.2462460xyOABabb − a
AB = b − a = (−4, 3). Always take the start point from the end point.

Worked example

The points A and B have position vectors a = (2, 5) and b = (−1, 9). Find the vector AB and the distance from A to B.

  1. The vector AB is the end point B minus the start point A: AB = b − a.
  2. AB = (−1 − 2, 9 − 5) = (−3, 4).
  3. The distance is |AB| = √((−3)² + 4²) = √25.
  4. The square root of 25 is 5. So the distance from A to B is 5.

Answer: AB = (−3, 4) and the distance is 5.

The midpoint M of AB is half way along AB. So OM = a + ½(b − a). Multiply out: OM = a + ½b − ½a = ½a + ½b. The position vector of the midpoint is half of the sum of the position vectors of the ends. For A = (6, 2) and B = (2, 8) the midpoint is ½(8, 10) = (4, 5).

A line cut into 2 equal parts. The points are named A, M and B. The two parts are each labelled 1 part. The text above the line reads AM : MB = 1 : 1.1 part1 partAMBAM : MB = 1 : 1
M is the midpoint of AB, so AM = MB. For A = (6, 2) and B = (2, 8), OM = (4, 5).

Now parallel lines. Two vectors are parallel when one is a scalar multiple of the other. If AB = k × CD for some number k, then the lines AB and CD are parallel. The number k also says how their lengths compare: |AB| = |k| × |CD|. If k is negative, they point in opposite directions.

This proves a famous fact. In a triangle OAB, let M be the midpoint of OA and N be the midpoint of OB. Then MN is parallel to AB and half as long. We prove it with vectors, with no measuring.

A grid with the x axis x and the y axis y. A triangle with corners O at the origin, A at (10, 0) and B at (2, 6). The point M is the midpoint of OA, and the point N is the midpoint of OB. A dashed arrow labelled MN joins M to N.2468102460xyOABMNMN
M and N are the midpoints of OA and OB. The dashed line MN looks parallel to AB, and half as long. The proof shows that it always is.

Worked example

In triangle OAB, OA = a and OB = b. M is the midpoint of OA and N is the midpoint of OB. Prove that MN is parallel to AB and half its length. Check with a = (10, 0) and b = (2, 6).

  1. Because M is the midpoint of OA, OM = ½a. Because N is the midpoint of OB, ON = ½b.
  2. Then MN = MO + ON = −½a + ½b = ½(b − a).
  3. But AB = b − a. So MN = ½AB.
  4. MN is a scalar multiple of AB, so MN is parallel to AB, and its length is half of |AB|.
  5. Check. AB = b − a = (−8, 6), and MN = ½ × (−8, 6) = (−4, 3).
  6. |AB| = 10 and |MN| = 5.

Answer: MN = ½AB, so MN is parallel to AB and half as long. In the check, |AB| = 10 and |MN| = 5.

Points are collinear when they lie on one straight line. Take three points A, B and C. If AB = k × BC, the two vectors are parallel, and they share the point B. So A, B and C are on one line. Parallel alone is not enough: two parallel lines that never meet have no shared point.

Worked example

Show that A(1, 2), B(4, 5) and C(10, 11) are collinear, but A, B and D(10, 12) are not.

  1. AB = (4 − 1, 5 − 2) = (3, 3).
  2. BC = (10 − 4, 11 − 5) = (6, 6).
  3. Each part of BC is 2 times the part of AB, so BC = 2AB.
  4. The vectors are parallel and share the point B, so A, B and C are collinear.
  5. For D: BD = (10 − 4, 12 − 5) = (6, 7).
  6. The across parts give a multiple of 2. The up parts give 7 ÷ 3, which is not 2. So BD is not a multiple of AB, and A, B and D are not collinear.

Answer: BC = 2AB, so A, B and C are collinear. BD is not a multiple of AB, so A, B and D are not.

Now dividing a line. The point P divides AB in the ratio m : n when AP : PB = m : n. Cut AB into m + n equal parts. P is m parts from A, so AP is the fraction m/(m + n) of AB. Then OP = a + m/(m + n) × (b − a). For m : n = 1 : 1 this gives the midpoint again.

A line cut into 5 equal parts. The points are named A, P and B. The piece from A to P is labelled 2 parts and the piece from P to B is labelled 3 parts. The text above the line reads AP : PB = 2 : 3.2 parts3 partsAPBAP : PB = 2 : 3
Five equal parts in all. P is 2 parts from A, so AP is two fifths of AB.

Worked example

A is the point (1, 2) and B is the point (11, 7). The point P divides AB in the ratio 2 : 3. Find the position vector of P.

  1. AB = b − a = (11 − 1, 7 − 2) = (10, 5).
  2. There are 2 + 3 = 5 equal parts. AP is 2 of them, so AP = 2/5 of AB.
  3. AP = 2/5 × (10, 5) = (4, 2).
  4. OP = OA + AP = (1, 2) + (4, 2).
  5. So the position vector of P is (5, 4).

Answer: The position vector of P is (5, 4).

Check the answer by going the other way. The point P here should be closer to A than to B, because 2 is less than 3. It is: P = (5, 4) lies 4 across from A, and B lies 10 across from A, so P is two fifths of the way. Mixing up the order of the ratio is the usual slip: the first number belongs to the part next to the first letter.

See it three ways

With things

A path runs from a well to a hut, 10 paces in all. Put a stone so that the part from the well is 2 paces for every 3 paces of the part to the hut. The stone is 4 paces from the well.

As a picture

A line cut into 5 equal parts. The points are named A, P and B. The piece from A to P is labelled 2 parts and the piece from P to B is labelled 3 parts.2 parts3 partsAPB

In words

P is two fifths of the way from A to B. Move from A by two fifths of the vector AB.

In symbols

OP = a + 2/5(b − a), which is the same as 3/5a + 2/5b.

Try it

Check the midpoint fact on squared paper

You need: squared paper with squares 1 cm wide, a ruler, a pencil.

  1. Mark O at the lower left of the paper. Mark A, 10 squares to the right of O. Mark B, 2 squares right of O and 6 squares up. Join O, A and B to make a triangle.
  2. Find the middle of OA and mark M. Find the middle of OB and mark N. Join M and N.
  3. Measure AB and MN with the ruler. Write the lengths in centimetres.
  4. Slide a ruler along MN. Check that it stays the same distance from AB.

What you will see: AB measures 10 cm and MN measures 5 cm. MN is half as long as AB, and the two lines stay the same distance apart: they are parallel.

If you cannot try it, this is what happens.
A table with the heads line and length in cm. The rows read AB and 10, MN and 5.linelength in cmAB10MN5

A wrong idea many people have

The vector AB is a − b.

Why it feels right: You read the letters in order, A then B. Taking a first and b second makes a − b look like AB.

The test that breaks it: Take A = (1, 1) and B = (4, 3). To move from A to B you go 3 across and 2 up, which is (3, 2). But a − b = (1 − 4, 1 − 3) = (−3, −2), and that moves from B back to A.

What is true: AB goes from A to B, so it is the end point minus the start point: AB = b − a. The vector a − b is BA, the same arrow pointing the other way.

A wrong idea many people have

If P divides AB in the ratio 2 : 3, then P is two thirds of the way from A to B.

Why it feels right: The number 2 is compared with 3, and the fraction two thirds also has a 2 over a 3.

The test that breaks it: Cut AB into equal parts. The ratio 2 : 3 needs 2 + 3 = 5 parts. P is 2 parts from A, and 3 parts are left to B. So AP is two of five parts, not two of three.

What is true: The fraction of the way is m/(m + n). For 2 : 3 it is two fifths. The bottom number is the total number of parts.

Key words

position vector
the vector from the origin O to a point. The position vector of A is OA.
midpoint
the point half way along a line. Its position vector is half of the sum of the position vectors of the ends.
collinear
lying on one straight line.
divides
P divides AB in the ratio m : n when AP : PB = m : n and P is on AB.
origin
the fixed point O from which position vectors are measured.

Back to your guess

The answer is A: If M is the midpoint of AB, then the vector OM is half of OA plus OB.

OM = ½(OA + OB). You go from O to A, then half of the way along AB. Because AB = OB − OA, this is OA + ½(OB − OA) = ½OA + ½OB. The midpoint is the average of the two position vectors.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. A is the point (−3, 2) and B is the point (6, 7). What is the vector AB?

    Tap your answer.
    1. Not this one. That is BA, the vector from B to A. AB is the end point minus the start point. Read this page again. Try another.

    2. Not this one. You added the position vectors. To find the move from A to B, subtract: end minus start. Read this page again. Try another.

    3. Not this one. You subtracted the across parts one way and the up parts the other way. Use end minus start for both. Read this page again. Try another.

    4. Yes, that is right. AB = b − a = (6 − (−3), 7 − 2) = (9, 5).

    See the answer

    (9, 5)

    AB = b − a = (6 − (−3), 7 − 2) = (9, 5).

    • If you chose A: That is BA, the vector from B to A. AB is the end point minus the start point. Read this page again.
    • If you chose B: You added the position vectors. To find the move from A to B, subtract: end minus start. Read this page again.
    • If you chose C: You subtracted the across parts one way and the up parts the other way. Use end minus start for both. Read this page again.
  2. M is the midpoint of AB, where A is (4, −2) and B is (10, 6). What is the position vector of M?

    Tap your answer.
    1. Yes, that is right. OM = ½(a + b) = ½(4 + 10, −2 + 6) = ½(14, 4) = (7, 2).

    2. Not this one. That is OA + OB. The midpoint is half of this. Read this page again. Try another.

    3. Not this one. That is half of AB, which is the move from A to M, not the position of M. Add it to a. Read this page again. Try another.

    4. Not this one. That is half of BA. The midpoint is the average of the two position vectors, so add them. Read this page again. Try another.

    See the answer

    (7, 2)

    OM = ½(a + b) = ½(4 + 10, −2 + 6) = ½(14, 4) = (7, 2).

    • If you chose B: That is OA + OB. The midpoint is half of this. Read this page again.
    • If you chose C: That is half of AB, which is the move from A to M, not the position of M. Add it to a. Read this page again.
    • If you chose D: That is half of BA. The midpoint is the average of the two position vectors, so add them. Read this page again.
  3. A is (−2, 1) and B is (8, 11). P divides AB in the ratio 3 : 2. What is the position vector of P?

    A line cut into 5 equal parts. The points are named A, P and B. The piece from A to P is labelled 3 parts and the piece from P to B is labelled 2 parts. The text above the line reads AP : PB = 3 : 2.3 parts2 partsAPBAP : PB = 3 : 2
    Tap your answer.
    1. Not this one. You used the ratio the wrong way round, so P is two fifths of the way from A. In 3 : 2, three parts are next to A. Read this page again. Try another.

    2. Yes, that is right. AB = (10, 10). AP = 3/5 of AB = (6, 6). So OP = (−2, 1) + (6, 6) = (4, 7).

    3. Not this one. That is the midpoint, which is the ratio 1 : 1. Read this page again. Try another.

    See the answer

    (4, 7)

    AB = (10, 10). AP = 3/5 of AB = (6, 6). So OP = (−2, 1) + (6, 6) = (4, 7).

    • If you chose A: You used the ratio the wrong way round, so P is two fifths of the way from A. In 3 : 2, three parts are next to A. Read this page again.
    • If you chose C: That is the midpoint, which is the ratio 1 : 1. Read this page again.
  4. AB = (6, −4) and CD = (9, −6). What can you say about the lines AB and CD?

    Tap your answer.
    1. Not this one. Perpendicular lines meet at a right angle. These vectors point the same way, so they are parallel. Read this page again. Try another.

    2. Not this one. The lengths are √52 and √117, so they differ. Parallel only says that the directions match. Read this page again. Try another.

    3. Not this one. A multiple tells us that the vectors are parallel. To be on the same line they would also need to share a point, which we do not know. Read this page again. Try another.

    4. Yes, that is right. Each part of CD is 1.5 times the matching part of AB, so CD = 1.5AB. One vector is a scalar multiple of the other, so the lines are parallel. They are not necessarily on one line, and they have different lengths.

    See the answer

    They are parallel.

    Each part of CD is 1.5 times the matching part of AB, so CD = 1.5AB. One vector is a scalar multiple of the other, so the lines are parallel. They are not necessarily on one line, and they have different lengths.

    • If you chose A: Perpendicular lines meet at a right angle. These vectors point the same way, so they are parallel. Read this page again.
    • If you chose B: The lengths are √52 and √117, so they differ. Parallel only says that the directions match. Read this page again.
    • If you chose C: A multiple tells us that the vectors are parallel. To be on the same line they would also need to share a point, which we do not know. Read this page again.
  5. From an earlier chapter

    What is the length of the vector (−5, 12)?

    Tap your answer.
    1. Not this one. You added the two parts. The length is the long side of a right angled triangle, so use Pythagoras. Go to M5.6.1. Try another.

    2. Not this one. You added the parts with their signs. The length uses the squares of the parts, so the signs do not matter. Go to M5.6.1. Try another.

    3. Yes, that is right. √((−5)² + 12²) = √(25 + 144) = √169 = 13.

    See the answer

    13

    √((−5)² + 12²) = √(25 + 144) = √169 = 13.

    • If you chose A: You added the two parts. The length is the long side of a right angled triangle, so use Pythagoras. Go to M5.6.1.
    • If you chose B: You added the parts with their signs. The length uses the squares of the parts, so the signs do not matter. Go to M5.6.1.
  6. The vector (4, 6) is parallel to the vector (6, k). Find k.

    See the answer

    9

    The across parts show that the second vector is 1.5 times the first. So k = 1.5 × 6 = 9.

  7. A is the point (−3, 4) and B is the point (7, 9). P divides AB in the ratio 2 : 3. Give the position vector of P as (across, up).

    See the answer

    (1, 6)

    AB = (10, 5), and AP = 2/5 of it = (4, 2). Then OP = (1, 6).

  8. OA = a = (4, 2) and OB = b = (2, 8). M is the midpoint of AB. Find OM as (across, up).

    See the answer

    (3, 5)

    OM = ½(a + b) = ½(6, 10) = (3, 5).

  9. The points A(2, 1), B(5, 3) and C(11, 7) are given. Are they on one straight line?

    Tap your answer.
    1. Yes, that is right. AB = (3, 2) and BC = (6, 4). BC is 2 times AB in both parts, and both vectors contain B, so A, B and C lie on one line.

    2. Not this one. Different vectors can still be parallel. What matters is whether one is a scalar multiple of the other. Read this page again. Try another.

    3. Not this one. Collinear points always have different coordinates. Compare the vectors AB and BC instead. Read this page again. Try another.

    4. Not this one. The lengths are √13 and √52, and they differ. Same length is not the test: a multiple is. Read this page again. Try another.

    See the answer

    Yes, because BC = 2AB and the vectors share the point B.

    AB = (3, 2) and BC = (6, 4). BC is 2 times AB in both parts, and both vectors contain B, so A, B and C lie on one line.

    • If you chose B: Different vectors can still be parallel. What matters is whether one is a scalar multiple of the other. Read this page again.
    • If you chose C: Collinear points always have different coordinates. Compare the vectors AB and BC instead. Read this page again.
    • If you chose D: The lengths are √13 and √52, and they differ. Same length is not the test: a multiple is. Read this page again.
  10. In triangle OAB, M is the midpoint of OA and N is the midpoint of OB. AB = (−16, 12). How long is MN?

    See the answer

    10

    MN = ½AB = (−8, 6). Its length is √((−8)² + 6²) = √100 = 10.

Keep it

Copy this into your exercise book.

AB = b − a: end minus start. Midpoint: ½(a + b). Parallel: one vector is k times the other. Collinear: AB = k BC, sharing B. Ratio m : n: OP = a + m/(m + n)(b − a).

Draw: A line AB cut into 5 equal parts, with P marked 2 parts from A.

M5.6.3 Chapter 3

Vectors in 3D

How do you describe a point and a move in a room, where there is up and down as well?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

A point on a page needs two numbers. A point in a room needs three. Stand in a corner of a room. The floor meets two walls in two lines, and the two walls meet in a third line that goes up. These three lines are the axes. We call them x, y and z, with z pointing up. A point has three coordinates (x, y, z): how far along the x axis, how far along the y axis and how high.

Three axes meet at the origin O. The z axis points up the page, the y axis points to the right and the x axis points down and to the left, towards the reader. The point P at (3, 4, 2) is the far corner of a box with one corner at O. Three dashed steps from O to P along the box edges are labelled 3, 4 and 2. Its edges run 3 along x, 4 along y and 2 up. The axes are named x, y and z.xyz342PO
The point P = (3, 4, 2) is 3 along x, 4 along y and 2 up. The x axis is drawn at half its true length, the usual way to draw space on paper. Read a point by following the dashed box edges back to the axes, not straight across.

The picture shows depth by drawing the x axis slanted and shorter. On paper you cannot show all three directions at true size, so measure with the numbers, never with a ruler. The three axes stand at right angles to each other. They are named so that, looking down from above, the x axis turns anticlockwise onto the y axis in the shortest way, a right handed set.

A vector in space has three components, (x, y, z): the move along x, along y and up. The unit vectors along the axes are i = (1, 0, 0), j = (0, 1, 0) and k = (0, 0, 1). Each has length 1. Every vector is a sum of multiples of them: (x, y, z) = xi + yj + zk.

Three axes named x, y and z meet at the origin. Three short bold arrows start at the origin, one along each axis. They are named i, j and k. The arrow i points along x, the arrow j along y and the arrow k up along z.xyzijk
The unit vectors i, j and k each have length 1. i points along x, j along y and k up along z.

So the position vector of the point (3, 4, 2) is OP = 3i + 4j + 2k. The word "position vector" means the same as in two dimensions: the move from the origin to the point.

Adding, subtracting and multiplying by a number work part by part, exactly as in the plane. The rules of the last two chapters still hold. AB = b − a. The midpoint has position vector ½(a + b). Two vectors are parallel when one is a multiple of the other.

Worked example

Find 2a − b when a = 3i − 2j + 4k and b = i + 5j − 3k.

  1. Work on each of the three parts, one at a time.
  2. The i part: 2 × 3 − 1 = 6 − 1 = 5.
  3. The j part: 2 × (−2) − 5 = −4 − 5 = −9.
  4. The k part: 2 × 4 − (−3) = 8 + 3 = 11.
  5. So 2a − b = 5i − 9j + 11k.

Answer: 5i − 9j + 11k

The length of a vector in space comes from Pythagoras used twice. Take the vector OP = (x, y, z). First go along the floor to the point below P. That path is the long side of a right angled triangle with sides x and y, so its length d has d² = x² + y². Then go up z. The vector OP is the long side of a second right angled triangle with sides d and z.

Three axes named x, y and z, and a box with one corner at the origin O and the opposite corner at P, (2, 3, 6). A solid arrow named OP joins O to P. Three dashed arrows go along the box edges from O to P, labelled 2, 3 and 6.xyzOP236P
The three edges 2, 3 and 6 lead from O to P. The diagonal OP is √(2² + 3² + 6²).

Put the two steps together: |OP|² = d² + z² = x² + y² + z². So the length of a vector in space is |(x, y, z)| = √(x² + y² + z²). For a distance from A to B, find the vector AB first, then its length.

Worked example

Find |OP| for P = (2, 3, 6), and find the distance between A(1, −2, 3) and B(5, 2, 5).

  1. |OP|² = 2² + 3² + 6² = 4 + 9 + 36 = 49.
  2. So |OP| = √49 = 7.
  3. For the distance, AB = b − a = (5 − 1, 2 − (−2), 5 − 3) = (4, 4, 2).
  4. |AB|² = 4² + 4² + 2² = 36.
  5. So the distance from A to B is √36 = 6.

Answer: |OP| = 7 and the distance AB is 6.

A box with the points A and B at opposite corners, and a solid arrow named AB joining them. The box has edges along the three axes. Three dashed arrows from A to B run along the edges and are labelled 4, 4 and 2.AB442AB
The move from A to B is made of three right angled steps: 4, 4 and 2. The distance is √(4² + 4² + 2²) = 6.

Dividing a line works the same way. The point P that divides AB in the ratio m : n has OP = a + m/(m + n)(b − a). Only the number of parts in each vector changes: there are three, not two.

Worked example

A is the point (2, −1, 3) and B is the point (11, 5, −3). P divides AB in the ratio 1 : 2. Find the position vector of P.

  1. AB = (11 − 2, 5 − (−1), −3 − 3) = (9, 6, −6).
  2. The total number of parts is 1 + 2 = 3, so AP = 1/3 of AB.
  3. AP = 1/3 × (9, 6, −6) = (3, 2, −2).
  4. OP = OA + AP = (2, −1, 3) + (3, 2, −2) = (5, 1, 1).

Answer: (5, 1, 1)

See it three ways

With things

Stand in the corner of a room. Walk 3 m along one wall, 4 m along the other wall, and then climb a ladder 2 m up. The place where you stand is the point (3, 4, 2).

As a picture

Three axes named x, y and z, and a box with one corner at the origin O and the opposite corner at the point P, (3, 4, 2). The edges of the box run 3 along x, 4 along y and 2 up. Three dashed steps from O to P along the edges are labelled 3, 4 and 2.xyz342PO

In words

A point in space has three coordinates. The vector from the origin to it has three parts, written with i, j and k.

In symbols

P = (3, 4, 2), OP = 3i + 4j + 2k, |OP| = √(3² + 4² + 2²) ≈ 5.39.

Try it

Measure the diagonal of a box

You need: a box with square corners, such as a shoe box or a tea box, a ruler, a piece of string.

  1. Measure the length, the width and the height of the box inside. Write them in centimetres.
  2. Work out √(length² + width² + height²) with a calculator.
  3. Lay the string from one inside bottom corner to the opposite top corner. Pinch the string where it reaches the corner.
  4. Lay the string along the ruler and read its length. Compare it with your answer.

What you will see: The string agrees with the calculation, to within a centimetre. For a box 8 cm by 12 cm by 24 cm, the diagonal is 28 cm.

If you cannot try it, this is what happens.
A table with the heads edges in cm and diagonal. The row reads 8, 12, 24 and 28.edges in cmdiagonal8, 12, 2428

A wrong idea many people have

The length of the vector (x, y, z) is x + y + z.

Why it feels right: You add the three moves to get the whole distance walked, and in one dimension that is right.

The test that breaks it: Take (2, 3, 6). Then x + y + z = 11. But a straight line from O to P is the diagonal of a box, and √(2² + 3² + 6²) = 7.

What is true: The length is the straight line from the start to the end, so it is the long side of a triangle. Square each part, add the squares, and take the square root.

A wrong idea many people have

In a picture of three axes, a ruler gives the true length along every axis.

Why it feels right: In a drawing on squared paper a ruler gives a true length. A picture of space looks as if it should do the same.

The test that breaks it: Look at the picture of the axes above. One unit along y is drawn 1 unit long. One unit along x is drawn about 0.35 across and 0.35 down, so its drawn length is only half a unit.

What is true: A picture of space keeps parallel lines parallel, and keeps lengths only along y and z. The angles at a corner are not true either. Always work from the coordinates and use the formulas, never a ruler on the picture.

Key words

axes
the three lines x, y and z that meet at the origin at right angles.
coordinates
the three numbers (x, y, z) that say where a point is.
unit vectors
i, j and k, the vectors of length 1 along the x, y and z axes.
right handed
the usual way to name the axes, with x turning onto y anticlockwise when you look down from the z axis.

Back to your guess

The answer is B: The longest straight rod that fits inside a box 3 m by 4 m by 12 m is 13 m long.

The floor of the box has a diagonal of √(3² + 4²) = 5 m. The rod then rises 12 m above the end of that diagonal. So it is the long side of a right angled triangle with sides 5 m and 12 m. Its length is √(25 + 144) = 13 m.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Write the vector (2, −3, 5) using i, j and k.

    Tap your answer.
    1. Yes, that is right. The first number goes with i, the second with j and the third with k: 2i, −3j and 5k. So the vector is 2i − 3j + 5k.

    2. Not this one. You lost the minus sign on the j part. The middle number is −3, so the j part is −3j. Read this page again. Try another.

    3. Not this one. You swapped the j and k parts. The middle number goes with j and the last with k. Read this page again. Try another.

    4. Not this one. You changed every sign, which makes the vector point the opposite way. Read this page again. Try another.

    See the answer

    2i − 3j + 5k

    The first number goes with i, the second with j and the third with k: 2i, −3j and 5k. So the vector is 2i − 3j + 5k.

    • If you chose B: You lost the minus sign on the j part. The middle number is −3, so the j part is −3j. Read this page again.
    • If you chose C: You swapped the j and k parts. The middle number goes with j and the last with k. Read this page again.
    • If you chose D: You changed every sign, which makes the vector point the opposite way. Read this page again.
  2. What is |v| for v = (1, 4, 8)?

    Tap your answer.
    1. Not this one. You added the three parts. The length is the diagonal of a box, so use √(x² + y² + z²). Read this page again. Try another.

    2. Not this one. You added the squares but did not take the square root. That is |v|², not |v|. Read this page again. Try another.

    3. Not this one. You left out the z part. The length uses all three parts: √(x² + y² + z²). Read this page again. Try another.

    4. Yes, that is right. |v| = √(1² + 4² + 8²) = √(1 + 16 + 64) = √81 = 9.

    See the answer

    9

    |v| = √(1² + 4² + 8²) = √(1 + 16 + 64) = √81 = 9.

    • If you chose A: You added the three parts. The length is the diagonal of a box, so use √(x² + y² + z²). Read this page again.
    • If you chose B: You added the squares but did not take the square root. That is |v|², not |v|. Read this page again.
    • If you chose C: You left out the z part. The length uses all three parts: √(x² + y² + z²). Read this page again.
  3. What is the distance between A(1, −3, 4) and B(3, 7, 15)?

    Tap your answer.
    1. Not this one. You added the three differences. The distance is the diagonal, so square the differences, add them and take the square root. Read this page again. Try another.

    2. Not this one. You added the position vectors. For a distance, subtract them to get AB first. Read this page again. Try another.

    3. Yes, that is right. AB = (2, 10, 11). |AB| = √(2² + 10² + 11²) = √225 = 15.

    See the answer

    15

    AB = (2, 10, 11). |AB| = √(2² + 10² + 11²) = √225 = 15.

    • If you chose A: You added the three differences. The distance is the diagonal, so square the differences, add them and take the square root. Read this page again.
    • If you chose B: You added the position vectors. For a distance, subtract them to get AB first. Read this page again.
  4. A box has edges 2 cm, 6 cm and 9 cm. How long is the diagonal from O to P?

    Three axes named x, y and z, and a box with one corner at the origin O and the opposite corner at P. A solid arrow named OP joins O to P. The edges of the box are 2 cm along x, 6 cm along y and 9 cm up.xyzOPPO
    Tap your answer.
    1. Not this one. You added the three edges. The diagonal cuts across the box, so it is shorter than that. Read this page again. Try another.

    2. Yes, that is right. OP = √(2² + 6² + 9²) = √(4 + 36 + 81) = √121 = 11 cm.

    3. Not this one. You did not take the square root. The sum of the squares is the diagonal squared. Read this page again. Try another.

    4. Not this one. You found the diagonal of the base only. The diagonal of the box also rises by the height. Read this page again. Try another.

    See the answer

    11 cm

    OP = √(2² + 6² + 9²) = √(4 + 36 + 81) = √121 = 11 cm.

    • If you chose A: You added the three edges. The diagonal cuts across the box, so it is shorter than that. Read this page again.
    • If you chose C: You did not take the square root. The sum of the squares is the diagonal squared. Read this page again.
    • If you chose D: You found the diagonal of the base only. The diagonal of the box also rises by the height. Read this page again.
  5. From an earlier chapter

    M is the midpoint of AB, where A is (2, −4) and B is (8, 6). What is the position vector of M?

    Tap your answer.
    1. Not this one. That is OA + OB. The midpoint is half of the sum. Go to M5.6.2. Try another.

    2. Yes, that is right. OM = ½(a + b) = ½(10, 2) = (5, 1).

    3. Not this one. That is half of AB, which is the move from A to M. The position vector of M adds it to a. Go to M5.6.2. Try another.

    See the answer

    (5, 1)

    OM = ½(a + b) = ½(10, 2) = (5, 1).

    • If you chose A: That is OA + OB. The midpoint is half of the sum. Go to M5.6.2.
    • If you chose C: That is half of AB, which is the move from A to M. The position vector of M adds it to a. Go to M5.6.2.
  6. Find the length of the vector (4, 5, 20).

    See the answer

    21

    √(4² + 5² + 20²) = √(16 + 25 + 400) = √441 = 21.

  7. A is the point (1, 2, −1). B is (9, 11, 11). How far is A from B?

    See the answer

    17

    AB = (8, 9, 12), so |AB| = √(64 + 81 + 144) = √289 = 17.

  8. a = (2, −1, 3) and b = (1, 4, −2). Find a + 2b as (i part, j part, k part).

    See the answer

    (4, 7, −1)

    2b = (2, 8, −4). Then a + 2b = (2 + 2, −1 + 8, 3 + (−4)) = (4, 7, −1).

  9. A is the point (−1, 4, 2) and B is the point (8, −2, 11). P divides AB in the ratio 2 : 1. Give the position vector of P as (x, y, z).

    See the answer

    (5, 0, 8)

    AB = (9, −6, 9). AP = 2/3 of it = (6, −4, 6). Then OP = (−1, 4, 2) + (6, −4, 6) = (5, 0, 8).

  10. a = 2i − 4j + 6k and b = −3i + 6j − 9k. What is true about a and b?

    Tap your answer.
    1. Not this one. Different numbers do not rule out parallel. Check whether every part of b is the same multiple of the matching part of a. Read this page again. Try another.

    2. Not this one. They are parallel, but the multiple is negative, so they point in opposite directions. Read this page again. Try another.

    3. Yes, that is right. Each part of b is −1.5 times the matching part of a, so b = −1.5a. A negative multiple points the other way.

    See the answer

    They are parallel and point in opposite directions.

    Each part of b is −1.5 times the matching part of a, so b = −1.5a. A negative multiple points the other way.

    • If you chose A: Different numbers do not rule out parallel. Check whether every part of b is the same multiple of the matching part of a. Read this page again.
    • If you chose B: They are parallel, but the multiple is negative, so they point in opposite directions. Read this page again.

Keep it

Copy this into your exercise book.

A point (x, y, z). i, j, k are the unit vectors. |(x, y, z)| = √(x² + y² + z²). Distance AB = |b − a|. Everything from the plane carries over with a third part.

Draw: A box with corner O and opposite corner P, and the diagonal OP. Write √(x² + y² + z²) beside it.

M5.6.4 Chapter 4

The scalar product

How can you find the angle between two arrows from their numbers alone?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

There are two ways to multiply vectors, and this chapter has the first. The scalar product of two vectors a and b is written a · b and said "a dot b". Multiply the matching parts and add the results. In a plane, a · b = a₁b₁ + a₂b₂. In space, there is a third term, a₃b₃. The answer is a single number, a scalar, not a vector.

Worked example

Find a · b for a = (3, 1) and b = (1, 2), and find (2, −1, 2) · (1, 2, 2).

  1. Multiply the matching parts: 3 × 1 = 3 and 1 × 2 = 2.
  2. Add them: 3 + 2 = 5. So a · b = 5.
  3. In space, there are three terms: 2 + (−2) + 4.
  4. The total is 4. So (2, −1, 2) · (1, 2, 2) = 4.

Answer: 5 and 4

The scalar product has a second form that gives angles. Draw a and b from one point. Let θ be the angle between them, with 0° ≤ θ ≤ 180°. Then a · b = |a||b| cos θ. Here is why. The two vectors and the vector a − b make a triangle. The cosine rule for it says |a − b|² = |a|² + |b|² − 2|a||b| cos θ.

A grid with the x axis x and the y axis y. A triangle with a corner at the origin. The arrow a runs from the origin to (4, 1) and the arrow b runs from the origin to (2, 3). A dashed arrow labelled a − b joins the end of b to the end of a. The three sides are a, b and a − b.−112345−112340xyaba − b
The vectors a and b and the vector a − b are the three sides of one triangle. The cosine rule works on this triangle.

Now work out |a − b|² a second way, from the parts: (a₁ − b₁)² + (a₂ − b₂)². Multiplying out, this is a₁² + a₂² + b₁² + b₂² − 2(a₁b₁ + a₂b₂), which is |a|² + |b|² − 2(a · b). The two results agree when 2|a||b| cos θ = 2(a · b). So a · b = |a||b| cos θ, and cos θ = (a · b) ÷ (|a||b|).

Worked example

Find the angle between a = (3, 1) and b = (1, 2).

  1. a · b = 3 × 1 + 1 × 2 = 5.
  2. |a| = √(3² + 1²) = √10, and |b| = √(1² + 2²) = √5.
  3. cos θ = 5 ÷ (√10 × √5) = 5 ÷ √50 ≈ 0.7071.
  4. θ = cos⁻¹(0.7071) ≈ 45°.

Answer: 45°

Two arrows start at the point O. The arrow named a points right and slightly up, to (3, 1). The arrow named b points up and to the right, to (1, 2). The angle between them is marked and labelled 45°.45°abO
The vectors (3, 1) and (1, 2) drawn from one point, with the angle 45° between them.

Always draw both vectors from the same point before you read an angle. If you put b at the end of a, the angle at the joint is not the angle between them. It is 180° minus the angle between them.

Worked example

Find the angle between a = (2, −1, 2) and b = (1, 2, 2).

  1. a · b = 2 + (−2) + 4 = 4.
  2. |a| = √(2² + (−1)² + 2²) = √9 = 3. Also |b| = √9 = 3.
  3. cos θ = 4 ÷ (3 × 3) = 4 ÷ 9.
  4. θ = cos⁻¹(4 ÷ 9) ≈ 63.6°.

Answer: 63.6°

Now look at the sign of a · b. Since |a| and |b| are positive, the sign of a · b is the sign of cos θ. A positive scalar product means an acute angle, below 90°. A negative one means an obtuse angle, above 90°. And a · b = 0 means cos θ = 0, so θ = 90°. Two non-zero vectors are perpendicular exactly when a · b = 0.

Two arrows start at the point O. The arrow named a points up and to the right, to (3, 2). The arrow named b points up and to the left, to (-2, 3). A small square marks the right angle between them, labelled 90°.90°abO
(3, 2) · (−2, 3) = −6 + 6 = 0, so the vectors are at right angles. The small square marks 90°.

Worked example

Find k so that (k, 3, 2) and (4, −2, −1) are perpendicular.

  1. The vectors are perpendicular when their scalar product is 0.
  2. (k, 3, 2) · (4, −2, −1) = 4k + 3 × (−2) + 2 × (−1).
  3. That is 4k − 6 − 2, which is 4k − 8.
  4. Set it equal to 0: 4k = 8.
  5. So k = 2.

Answer: k = 2

The scalar product has rules that you can check with numbers. It does not matter in which order: a · b = b · a. It spreads over a sum: a · (b + c) = a · b + a · c. A number can move in or out: (ma) · b = m(a · b). And a · a = |a|², because the angle between a vector and itself is 0° and cos 0° = 1.

The same idea gives the length of a shadow. Shine a torch straight down on a table. The shadow of the vector b on the line of a has length |b| cos θ. Since a · b = |a| × |b| cos θ, the shadow is (a · b) ÷ |a|. This length is the projection of b on a.

Two arrows start at the point O. The arrow named a points right and slightly up, to (4, 1). The arrow named b points up and to the right, to (2, 3). A dashed line drops from the end of b to the line of a and meets it at a right angle at the point F. The angle between a and b is labelled θ. The part of a from O to F is the shadow of b.θabOF
The shadow of b on a is OF. Its length is |b| cos θ = (a · b) ÷ |a| = 11 ÷ √17 ≈ 2.67.

Worked example

Find the length of the shadow of b = (2, 3) on the line of a = (4, 1).

  1. a · b = 4 × 2 + 1 × 3 = 11.
  2. |a| = √(4² + 1²) = √17, which is 4.123.
  3. The shadow is (a · b) ÷ |a| = 11 ÷ 4.123 ≈ 2.67.

Answer: 2.67

See it three ways

With things

Hold a pencil at a slant above a table and shine a torch straight down on it from above. Its shadow lies on the table. The more tilted the pencil is, the shorter the shadow, and a pencil standing upright has almost no shadow.

As a picture

Two arrows start at the point O. The arrow named a points right and slightly up, to (4, 1). The arrow named b points up and to the right, to (2, 3). A dashed line drops from the end of b to the line of a and meets it at a right angle at the point F. The angle between a and b is labelled θ.θabOF

In words

The scalar product is the length of a times the length of the shadow of b on a. It is zero when the shadow has no length, which happens when the vectors are at right angles.

In symbols

a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ.

Try it

Check the angle with a protractor

You need: squared paper, a ruler, a protractor, a pencil.

  1. Mark a point O near the left of the paper. Draw an arrow from O, 3 squares across and 1 up. Call it a.
  2. From O, draw a second arrow, 1 square across and 2 up. Call it b.
  3. Measure the angle between the two arrows with the protractor.
  4. Work out a · b, |a| and |b|, and then cos⁻¹ of a · b ÷ (|a||b|) with a calculator. Compare.

What you will see: The protractor reads 45°, and so does the calculation. The numbers alone were enough to find the angle.

If you cannot try it, this is what happens.
A table with the heads quantity and value. The rows read a · b and 5, |a||b| and 7.07, and angle and 45°.quantityvaluea · b5|a||b|7.07angle45°

A wrong idea many people have

The scalar product of two vectors is a vector.

Why it feels right: You are combining two vectors, and the sum or difference of two vectors is a vector.

The test that breaks it: Work out (3, 1) · (1, 2). You get 3 × 1 + 1 × 2 = 5. That is one number, with no direction.

What is true: The scalar product takes two vectors and gives a scalar. That is why it has "scalar" in its name. The answer has a size and a sign, and no direction.

A wrong idea many people have

To find the angle between two vectors, put one at the end of the other.

Why it feels right: This is how you add vectors, so the picture of two arrows joined end to end feels natural.

The test that breaks it: Take a = (1, 0) and b = (1, 1). They are 45° apart when drawn from one point. Joined head to tail, the path goes 1 across and then 1 across and 1 up, and the angle inside the corner is 135°, not 45°.

What is true: The angle between two vectors is measured with their tails together, as in the formula. If you join them head to tail, the angle at the corner is 180° minus the angle between them.

Key words

scalar product
a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ, a single number. Also called the dot product.
perpendicular
at right angles. Two non-zero vectors are perpendicular when their scalar product is 0.
projection
the length of the shadow of one vector on the line of another, (a · b) ÷ |a|.
acute
an angle below 90°, which has a positive scalar product.
obtuse
an angle between 90° and 180°, which has a negative scalar product.

Back to your guess

The answer is C: The vectors (2, 3) and (3, −2) are at right angles.

Multiply the across parts and the up parts, and add: 2 × 3 + 3 × (−2) = 0. A total of 0 is the sign of a right angle. This sum is called the scalar product, and it gives angles from numbers alone.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. What is (2, −3) · (4, 5)?

    Tap your answer.
    1. Not this one. You multiplied the matching parts but did not add them. The scalar product is a single number. Read this page again. Try another.

    2. Yes, that is right. 2 × 4 + (−3) × 5 = 8 + (−15) = −7.

    3. Not this one. You lost the minus sign. The two products are 8 and −15. The second is larger in size, so the total is negative. Read this page again. Try another.

    4. Not this one. You added all four numbers. Multiply the matching parts first: first with first, second with second. Read this page again. Try another.

    See the answer

    −7

    2 × 4 + (−3) × 5 = 8 + (−15) = −7.

    • If you chose A: You multiplied the matching parts but did not add them. The scalar product is a single number. Read this page again.
    • If you chose C: You lost the minus sign. The two products are 8 and −15. The second is larger in size, so the total is negative. Read this page again.
    • If you chose D: You added all four numbers. Multiply the matching parts first: first with first, second with second. Read this page again.
  2. What is the angle between (4, 3) and (1, 2), to 1 decimal place?

    Tap your answer.
    1. Yes, that is right. a · b = 10, |a| = 5 and |b| = √5 ≈ 2.236. cos θ = 10 ÷ (5 × 2.236) ≈ 0.8944, so θ ≈ 26.6°.

    2. Not this one. That is 90° minus the angle. You may have used sin instead of cos. Use cos θ = (a · b) ÷ (|a||b|). Read this page again. Try another.

    3. Not this one. That is cos θ. Take cos⁻¹ of it to get the angle. Read this page again. Try another.

    4. Not this one. The scalar product is not the angle. Divide it by |a||b|, and then take cos⁻¹. Read this page again. Try another.

    See the answer

    26.6°

    a · b = 10, |a| = 5 and |b| = √5 ≈ 2.236. cos θ = 10 ÷ (5 × 2.236) ≈ 0.8944, so θ ≈ 26.6°.

    • If you chose B: That is 90° minus the angle. You may have used sin instead of cos. Use cos θ = (a · b) ÷ (|a||b|). Read this page again.
    • If you chose C: That is cos θ. Take cos⁻¹ of it to get the angle. Read this page again.
    • If you chose D: The scalar product is not the angle. Divide it by |a||b|, and then take cos⁻¹. Read this page again.
  3. Which pair of vectors is perpendicular?

    Tap your answer.
    1. Not this one. The scalar product is −1, not 0, so these are not at right angles. Read this page again. Try another.

    2. Not this one. The scalar product is 20, not 0, so these are not at right angles. Read this page again. Try another.

    3. Not this one. The scalar product is 12, not 0, so these are not at right angles. Read this page again. Try another.

    4. Yes, that is right. (6, −4) · (2, 3) = 12 + (−12) = 0. A scalar product of 0 means the vectors are perpendicular. The other three pairs have scalar products −1, 20, 12.

    See the answer

    (6, −4) and (2, 3)

    (6, −4) · (2, 3) = 12 + (−12) = 0. A scalar product of 0 means the vectors are perpendicular. The other three pairs have scalar products −1, 20, 12.

    • If you chose A: The scalar product is −1, not 0, so these are not at right angles. Read this page again.
    • If you chose B: The scalar product is 20, not 0, so these are not at right angles. Read this page again.
    • If you chose C: The scalar product is 12, not 0, so these are not at right angles. Read this page again.
  4. The picture shows a = (4, 1) and b = (−2, 3) drawn from one point. Is a · b positive, zero or negative?

    Two arrows start at the point O. The arrow named a points right and slightly up, to (4, 1). The arrow named b points up and to the left, to (-2, 3). The angle between them is marked and labelled θ, and is more than a right angle.θabO
    Tap your answer.
    1. Not this one. A positive scalar product goes with an angle below 90°. This angle is larger than a right angle. Read this page again. Try another.

    2. Not this one. A scalar product of 0 goes with exactly 90°. The marked angle is larger than that. Read this page again. Try another.

    3. Yes, that is right. The angle θ is obtuse, and cos θ is negative for an obtuse angle. By the numbers, a · b = 4 × (−2) + 1 × 3 = −5.

    See the answer

    Negative

    The angle θ is obtuse, and cos θ is negative for an obtuse angle. By the numbers, a · b = 4 × (−2) + 1 × 3 = −5.

    • If you chose A: A positive scalar product goes with an angle below 90°. This angle is larger than a right angle. Read this page again.
    • If you chose B: A scalar product of 0 goes with exactly 90°. The marked angle is larger than that. Read this page again.
  5. From an earlier chapter

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

    Tap your answer.
    1. Not this one. You added the three parts. The length is the diagonal of a box, so use √(x² + y² + z²). Go to M5.6.3. Try another.

    2. Not this one. You did not take the square root. The sum of the squares is |v|². Go to M5.6.3. Try another.

    3. Yes, that is right. √(2² + (−3)² + 6²) = √(4 + 9 + 36) = √49 = 7.

    See the answer

    7

    √(2² + (−3)² + 6²) = √(4 + 9 + 36) = √49 = 7.

    • If you chose A: You added the three parts. The length is the diagonal of a box, so use √(x² + y² + z²). Go to M5.6.3.
    • If you chose B: You did not take the square root. The sum of the squares is |v|². Go to M5.6.3.
  6. Find (5, −2) · (3, 4).

    See the answer

    7

    5 × 3 + (−2) × 4 = 15 + (−8) = 7.

  7. The vectors (k, 6) and (3, −2) are perpendicular. Find k.

    See the answer

    4

    The scalar product must be 0: 3k + 6 × (−2) = 3k − 12 = 0. So 3k = 12 and k = 4.

  8. Find the angle between (2, 3, 6) and (1, −2, 2), in degrees to 1 decimal place.

    See the answer

    67.6

    a · b = 2 + (−6) + 12 = 8. |a| = 7 and |b| = 3. cos θ = 8 ÷ 21, so θ ≈ 67.6°.

  9. a · b = −8, |a| = 4 and |b| = 4. What is the angle between a and b?

    Tap your answer.
    1. Not this one. That is the angle for cos θ = +0.5. The scalar product is negative, so cos θ is negative and the angle is obtuse. Read this page again. Try another.

    2. Yes, that is right. cos θ = −8 ÷ (4 × 4) = −0.5. The angle with cosine −0.5 is 120°.

    3. Not this one. The cosine of this angle is not −0.5. Find cos θ = (a · b) ÷ (|a||b|), and then take cos⁻¹. Read this page again. Try another.

    See the answer

    120°

    cos θ = −8 ÷ (4 × 4) = −0.5. The angle with cosine −0.5 is 120°.

    • If you chose A: That is the angle for cos θ = +0.5. The scalar product is negative, so cos θ is negative and the angle is obtuse. Read this page again.
    • If you chose C: The cosine of this angle is not −0.5. Find cos θ = (a · b) ÷ (|a||b|), and then take cos⁻¹. Read this page again.

Keep it

Copy this into your exercise book.

a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ. cos θ = (a · b) ÷ (|a||b|). a · b = 0 means perpendicular. Positive means acute, negative means obtuse. Tails together.

Draw: Two arrows from one point with the angle θ between them, and a dashed shadow of one on the other.

M5.6.5 Chapter 5

Lines in vector form

How can one equation describe every point on a straight line, even in space?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

A line needs two things: one point on it, and a direction. In vectors, the point is a position vector a and the direction is a vector b. To reach any point of the line, start at a and then move along b by some multiple. The result is r = a + tb. Here r is the position vector of a point of the line, and t is a number called the parameter.

For each value of t you get one point. With t = 0 you are at a. With t = 1 you are at a + b. With t = −1 you go back to a − b. Every real number t gives a point, so the line goes on for ever in both directions. The vector b is the direction vector of the line.

A grid with the x axis x and the y axis y. A straight line runs up and to the right. Four points on it are named by their value of t: −1 at (-1, 1), 0 at (1, 2), 1 at (3, 3) and 2 at (5, 4). An arrow named a runs from the origin to the point at t = 0, and an arrow named b runs from that point to the point at t = 1.−2246240xy−1012ab
The line r = (1, 2) + t(2, 1). The position vector a gets us to the point at t = 0. Each step of b along the line adds 1 to t. The number beside each dot is its value of t.

To find the equation of a line through two points A and B, use A as the point and AB as the direction. The direction is B minus A, from the last chapter. Any point of the line can be used as a, and any multiple of AB can be used as b. So one line has many correct equations.

Worked example

Find the equation of the line through A(2, 1) and B(5, 5). Then find the point of the line with t = 2.

  1. The direction is AB = b − a = (5 − 2, 5 − 1) = (3, 4).
  2. Use A as the starting point. The line is r = (2, 1) + t(3, 4).
  3. Put t = 2: r = (2, 1) + 2(3, 4) = (2, 1) + (6, 8).
  4. So the point is (8, 9).

Answer: r = (2, 1) + t(3, 4) and the point is (8, 9).

In space, the line works in the same way with three parts in each vector. The equation r = a + tb is also written as three separate equations for x, y and z. For r = (x, y, z), a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), we have x = a₁ + tb₁, y = a₂ + tb₂ and z = a₃ + tb₃. To test whether a point is on the line, find the t from one part and check the other parts.

Worked example

A line passes through A(1, 2, 3) and B(4, 6, 15). Write its equation. Is the point (7, 10, 27) on it? Is (7, 10, 28)?

  1. The direction is AB = (4, 6, 15) − (1, 2, 3) = (3, 4, 12).
  2. The line is r = (1, 2, 3) + t(3, 4, 12).
  3. For the point (7, 10, 27), the x part gives 1 + 3t = 7, so t = 2.
  4. Check y: 2 + 4 × 2 = 10. Check z: 3 + 12 × 2 = 27. All three agree, so the point is on the line.
  5. For (7, 10, 28), the x and y parts still give t = 2. But z would be 27, not 28. So this point is not on the line.

Answer: r = (1, 2, 3) + t(3, 4, 12). The first point is on the line and the second is not.

Three axes named x, y and z. The points A, (1, 2, 3), and B, (4, 6, 15), are marked. A solid arrow named AB runs from A to B, in the direction of the line. Dashed lines drop from A and from B to the floor, which is the x y plane, a short dashed step runs from each foot back to the y axis, and short dashed lines carry the line on past B and past A.xyzABAB
The line through A and B in space. Its direction vector is AB = (3, 4, 12). The x axis is drawn at half its true length. The dashed lines drop to the floor, and a short step from each foot meets the y axis at that point's y value. The line goes on past A and B.

Now two lines. Write them with different letters for the parameters, say r = a + sb and r = c + td. A point is on both lines if the same position vector comes from some s and some t. Put the two expressions equal. This gives one equation for each part, which is two equations in s and t in a plane. Solve them, then put s into the first line to find the point.

A grid with the x axis x and the y axis y. Two straight lines named r₁ and r₂ cross at the point P, (5, 4). The line r₁ runs up and to the right. The line r₂ runs up and to the left.246810−224680xyr₁r₂P
The lines r₁ = (1, 2) + s(2, 1) and r₂ = (9, −2) + t(−2, 3) cross at P. The next example finds P.

Worked example

Find where r₁ = (1, 2) + s(2, 1) meets r₂ = (9, −2) + t(−2, 3).

  1. Put the two lines equal. The x parts give 1 + 2s = 9 − 2t.
  2. The y parts give 2 + s = −2 + 3t.
  3. From the y equation, s = 3t − 4.
  4. Put this into the x equation: 1 + 2(3t − 4) = 9 − 2t. Multiplying out, −7 + 6t = 9 − 2t.
  5. Collect the t terms: 8t = 16. So t = 2.
  6. Then s = 3 × 2 − 4 = 2.
  7. Put s = 2 into r₁: (1, 2) + 2(2, 1) = (5, 4). Check with r₂ and t = 2: the same point.

Answer: The lines meet at (5, 4).

In a plane, two lines either meet at one point, or are parallel and never meet. In space there is a third possibility. Two lines that are not parallel may still never meet. They are called skew lines, like a road and a bridge that crosses over it without touching. To test, solve two of the three equations for s and t, and then see whether the third equation is also true.

Worked example

r₁ = (1, 1, 1) + s(1, 2, 3). Do r₂ = (−1, 7, 5) + t(2, −1, 1) and r₃ = (−1, 7, 6) + t(2, −1, 1) meet r₁?

  1. For r₂, the x parts give 1 + s = −1 + 2t, so s = 2t − 2.
  2. The y parts give 1 + 2s = 7 − t. Put in s: −3 + 4t = 7 − t.
  3. So 5t = 10, which gives t = 2, and then s = 2 × 2 − 2 = 2.
  4. Check the z parts: 1 + 3 × 2 = 7, and 5 + 1 × 2 = 7. They agree, so r₁ and r₂ meet at (3, 5, 7).
  5. For r₃ the x and y equations are the same as for r₂, so again s = 2 and t = 2. The z parts are 7 and 8.
  6. 7 is not 8, so the third equation fails. The directions (1, 2, 3) and (2, −1, 1) are not multiples of each other, so r₁ and r₃ are not parallel. They are skew lines, and they never meet.

Answer: r₁ meets r₂ at (3, 5, 7). r₁ and r₃ never meet.

The angle between two lines is the angle between their direction vectors, which we find with the scalar product. If the scalar product is negative, the angle between the vectors is obtuse. Then the angle between the lines is 180° minus it, because we give the smaller angle. For r₁ and r₂ in the last example, the directions have a scalar product of 3, which is positive, so the angle between those two lines is acute.

Worked example

Find the acute angle between the lines with directions (3, 4, 0) and (0, 4, 3).

  1. The scalar product is 3 × 0 + 4 × 4 + 0 × 3 = 16.
  2. The lengths are √25 and √25.
  3. cos θ = 16 ÷ (√25 × √25) = 0.64.
  4. θ = cos⁻¹(0.64) ≈ 50.2°. This is acute, so it is the angle between the lines.

Answer: 50.2°

See it three ways

With things

Stand at a lamp post. Walk along a straight road in steps that each move you 2 m east and 1 m north. After t steps you are at the post plus t of those moves. A negative t means walking the other way, back past the post.

As a picture

A grid with the x axis x and the y axis y. A straight line runs up and to the right. Four points on it are named by their value of t: −1, 0, 1 and 2. An arrow named a runs from the origin to the point at t = 0, and an arrow named b runs from that point to the point at t = 1.−2246240xy−1012ab

In words

A line is a starting point plus any multiple of a direction. Every value of t gives one point, and a negative t goes backwards.

In symbols

r = a + tb. For example r = (1, 2) + t(2, 1).

Try it

Mark the points of a line

You need: squared paper, a ruler, a pencil.

  1. Draw an x axis and a y axis on the squared paper, with the origin near the left. Mark the point (1, 2).
  2. The direction is (2, 1). From (1, 2), move 2 squares across and 1 up, and mark the point. Move the same again, and mark it. Do it three times.
  3. Now go the other way from (1, 2): 2 squares left and 1 down. Mark that point too.
  4. Lay the ruler along the points. They lie on one straight line. Write each point beside its value of t.

What you will see: All the points are on one straight ruler line. The step "2 across and 1 up" is the direction b, and the number of steps from (1, 2) is the value of t.

If you cannot try it, this is what happens.
A table with the heads t and point. The rows read −1 and (−1, 1), 0 and (1, 2), 1 and (3, 3), 2 and (5, 4), 3 and (7, 5).tpoint−1(−1, 1)0(1, 2)1(3, 3)2(5, 4)3(7, 5)

A wrong idea many people have

A line has only one vector equation.

Why it feels right: We write the line as one formula, so it seems that the formula should be unique.

The test that breaks it: Take r = (1, 2) + s(2, 1). Put s = 1 to get the point (3, 3), and use it as a new start. Use (−4, −2) as the direction. Then r = (3, 3) + t(−4, −2). Every point is still on the same line: t = 0 gives (3, 3) and t = −1 gives (7, 5).

What is true: Any point on the line can be the starting point a, and any non-zero multiple of the direction can be b. So a line has many equations. To compare two equations, check that the directions are multiples and that one start point is on the other line.

A wrong idea many people have

If two lines in space do not meet, they must be parallel.

Why it feels right: In a plane, two lines that do not meet are parallel, so the same seems true in space.

The test that breaks it: Take r₁ = (1, 1, 1) + s(1, 2, 3) and r₃ = (−1, 7, 6) + t(2, −1, 1). The directions (1, 2, 3) and (2, −1, 1) are not multiples of each other, so the lines are not parallel. But the example above showed that they never meet.

What is true: In space, two lines that never meet are either parallel or skew. Parallel lines have directions that are multiples. Skew lines have directions that are not.

Key words

parameter
the number t in r = a + tb. Each value of t gives one point of the line.
direction vector
the vector b in r = a + tb, which gives the direction of the line.
skew lines
lines in space that are not parallel and never meet.
vector equation
an equation r = a + tb that gives the position vector of every point of a line.

Back to your guess

The answer is B: The point (3, 5) lies on the line r = (1, 2) + t(2, 3), for some value of t.

Put t = 1. Then r = (1, 2) + (2, 3) = (3, 5). Each value of t gives one point of the line. Try t = 0 for the starting point (1, 2), and t = 2 for (5, 8).

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Which equation is the line through A(3, 1) and B(7, 4)?

    Tap your answer.
    1. Not this one. You used B as the direction. The direction vector is AB = b − a, not the position vector of B. Read this page again. Try another.

    2. Yes, that is right. The direction is AB = (7, 4) − (3, 1) = (4, 3). Starting from A, the line is r = (3, 1) + t(4, 3).

    3. Not this one. You used A as the direction. The direction of the line is the vector AB, not the position vector of A. Read this page again. Try another.

    4. Not this one. The direction (4, 3) is right, but the start point is not on the line. The point (10, 5) is a + b, which is not A and not B. Read this page again. Try another.

    See the answer

    r = (3, 1) + t(4, 3)

    The direction is AB = (7, 4) − (3, 1) = (4, 3). Starting from A, the line is r = (3, 1) + t(4, 3).

    • If you chose A: You used B as the direction. The direction vector is AB = b − a, not the position vector of B. Read this page again.
    • If you chose C: You used A as the direction. The direction of the line is the vector AB, not the position vector of A. Read this page again.
    • If you chose D: The direction (4, 3) is right, but the start point is not on the line. The point (10, 5) is a + b, which is not A and not B. Read this page again.
  2. Which point is on the line r = (2, −1, 3) + t(1, 4, −2)?

    Tap your answer.
    1. Yes, that is right. Put t = 2: (2, −1, 3) + 2(1, 4, −2) = (2, −1, 3) + (2, 8, −4) = (4, 7, −1).

    2. Not this one. The x and y parts fit t = 2, but the z part does not. All three parts must give the same t. Read this page again. Try another.

    3. Not this one. The x and y parts fit t = 1, but the z part of the point at t = 1 is 1, not 5. The sign of the z part of the direction was lost. Read this page again. Try another.

    4. Not this one. You used only the direction. The line starts at a, so the point is a plus a multiple of b. Read this page again. Try another.

    See the answer

    (4, 7, −1)

    Put t = 2: (2, −1, 3) + 2(1, 4, −2) = (2, −1, 3) + (2, 8, −4) = (4, 7, −1).

    • If you chose B: The x and y parts fit t = 2, but the z part does not. All three parts must give the same t. Read this page again.
    • If you chose C: The x and y parts fit t = 1, but the z part of the point at t = 1 is 1, not 5. The sign of the z part of the direction was lost. Read this page again.
    • If you chose D: You used only the direction. The line starts at a, so the point is a plus a multiple of b. Read this page again.
  3. Which vector is a direction vector of the line r = (2, 5) + t(4, −6)?

    Tap your answer.
    1. Yes, that is right. Any non-zero multiple of (4, −6) is a direction vector. Half of it is (2, −3), which points the same way.

    2. Not this one. This swaps the two parts of the direction. It points a different way. Read this page again. Try another.

    3. Not this one. This is the starting point, not the direction. Read this page again. Try another.

    See the answer

    (2, −3)

    Any non-zero multiple of (4, −6) is a direction vector. Half of it is (2, −3), which points the same way.

  4. The picture shows a point A and an arrow d. Which equation is the line through A in the direction d?

    A grid with the x axis x and the y axis y. The point A is at (2, 1). An arrow named d starts at A and ends at (4, 4).−1123456−11234560xyAd
    Tap your answer.
    1. Not this one. This starts at the end of d and uses the position of A as the direction. Start at A, and use d as the direction. Read this page again. Try another.

    2. Not this one. You used the end point of the arrow as the direction. The direction is d, the change from A to the end. Read this page again. Try another.

    3. Yes, that is right. A is (2, 1) and the arrow d goes from A to (4, 4), which is (2, 3) more. So the line is r = (2, 1) + t(2, 3).

    4. Not this one. You swapped the parts of A. The point A is (2, 1), with 2 across and 1 up. Read this page again. Try another.

    See the answer

    r = (2, 1) + t(2, 3)

    A is (2, 1) and the arrow d goes from A to (4, 4), which is (2, 3) more. So the line is r = (2, 1) + t(2, 3).

    • If you chose A: This starts at the end of d and uses the position of A as the direction. Start at A, and use d as the direction. Read this page again.
    • If you chose B: You used the end point of the arrow as the direction. The direction is d, the change from A to the end. Read this page again.
    • If you chose D: You swapped the parts of A. The point A is (2, 1), with 2 across and 1 up. Read this page again.
  5. From an earlier chapter

    What is (3, −1, 2) · (2, 4, 5)?

    Tap your answer.
    1. Not this one. You multiplied the matching parts but did not add them. The scalar product is a single number. Go to M5.6.4. Try another.

    2. Yes, that is right. 3 × 2 + (−1) × 4 + 2 × 5 = 6 + (−4) + 10 = 12.

    3. Not this one. Check the sign of the middle product, (−1) × 4 = −4. Add the three products: 6, −4 and 10. Go to M5.6.4. Try another.

    See the answer

    12

    3 × 2 + (−1) × 4 + 2 × 5 = 6 + (−4) + 10 = 12.

    • If you chose A: You multiplied the matching parts but did not add them. The scalar product is a single number. Go to M5.6.4.
    • If you chose C: Check the sign of the middle product, (−1) × 4 = −4. Add the three products: 6, −4 and 10. Go to M5.6.4.
  6. Find the point on r = (4, −1, 2) + t(3, 2, −1) when t = 3. Give it as (x, y, z).

    See the answer

    (13, 5, −1)

    (4, −1, 2) + 3(3, 2, −1) = (4, −1, 2) + (9, 6, −3) = (13, 5, −1).

  7. The lines r = (0, 1) + s(1, 2) and r = (5, 1) + t(−1, 3) meet at one point. Find it, as (x, y).

    See the answer

    (3, 7)

    Equating the x parts and the y parts gives s = 3 and t = 2. The point is (3, 7).

  8. r₁ = (2, 1, 0) + s(1, 2, 1) and r₂ = (3, 7, 1) + t(1, −2, 2). Which statement is true?

    Tap your answer.
    1. Not this one. The x and y parts agree at s = 2 and t = 1, but the z parts do not: 2 and 3. So the lines do not meet. Read this page again. Try another.

    2. Not this one. Parallel lines have directions that are multiples. Here (1, 2, 1) and (1, −2, 2) are not. Read this page again. Try another.

    3. Yes, that is right. The directions are not multiples of each other, so the lines are not parallel. Solving the x and y equations gives s = 2 and t = 1, but then the z parts are 2 and 3, which are different. So the lines never meet, and they are skew.

    See the answer

    The lines are skew.

    The directions are not multiples of each other, so the lines are not parallel. Solving the x and y equations gives s = 2 and t = 1, but then the z parts are 2 and 3, which are different. So the lines never meet, and they are skew.

    • If you chose A: The x and y parts agree at s = 2 and t = 1, but the z parts do not: 2 and 3. So the lines do not meet. Read this page again.
    • If you chose B: Parallel lines have directions that are multiples. Here (1, 2, 1) and (1, −2, 2) are not. Read this page again.
  9. The point (k, 11, −1) is on the line r = (1, 3, −5) + t(2, 4, 2). Find k.

    See the answer

    5

    The z part gives −5 + 2t = −1, so t = 2. Then k = 1 + 2 × 2 = 5.

Keep it

Copy this into your exercise book.

Line: r = a + tb, with a a point and b a direction. Through A and B: b = AB. Meeting: equate parts, solve for s and t, then check every part. Skew: not parallel and no meeting.

Draw: A line with the points t = −1, 0, 1 and 2 marked, and the arrows a and b.

M5.6.6 Chapter 6

Matrices

How can a table of numbers do the work of many sums at once?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

A matrix is a rectangle of numbers in brackets. The numbers are its entries. A matrix with m rows and n columns has order m × n, said "m by n". Rows come first. The matrix below has 2 rows and 3 columns, so its order is 2 × 3. A vector written as a column is a matrix with one column.

A matrix named A with two rows and three columns. The first row reads 3, −1, 2 and the second row reads 0, 4, 5. The matrix is named A.3−12045A
A has 2 rows and 3 columns, so A is a 2 × 3 matrix. The entry in row 1, column 3 is 2.

To add two matrices, add the entries that stand in the same place. This only works if the two matrices have the same order. To subtract, subtract place by place. To multiply a matrix by a number, multiply every entry by it.

A sum of two matrices. A has first row 3, −1 and second row 0, 4. B has first row 1, 2 and second row 6, −3. The result A + B has first row 4, 1 and second row 6, 1. The matrices are named A, B and A + B.3−104A+126−3B=4161A + B
Each entry of A + B is the sum of the two entries in the same place. For example, −1 + 2 = 1 in the top right.

Worked example

A has rows (3, −1, 2) and (0, 4, 5) and B has rows (1, 2, −4) and (6, −3, 0). Find 2A − B.

  1. A and B both have order 2 × 3, so the sum or difference exists.
  2. 2A multiplies every entry of A by 2: 2A has rows (6, −2, 4) and (0, 8, 10).
  3. Subtract B place by place. Top row: 6 − 1 = 5, −2 − 2 = −4, 4 − (−4) = 8.
  4. Bottom row: 0 − 6 = −6, 8 − (−3) = 11, 10 − 0 = 10.
  5. So 2A − B has rows (5, −4, 8) and (−6, 11, 10).

Answer: The matrix has rows (5, −4, 8) and (−6, 11, 10).

Multiplying two matrices is different. To find the entry in row i and column j of the product AB, take row i of A and column j of B. Multiply the first entries, then the second entries, and so on, and add the results. This is the same as the scalar product of the row and the column.

A product of two matrices. A has first row 1, 2 and second row 3, 4, and its first row is ringed with a dashed line. B has first row 2, 0 and second row 1, 5, and its second column is ringed. The product AB has first row 4, 10 and second row 10, 20, with the top right entry ringed. The matrices are named A, B and AB.1234A×2015B=4101020AB
Row 1 of A and column 2 of B give the entry in row 1, column 2 of AB: 1 × 0 + 2 × 5 = 10.

Worked example

A has rows (1, 2) and (3, 4) and B has rows (2, 0) and (1, 5). Find AB and BA.

  1. AB, top left: row 1 of A times column 1 of B. 1 × 2 + 2 × 1 = 4.
  2. AB, top right: row 1 of A times column 2 of B. 1 × 0 + 2 × 5 = 10.
  3. AB, bottom left: 3 × 2 + 4 × 1 = 10. AB, bottom right: 3 × 0 + 4 × 5 = 20.
  4. So AB has rows (4, 10) and (10, 20).
  5. For BA, put B first: top left 2 × 1 + 0 × 3 = 2, and top right 2 × 2 + 0 × 4 = 4.
  6. Bottom left 1 × 1 + 5 × 3 = 16, and bottom right 1 × 2 + 5 × 4 = 22.
  7. So BA has rows (2, 4) and (16, 22). AB and BA are different.

Answer: AB has rows (4, 10) and (10, 20). BA has rows (2, 4) and (16, 22).

Because AB depends on the order, we say that matrix multiplication is not commutative. Worse, the product may not exist at all. For row i of A to meet column j of B, they must have the same length. So the number of columns of A must equal the number of rows of B. If A is m × n and B is n × p, then AB is m × p.

Worked example

P has rows (1, 0, 2) and (3, 1, −1) and Q has rows (2, 1) and (0, 3) and (1, −2). Find PQ, and say whether QP exists.

  1. P is 2 × 3 and Q is 3 × 2. The inner numbers are both 3, so PQ exists. Its order is 2 × 2, the outer numbers.
  2. Top left: row 1 of P times column 1 of Q. 1 × 2 + 0 × 0 + 2 × 1 = 4.
  3. Top right: 1 × 1 + 0 × 3 + 2 × (−2) = −3.
  4. Bottom left: 3 × 2 + 1 × 0 + (−1) × 1 = 5. Bottom right: 3 × 1 + 1 × 3 + (−1) × (−2) = 8.
  5. So PQ has rows (4, −3) and (5, 8).
  6. For QP, Q is 3 × 2 and P is 2 × 3. The inner numbers are both 2, so QP exists too. But its order is 3 × 3, so QP is a different size from PQ.

Answer: PQ has rows (4, −3) and (5, 8). QP exists and is 3 × 3.

Some rules do hold. Multiplication is associative: (AB)C = A(BC). It spreads over addition: A(B + C) = AB + AC. And there is a matrix that does nothing, the identity matrix I, with 1s on the diagonal from the top left and 0s elsewhere. For a 2 × 2 matrix it has rows (1, 0) and (0, 1). Then A × I = I × A = A, as 1 does for numbers.

A product of two matrices. The first is A with first row 3, 1 and second row 2, 5. The second is the identity matrix I with first row 1, 0 and second row 0, 1. The result is A again. The matrices are named A, I and A.3125A×1001I=3125A
Multiplying by the identity matrix I leaves A as it was.

A 2 × 2 matrix times a column vector is the same rule, with a column that has just one column. Row 1 of the matrix times the vector gives the top number, and row 2 times the vector gives the bottom number. The result is a new vector. In the next chapter, this is how a matrix moves points.

Worked example

Find the vector made by the matrix with rows (2, −1) and (3, 4) acting on the vector (5, 2).

  1. Top number: row 1 times the vector. 2 × 5 + (−1) × 2 = 8.
  2. Bottom number: row 2 times the vector. 3 × 5 + 4 × 2 = 23.
  3. The new vector is (8, 23).

Answer: (8, 23)

See it three ways

With things

A seller packs two kinds of basket. A small one holds 2 mangoes and 1 papaya. A large one holds 4 mangoes and 3 papayas. On the first day, 3 small and 1 large basket are ordered. On the second day, 2 small and 4 large are ordered. How many fruits go out each day?

As a picture

A product of two matrices. The orders matrix has first row 3, 1 and second row 2, 4. The baskets matrix has first row 2, 1 and second row 4, 3. The result has first row 10, 6 and second row 20, 14. The matrices are named orders, baskets and fruit.3124orders×2143baskets=1062014fruit

In words

Each row of the orders matrix is a day. Each column of the baskets matrix is a kind of fruit. Row by column gives the fruit for each day. Day 1: 3 × 2 + 1 × 4 = 10 mangoes, and 6 papayas.

In symbols

The columns of orders match the rows of baskets, so the product exists. The first column of the answer is mangoes and the second is papayas.

Try it

Multiply with two strips of paper

You need: paper, a pencil, two strips of card or a ruler.

  1. Write A with rows (1, 2) and (3, 4), and B with rows (2, 0) and (1, 5), side by side on the paper.
  2. Put one strip under row 1 of A, and another strip beside column 2 of B. These choose the row and the column.
  3. Multiply the first entries and the second entries of what the strips show, and add. This gives the top right entry of AB.
  4. Move the strips to each other row and column to fill in all four entries.

What you will see: The four entries are 4, 10, 10 and 20. Every entry used one row and one column, so the strips cannot go wrong.

If you cannot try it, this is what happens.
A product of two matrices. A has first row 1, 2 and second row 3, 4, and its second row is ringed with a dashed line. B has first row 2, 0 and second row 1, 5, and its first column is ringed. The product AB has first row 4, 10 and second row 10, 20, with the bottom left entry ringed. The matrices are named A, B and AB.1234A×2015B=4101020AB

A wrong idea many people have

AB is the same as BA.

Why it feels right: With numbers, 3 × 5 and 5 × 3 are the same, so multiplication seems free of order.

The test that breaks it: Take A with rows (1, 2) and (3, 4) and B with rows (2, 0) and (1, 5). The top left entry of AB is 1 × 2 + 2 × 1 = 4. The top left entry of BA is 2 × 1 + 0 × 3 = 2. They differ.

What is true: Matrix multiplication depends on the order. Sometimes AB = BA, but you must not assume it. Write products in the order given, and in an equation, multiply on the same side of both sides.

A wrong idea many people have

To multiply two matrices, multiply the entries in the same places.

Why it feels right: Addition works place by place, so multiplication seems to do the same.

The test that breaks it: Multiply place by place for the matrices above. The top right entry would be 2 × 0 = 0. But the row by column rule gives 10, which is what is needed to represent combined sums, as in the basket story.

What is true: The entry in row i and column j of AB is row i of A times column j of B, added up. Place by place multiplication is a different operation and is not the matrix product.

Key words

matrix
a rectangle of numbers in rows and columns.
order
the size of a matrix: m × n means m rows and n columns.
entry
one number inside a matrix.
identity matrix
the square matrix I with 1s on the diagonal and 0s elsewhere. A × I = I × A = A.
not commutative
the order matters: AB is often not equal to BA.

Back to your guess

The answer is B: If A has rows (1, 2) and (3, 4) and B has rows (0, 1) and (1, 0), then AB and BA are different matrices.

AB has rows (2, 1) and (4, 3), which is A with its columns swapped. BA has rows (3, 4) and (1, 2), which is A with its rows swapped. They differ. Matrices multiply by a row by column rule that depends on the order, and this chapter shows the rule.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. A has rows (1, −2) and (3, 0) and B has rows (4, 5) and (−1, 2). What is A + B?

    Tap your answer.
    1. Not this one. You multiplied the matrices. The sign asks for a sum, so add the entries in the same places. Read this page again. Try another.

    2. Yes, that is right. Add the entries place by place: 1 + 4, −2 + 5, 3 + (−1) and 0 + 2. The sum has rows (5, 3) and (2, 2).

    3. Not this one. You subtracted. The sign is +, so add the entries in the same places. Read this page again. Try another.

    4. Not this one. The bottom left entry is wrong. Check it again: 3 + (−1). Read this page again. Try another.

    See the answer

    rows (5, 3) and (2, 2)

    Add the entries place by place: 1 + 4, −2 + 5, 3 + (−1) and 0 + 2. The sum has rows (5, 3) and (2, 2).

    • If you chose A: You multiplied the matrices. The sign asks for a sum, so add the entries in the same places. Read this page again.
    • If you chose C: You subtracted. The sign is +, so add the entries in the same places. Read this page again.
    • If you chose D: The bottom left entry is wrong. Check it again: 3 + (−1). Read this page again.
  2. A has order 2 × 3 and B has order 3 × 4. Which statement is true?

    Tap your answer.
    1. Not this one. The order of AB is the outer numbers, 2 and 4, not the inner numbers. Read this page again. Try another.

    2. Not this one. The columns of A (3) match the rows of B (3), so AB can be found. Read this page again. Try another.

    3. Yes, that is right. For AB, A has 3 columns and B has 3 rows, so the product exists. Its order is the outer numbers: 2 rows from A and 4 columns from B, so 2 × 4.

    4. Not this one. BA cannot be found: B has 4 columns but A has only 2 rows. The inner numbers 4 and 2 must be equal. Read this page again. Try another.

    See the answer

    AB has order 2 × 4.

    For AB, A has 3 columns and B has 3 rows, so the product exists. Its order is the outer numbers: 2 rows from A and 4 columns from B, so 2 × 4.

    • If you chose A: The order of AB is the outer numbers, 2 and 4, not the inner numbers. Read this page again.
    • If you chose B: The columns of A (3) match the rows of B (3), so AB can be found. Read this page again.
    • If you chose D: BA cannot be found: B has 4 columns but A has only 2 rows. The inner numbers 4 and 2 must be equal. Read this page again.
  3. The picture shows the product AB. The ringed row of A and the ringed column of B meet to give one entry of AB. Which entry is it?

    A product of two matrices. A has first row 3, 1 and second row 2, 5, and its second row is ringed with a dashed line. B has first row 2, 6 and second row 4, 1, and its first column is ringed. The result AB has four entries, marked with question marks. The matrices are named A, B and AB.3125A×2641B=????AB
    Tap your answer.
    1. Not this one. The top right entry uses row 1 of A and column 2 of B. The ringed row is row 2 and the ringed column is column 1. Read this page again. Try another.

    2. Not this one. The top left entry uses row 1 of A. The ringed row is row 2. Read this page again. Try another.

    3. Not this one. The bottom right entry uses column 2 of B. The ringed column is column 1. Read this page again. Try another.

    4. Yes, that is right. The ringed row is row 2 of A and the ringed column is column 1 of B. Row 2 and column 1 give the entry in the bottom left. It is 2 × 2 + 5 × 4 = 24.

    See the answer

    Bottom left

    The ringed row is row 2 of A and the ringed column is column 1 of B. Row 2 and column 1 give the entry in the bottom left. It is 2 × 2 + 5 × 4 = 24.

    • If you chose A: The top right entry uses row 1 of A and column 2 of B. The ringed row is row 2 and the ringed column is column 1. Read this page again.
    • If you chose B: The top left entry uses row 1 of A. The ringed row is row 2. Read this page again.
    • If you chose C: The bottom right entry uses column 2 of B. The ringed column is column 1. Read this page again.
  4. A has rows (2, 1) and (0, 3) and B has rows (1, 4) and (5, 2). What is the top right entry of AB?

    Tap your answer.
    1. Not this one. That is the top left entry. The top right entry uses column 2 of B, (4, 2). Read this page again. Try another.

    2. Yes, that is right. Row 1 of A is (2, 1) and column 2 of B is (4, 2). 2 × 4 + 1 × 2 = 10.

    3. Not this one. You multiplied entries in the same place only. Multiply row 1 of A by column 2 of B, and add both products. Read this page again. Try another.

    4. Not this one. That is the bottom right entry. The top right uses row 1 of A. Read this page again. Try another.

    See the answer

    10

    Row 1 of A is (2, 1) and column 2 of B is (4, 2). 2 × 4 + 1 × 2 = 10.

    • If you chose A: That is the top left entry. The top right entry uses column 2 of B, (4, 2). Read this page again.
    • If you chose C: You multiplied entries in the same place only. Multiply row 1 of A by column 2 of B, and add both products. Read this page again.
    • If you chose D: That is the bottom right entry. The top right uses row 1 of A. Read this page again.
  5. From an earlier chapter

    Which vector is a direction vector of the line r = (1, 2) + t(−6, 15)?

    Tap your answer.
    1. Yes, that is right. Any non-zero multiple of (−6, 15) is a direction vector. A third of it is (−2, 5).

    2. Not this one. This swaps the two parts. It points a different way from the direction. Go to M5.6.5. Try another.

    3. Not this one. This is the starting point, not the direction. Go to M5.6.5. Try another.

    See the answer

    (−2, 5)

    Any non-zero multiple of (−6, 15) is a direction vector. A third of it is (−2, 5).

    • If you chose B: This swaps the two parts. It points a different way from the direction. Go to M5.6.5.
    • If you chose C: This is the starting point, not the direction. Go to M5.6.5.
  6. Find the top left entry of AB when A has rows (1, 3) and (2, 4) and B has rows (2, 5) and (1, 0).

    See the answer

    5

    Row 1 of A is (1, 3) and column 1 of B is (2, 1). 1 × 2 + 3 × 1 = 5.

  7. The matrix with rows (3, 1) and (−2, 4) acts on the vector (2, 5). Give the new vector as (top, bottom).

    See the answer

    (11, 16)

    Top: 3 × 2 + 1 × 5 = 11. Bottom: (−2) × 2 + 4 × 5 = 16. The new vector is (11, 16).

  8. A has rows (2, 3) and (−1, 4) and B has rows (1, −2) and (5, 0). Find the top left entry of AB and the top left entry of BA. Give them in that order.

    See the answer

    17 and 4

    AB: 2 × 1 + 3 × 5 = 17. BA: 1 × 2 + (−2) × (−1) = 4. The two entries differ, so AB is not equal to BA.

  9. A matrix A is 3 × 3. What is A × I, where I is the 3 × 3 identity matrix?

    Tap your answer.
    1. Not this one. The identity leaves A unchanged, so the product is A, not I. Read this page again. Try another.

    2. Yes, that is right. The identity matrix does for matrices what 1 does for numbers. A × I = A, and I × A = A.

    3. Not this one. Multiplying by I is not multiplying by 0. The identity acts like the number 1. Read this page again. Try another.

    See the answer

    A

    The identity matrix does for matrices what 1 does for numbers. A × I = A, and I × A = A.

    • If you chose A: The identity leaves A unchanged, so the product is A, not I. Read this page again.
    • If you chose C: Multiplying by I is not multiplying by 0. The identity acts like the number 1. Read this page again.
  10. P has rows (2, −1, 0) and (1, 3, 2) and Q has rows (1, 2) and (4, 0) and (−3, 5). Find the entry in row 2, column 2 of PQ.

    See the answer

    12

    Row 2 of P is (1, 3, 2) and column 2 of Q is (2, 0, 5). 1 × 2 + 3 × 0 + 2 × 5 = 12.

Keep it

Copy this into your exercise book.

Order m × n: rows first. Add place by place. AB: row i of A times column j of B, added. A is m × n, B is n × p, so AB is m × p. AB is not BA. A × I = A.

Draw: Two matrices with a row of the first and a column of the second ringed, and the entry they make.

M5.6.7 Chapter 7

Matrices that move shapes

Can one small matrix turn, flip or stretch a whole shape?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

In the last chapter a 2 × 2 matrix acted on a column vector to give a new vector. Treat the vector as a point. The matrix with rows (a, b) and (c, d) sends the point (x, y) to the point (ax + by, cx + dy). Do this to every corner of a shape, and the corners of the image appear.

Look at the points (1, 0) and (0, 1), the ends of the unit vectors i and j. The matrix sends (1, 0) to (a, c), which is the first column. It sends (0, 1) to (b, d), which is the second column. So the columns of a matrix are the images of i and j. This one fact is the key to everything in this chapter.

A grid with the x axis x and the y axis y. A square S has corners (0, 0), (1, 0), (1, 1) and (0, 1). Its image S′ is a hatched rectangle with corners (0, 0), (2, 0), (2, 3) and (0, 3). An arrow named i′ runs from the origin to (2, 0) and an arrow named j′ runs from the origin to (0, 3). The text under the grid reads area S = 1, area S′ = 6.−11234−112340xyi′j′SS′area S = 1, area S′ = 6
The matrix with rows (2, 0) and (0, 3) sends (1, 0) to (2, 0) and (0, 1) to (0, 3). Those are its two columns. The image of the unit square has area 6.

Worked example

Find the matrix for a clockwise quarter turn about the origin, and use it on the point (2, 3).

  1. A clockwise quarter turn sends (1, 0) to (0, −1), which is straight down.
  2. It sends (0, 1) to (1, 0), which is to the right.
  3. Write these as the columns. The first column is (0, −1) and the second is (1, 0). So the matrix has rows (0, 1) and (−1, 0).
  4. Use it on (2, 3). The top number is 0 × 2 + 1 × 3 = 3.
  5. The bottom number is −1 × 2 + 0 × 3 = −2. So (2, 3) goes to (3, −2).

Answer: The matrix has rows (0, 1) and (−1, 0). The point (2, 3) goes to (3, −2).

The same method gives the standard matrices. For a turn of 90° anticlockwise, (1, 0) goes up to (0, 1) and (0, 1) goes left to (−1, 0). For a reflection in the line y = x, the point (1, 0) goes to (0, 1) and (0, 1) goes to (1, 0). For an enlargement with scale factor 2 and centre the origin, (1, 0) goes to (2, 0) and (0, 1) goes to (0, 2).

A grid with the x axis x and the y axis y. A triangle S with corners A, (1, 0), B, (3, 0), and C, (1, 2). Its image S′, hatched, is the triangle turned a quarter turn anticlockwise about the origin, with corners A′, B′ and C′. The text under the grid reads area S = 2, area S′ = 2.−3−2−11234−3−2−112340xyABCA′B′C′SS′area S = 2, area S′ = 2
The matrix with rows (0, −1) and (1, 0) turns the triangle 90° anticlockwise about the origin. The shape keeps its size, so its area stays 2.
A grid with the x axis x and the y axis y. A triangle S with corners A, (1, 0), B, (3, 0), and C, (1, 2). The dashed mirror line is named y = x. Its image S′, hatched, is the mirror image of S in that line, with corners A′, B′ and C′. The text under the grid reads area S = 2, area S′ = 2.−11234−112340xyy = xABCA′B′C′SS′area S = 2, area S′ = 2
The matrix with rows (0, 1) and (1, 0) reflects the triangle in the line y = x. The area stays 2, but the shape is flipped over.
A grid with the x axis x and the y axis y. A triangle S with corners A, (1, 0), B, (3, 0), and C, (1, 2). Its image S′, hatched, is the triangle enlarged by a scale factor of 2 from the origin, with corners A′, B′ and C′. The text under the grid reads area S = 2, area S′ = 8.2462460xyABCA′B′C′SS′area S = 2, area S′ = 8
The matrix with rows (2, 0) and (0, 2) enlarges the triangle by a scale factor of 2. Every length doubles, so the area is 2 × 2 = 4 times as big.

The figures show what to expect of the area. The turn and the reflection keep the area. The enlargement of 2 multiplies it by 4. The first figure stretched a square by 2 across and 3 up, and the area grew by 6. In every case the area is multiplied by the same number, whatever the shape. That number is given by the determinant.

For the matrix with rows (a, b) and (c, d), the determinant is ad − bc. It is the area scale factor with a sign. The image of any shape has |ad − bc| times the area of the shape. If the determinant is negative, the image has been flipped over, like a reflection. If it is 0, the shape is squashed flat.

Worked example

Find the determinant of the matrix with rows (3, 1) and (2, 4), and say what it does to the area of the unit square.

  1. The determinant is ad − bc. Here a = 3, b = 1, c = 2 and d = 4.
  2. ad = 3 × 4 = 12, and bc = 1 × 2 = 2.
  3. So the determinant is 12 − 2 = 10.
  4. The unit square has area 1, so its image has area 10. The picture shows a parallelogram that covers 10 unit squares.

Answer: The determinant is 10, so the image has area 10.

A grid with the x axis x and the y axis y. A square S has corners (0, 0), (1, 0), (1, 1) and (0, 1). Its image S′ is a hatched parallelogram with corners (0, 0), (3, 2), (4, 6) and (1, 4). An arrow named i′ runs from the origin to (3, 2) and an arrow named j′ runs from the origin to (1, 4). The text under the grid reads area S = 1, area S′ = 10.2462460xyi′j′SS′area S = 1, area S′ = 10
The matrix with rows (3, 1) and (2, 4) has determinant 10. The image of the unit square has area 10.

When the determinant is 0, the two columns point the same way or one is zero, so the image of the unit square has no area. The whole plane is squashed onto one line or one point. Such a matrix is called singular, and it cannot be undone. The next chapter shows why.

A grid with the x axis x and the y axis y. A square S has corners (0, 0), (1, 0), (1, 1) and (0, 1). Its image S′ is squashed flat onto a straight line through the origin. The text under the grid reads area S = 1, area S′ = 0.2462460xySS′area S = 1, area S′ = 0
The matrix with rows (1, 2) and (2, 4) has determinant 1 × 4 − 2 × 2 = 0. The unit square is squashed onto a line, so its area becomes 0.

To do one transformation and then another, multiply the matrices. If A is done first and B second, the combined matrix is BA. The order looks backwards, but it comes from the rule: B(Av) means do A to v, then do B to the result. The determinant of BA is the product of the two determinants, because the areas change one after the other.

Worked example

A is the quarter turn anticlockwise, with rows (0, −1) and (1, 0). B is the reflection in the x axis, with rows (1, 0) and (0, −1). Find the matrix for A followed by B, and check it on the point (1, 0).

  1. A is done first and B second, so the combined matrix is BA, with B on the left.
  2. Top left of BA: row 1 of B times column 1 of A, 1 × 0 + 0 × 1 = 0. Top right: 1 × (−1) + 0 × 0 = −1.
  3. Bottom left: 0 × 0 + (−1) × 1 = −1. Bottom right: 0 × (−1) + (−1) × 0 = 0.
  4. So BA has rows (0, −1) and (−1, 0). This is a reflection in the line y = −x.
  5. Check on (1, 0). A sends it to (0, 1) and then B sends that to (0, −1). The first column of BA is (0, −1), which agrees.

Answer: BA has rows (0, −1) and (−1, 0).

A rotation through any angle θ anticlockwise follows the same method. The point (1, 0) moves along the unit circle to (cos θ, sin θ). The point (0, 1) is a quarter turn ahead, so it goes to (−sin θ, cos θ). The columns give the matrix with rows (cos θ, −sin θ) and (sin θ, cos θ). Its determinant is cos² θ + sin² θ = 1, so a rotation never changes an area.

Worked example

Write the matrix for an anticlockwise turn of 30° about the origin, to 3 decimal places.

  1. The columns are (cos 30°, sin 30°) and (−sin 30°, cos 30°).
  2. cos 30° ≈ 0.866 and sin 30° = 0.5.
  3. So the matrix has rows (0.866, −0.5) and (0.5, 0.866).

Answer: The matrix has rows (0.866, −0.5) and (0.5, 0.866).

See it three ways

With things

Draw a square on a piece of stretchy cloth. Hold two opposite edges and pull the cloth to twice its height. The width stays as it was. The square becomes a tall rectangle, twice as big in area.

As a picture

A grid with the x axis x and the y axis y. A square S has corners (0, 0), (1, 0), (1, 1) and (0, 1). Its image S′ is a hatched rectangle with corners (0, 0), (1, 0), (1, 2) and (0, 2). An arrow named i′ and an arrow named j′ run from the origin to two corners of the rectangle. The text under the grid reads area S = 1, area S′ = 2.−1123−11230xyi′j′SS′area S = 1, area S′ = 2

In words

A matrix moves every point of a shape in the same way. Its columns say where the two unit points go. The determinant says how much the area grows.

In symbols

The matrix with rows (1, 0) and (0, 2) has determinant 1 × 2 − 0 × 0 = 2.

Try it

Draw the image of a square

You need: squared paper, a ruler, a pencil.

  1. Draw axes on squared paper and mark the corners of the unit square (0, 0), (1, 0), (1, 1) and (0, 1), one square apart.
  2. The matrix has rows (2, 1) and (0, 1). The first column is (2, 0), so (1, 0) goes to (2, 0). The second column is (1, 1), so (0, 1) goes to (1, 1).
  3. The corner (1, 1) goes to (3, 1), the sum of the two columns. Mark these corners.
  4. Join the four image corners to make a parallelogram. Count the squares it covers, joining part squares in pairs.

What you will see: The parallelogram covers 2 squares. The determinant of the matrix is 2 × 1 − 1 × 0 = 2, the same number.

If you cannot try it, this is what happens.
A grid with the x axis x and the y axis y. A square S has corners (0, 0), (1, 0), (1, 1) and (0, 1). Its image S′ is a hatched parallelogram with corners (0, 0), (2, 0), (3, 1) and (1, 1). An arrow named i′ runs from the origin to (2, 0) and an arrow named j′ runs from the origin to (1, 1). The text under the grid reads area S = 1, area S′ = 2.−11234−112340xyi′j′SS′area S = 1, area S′ = 2

A wrong idea many people have

A negative determinant means that the image has a negative area.

Why it feels right: The determinant is a number, and the area is found by multiplying by it, so a negative number seems to give a negative area.

The test that breaks it: Take the reflection in the x axis, with rows (1, 0) and (0, −1). Its determinant is 1 × (−1) − 0 × 0 = −1. But the reflected triangle has the same area as before, which cannot be negative.

What is true: An area is never negative. The image has |det| times the area. A negative sign shows that the shape has been flipped over, as in a mirror, so its order of corners has reversed.

A wrong idea many people have

To do A and then B, multiply AB.

Why it feels right: We read from left to right, so the matrix that is done first should be written first.

The test that breaks it: Take A as the quarter turn and B as the reflection in the x axis. BA has rows (0, −1) and (−1, 0), which sends (1, 0) to (0, −1). Turning (1, 0) to (0, 1) and then reflecting gives (0, −1), which agrees. But AB has rows (0, 1) and (1, 0), which sends (1, 0) to (0, 1). That is the result of reflecting first.

What is true: The matrix next to the point acts first. In BAv, A acts on v first. So A followed by B is BA, with the matrix that is done first on the right.

Key words

image
the shape or point that results from a transformation.
determinant
ad − bc for the matrix with rows (a, b) and (c, d). Its size is the area scale factor.
area scale factor
the number that multiplies every area. For a matrix, it is the size of the determinant.
singular
a matrix with determinant 0, which squashes the plane onto a line or a point.

Back to your guess

The answer is B: The matrix with rows (2, 0) and (0, 3) moves the unit square, which has area 1, to a shape with area 6.

The matrix sends (1, 0) to (2, 0) and (0, 1) to (0, 3). So the unit square becomes a rectangle 2 across and 3 up, with area 2 × 3 = 6. The number 6 is the determinant of the matrix, and it tells how areas change.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Which matrix gives a reflection in the y axis? Remember that the columns are the images of (1, 0) and (0, 1).

    Tap your answer.
    1. Not this one. This is the reflection in the x axis. It sends (1, 0) to (1, 0), but a reflection in the y axis sends (1, 0) to (−1, 0). Read this page again. Try another.

    2. Not this one. This is a quarter turn anticlockwise. A reflection in the y axis leaves (0, 1) where it is. Read this page again. Try another.

    3. Not this one. This sends (0, 1) to (0, −1), so it turns the plane through 180°. A reflection in the y axis keeps (0, 1) where it is. Read this page again. Try another.

    4. Yes, that is right. A reflection in the y axis sends (1, 0) to (−1, 0), which is the first column. It leaves (0, 1) where it is, so the second column is (0, 1). The matrix has rows (−1, 0) and (0, 1).

    See the answer

    rows (−1, 0) and (0, 1)

    A reflection in the y axis sends (1, 0) to (−1, 0), which is the first column. It leaves (0, 1) where it is, so the second column is (0, 1). The matrix has rows (−1, 0) and (0, 1).

    • If you chose A: This is the reflection in the x axis. It sends (1, 0) to (1, 0), but a reflection in the y axis sends (1, 0) to (−1, 0). Read this page again.
    • If you chose B: This is a quarter turn anticlockwise. A reflection in the y axis leaves (0, 1) where it is. Read this page again.
    • If you chose C: This sends (0, 1) to (0, −1), so it turns the plane through 180°. A reflection in the y axis keeps (0, 1) where it is. Read this page again.
  2. The picture shows a triangle and its image under a matrix. Which matrix made the image?

    A grid with the x axis x and the y axis y. A triangle S with corners A, (1, 0), B, (3, 0), and C, (1, 2). Its image S′, hatched, has corners A′, (1, 0), B′, (3, 0), and C′, (1, 4).−2246−22460xyABCA′B′C′SS′
    Tap your answer.
    1. Yes, that is right. The corner C, (1, 2), went to C′, (1, 4), and B, (3, 0), stayed at (3, 0). So the x numbers are unchanged and the y numbers are doubled. The first column is (1, 0) and the second is (0, 2).

    2. Not this one. This doubles the x numbers and keeps the y numbers. In the picture the heights doubled, not the widths. Read this page again. Try another.

    3. Not this one. This swaps x and y and doubles one of them. The corner B stays on the x axis in the picture, so x and y have not been swapped. Read this page again. Try another.

    4. Not this one. This is an enlargement, which doubles both x and y. In the picture the base of the triangle did not get longer. Read this page again. Try another.

    See the answer

    rows (1, 0) and (0, 2)

    The corner C, (1, 2), went to C′, (1, 4), and B, (3, 0), stayed at (3, 0). So the x numbers are unchanged and the y numbers are doubled. The first column is (1, 0) and the second is (0, 2).

    • If you chose B: This doubles the x numbers and keeps the y numbers. In the picture the heights doubled, not the widths. Read this page again.
    • If you chose C: This swaps x and y and doubles one of them. The corner B stays on the x axis in the picture, so x and y have not been swapped. Read this page again.
    • If you chose D: This is an enlargement, which doubles both x and y. In the picture the base of the triangle did not get longer. Read this page again.
  3. What is the determinant of the matrix with rows (6, 1) and (2, 3)?

    Tap your answer.
    1. Not this one. You added the two products. The determinant is ad − bc, a subtraction. Read this page again. Try another.

    2. Not this one. You subtracted the wrong way, bc − ad. The determinant is ad − bc. Read this page again. Try another.

    3. Yes, that is right. ad = 6 × 3 = 18 and bc = 1 × 2 = 2. So ad − bc = 16. The unit square becomes a parallelogram with area 16.

    4. Not this one. You found ad only. Take away bc as well. Read this page again. Try another.

    See the answer

    16

    ad = 6 × 3 = 18 and bc = 1 × 2 = 2. So ad − bc = 16. The unit square becomes a parallelogram with area 16.

  4. A shape has an area of 5 cm². A matrix with determinant −3 moves it. What is the area of the image?

    Tap your answer.
    1. Not this one. An area cannot be negative. The negative sign shows that the shape is flipped, but the area is the size of the determinant times the area. Read this page again. Try another.

    2. Not this one. You added. The area is multiplied by the size of the determinant. Read this page again. Try another.

    3. Yes, that is right. The image has |−3| × 5 = 3 × 5 = 15 cm². The minus sign means that the image is flipped over.

    See the answer

    15 cm²

    The image has |−3| × 5 = 3 × 5 = 15 cm². The minus sign means that the image is flipped over.

    • If you chose A: An area cannot be negative. The negative sign shows that the shape is flipped, but the area is the size of the determinant times the area. Read this page again.
    • If you chose B: You added. The area is multiplied by the size of the determinant. Read this page again.
  5. From an earlier chapter

    A has rows (1, 4) and (2, −1) and B has rows (3, 1) and (2, 5). What is the top left entry of AB?

    Tap your answer.
    1. Not this one. You multiplied the top left entries only. Use row 1 of A times column 1 of B, and add the two products. Go to M5.6.6. Try another.

    2. Yes, that is right. Row 1 of A is (1, 4) and column 1 of B is (3, 2). 1 × 3 + 4 × 2 = 11.

    3. Not this one. That is the top left entry of BA. AB has A first, so use row 1 of A. Go to M5.6.6. Try another.

    4. Not this one. You added the entries. A product multiplies row by column. Go to M5.6.6. Try another.

    See the answer

    11

    Row 1 of A is (1, 4) and column 1 of B is (3, 2). 1 × 3 + 4 × 2 = 11.

    • If you chose A: You multiplied the top left entries only. Use row 1 of A times column 1 of B, and add the two products. Go to M5.6.6.
    • If you chose C: That is the top left entry of BA. AB has A first, so use row 1 of A. Go to M5.6.6.
    • If you chose D: You added the entries. A product multiplies row by column. Go to M5.6.6.
  6. Find the determinant of the matrix with rows (5, 2) and (3, 4).

    See the answer

    14

    ad − bc = 5 × 4 − 2 × 3 = 20 − 6 = 14.

  7. The matrix with rows (2, 1) and (−1, 3) moves the point (3, 2). Where does the point go? Give it as (x, y).

    See the answer

    (8, 3)

    Top: 2 × 3 + 1 × 2 = 8. Bottom: −1 × 3 + 3 × 2 = 3.

  8. The matrix with rows (3, 1) and (−1, 2) moves a triangle with area 4 cm². Find the area of the image in cm².

    See the answer

    28

    The determinant is 3 × 2 − 1 × (−1) = 7. The image has 7 × 4 = 28 cm².

  9. A is a quarter turn anticlockwise, with rows (0, −1) and (1, 0). B is a reflection in the y axis, with rows (−1, 0) and (0, 1). A is done first and then B. Give the combined matrix as its four entries, row by row.

    See the answer

    rows (0, 1) and (1, 0)

    A first and then B gives BA. Row 1 of B times the columns of A: −1 × 0 + 0 × 1 = 0 and −1 × (−1) + 0 × 0 = 1. Row 2: 1 and 0. Doing B first would give AB, with rows (0, −1) and (−1, 0), which is not the same.

  10. A matrix has determinant 0. What does it do to a shape?

    Tap your answer.
    1. Yes, that is right. The area is multiplied by the size of the determinant, which is 0. A shape with area 0 is a line or a point, so the matrix squashes the shape flat.

    2. Not this one. A flip has determinant −1. A determinant of 0 means that the area becomes 0. Read this page again. Try another.

    3. Not this one. Doubling the area needs a determinant of 2 (or −2). A determinant of 0 multiplies the area by 0. Read this page again. Try another.

    See the answer

    It squashes the shape onto a line or a point.

    The area is multiplied by the size of the determinant, which is 0. A shape with area 0 is a line or a point, so the matrix squashes the shape flat.

    • If you chose B: A flip has determinant −1. A determinant of 0 means that the area becomes 0. Read this page again.
    • If you chose C: Doubling the area needs a determinant of 2 (or −2). A determinant of 0 multiplies the area by 0. Read this page again.

Keep it

Copy this into your exercise book.

The columns of a matrix are the images of (1, 0) and (0, 1). Determinant ad − bc = area scale factor, in size. Negative: flipped. Zero: squashed flat. A then B is BA.

Draw: The unit square and its image, with the two columns drawn as arrows from the origin.

M5.6.8 Chapter 8

Inverse matrices and equations

Can a matrix be undone, the way subtracting undoes adding?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

With numbers, you undo multiplying by 5 by multiplying by 1/5. The two together give 1. A matrix works the same way. The inverse of a square matrix A is the matrix A⁻¹ with A A⁻¹ = I and A⁻¹ A = I, where I is the identity matrix. Doing A and then A⁻¹ changes nothing, so A⁻¹ undoes A.

A grid with the x axis x and the y axis y. A triangle S with corners at (1, 0), (3, 0) and (1, 1). Its image S′, hatched, is the triangle moved by the matrix with rows (0, -2) and (2, 0). The text under the grid reads area S = 1, area S′ = 4.−2246−22460xySS′area S = 1, area S′ = 4
The matrix with rows (0, −2) and (2, 0) moves the triangle S to S′. Its determinant is 4, so the area is multiplied by 4.
A grid with the x axis x and the y axis y. The triangle S′ has corners at (0, 2), (0, 6) and (-2, 2). Its image S, hatched, is the triangle moved by the matrix with rows (0, 0.5) and (-0.5, 0). It is back at the corners (1, 0), (3, 0) and (1, 1). The text under the grid reads area S′ = 4, area S = 1.−2246−22460xyS′Sarea S′ = 4, area S = 1
The inverse, with rows (0, 0.5) and (−0.5, 0), moves S′ back onto S. Every corner of S′ returns to where it began, and the area is back to 1.

For a 2 × 2 matrix with rows (a, b) and (c, d), there is a short rule. Swap a and d. Change the signs of b and c. Then divide every entry by the determinant ad − bc. So A⁻¹ = (1 ÷ (ad − bc)) times the matrix with rows (d, −b) and (−c, a).

Why does this work? Multiply A by the matrix with the swapped entries and the changed signs, and see what you get. The picture does it for one matrix. The product is not I, but twice I. The number 2 is the determinant. Dividing by it leaves I. In general the product is (ad − bc) times I, which is why we divide by the determinant.

A product of two matrices. A has first row 3, 1 and second row 4, 2. The second matrix has the swapped entries and the changed signs: first row 2, −1 and second row −4, 3. The result has first row 2, 0 and second row 0, 2. The matrices are named A, swapped and 2I.3142A×2−1−43swapped=20022I
A has determinant 3 × 2 − 1 × 4 = 2. The product is 2 times the identity matrix.

Worked example

Find the inverse of the matrix A with rows (4, 3) and (1, 2).

  1. The determinant is not 0, so the inverse exists. It is ad − bc = 4 × 2 − 3 × 1 = 5.
  2. Swap a and d: the diagonal becomes 2 and 4. Change the signs of b and c: they become −3 and −1.
  3. This gives the matrix with rows (2, −3) and (−1, 4).
  4. Divide every entry by 5. The inverse has rows (0.4, −0.6) and (−0.2, 0.8).
  5. Check the top left entry of A A⁻¹: 4 × 0.4 + 3 × (−0.2) = 1. It is the top left entry of the identity.

Answer: The inverse has rows (0.4, −0.6) and (−0.2, 0.8).

Notice what a zero determinant does. The rule divides by ad − bc, which cannot be done when it is 0. A matrix with determinant 0 squashes the plane onto a line, as we saw in the last chapter. Two different points land on the same place, and no matrix can tell them apart again. So a singular matrix has no inverse.

Now to the main use. Two simultaneous equations such as 2x + y = 8 and x + y = 5 can be written as one matrix equation. The coefficients make a matrix, the unknowns make a column vector, and the right hand sides make another column vector. The matrix times the vector (x, y) gives (8, 5).

If the matrix is A, the vector of unknowns is v, and the right hand side is c, then A v = c. Multiply both sides on the left by A⁻¹. Since A⁻¹ A = I and I v = v, we get v = A⁻¹ c. The inverse is on the left of c, the same side that it was written on in the first step.

Worked example

Solve 2x + y = 8 and x + y = 5 with an inverse matrix.

  1. Write the equations as a matrix equation: the matrix with rows (2, 1) and (1, 1) times (x, y) equals (8, 5).
  2. The determinant is 2 × 1 − 1 × 1 = 1, so the inverse exists.
  3. The inverse has rows (1, −1) and (−1, 2).
  4. Then (x, y) = the inverse times (8, 5). The top number is 1 × 8 + (−1) × 5 = 3.
  5. The bottom number is −1 × 8 + 2 × 5 = 2.
  6. So x = 3 and y = 2. Check in the first equation: 2 × 3 + 1 × 2 = 8.

Answer: x = 3 and y = 2

A grid with the x axis x and the y axis y. Two straight lines, named L₁ and L₂, cross at the point P, (3, 2). The line L₁ is 2x + y = 8 and the line L₂ is x + y = 5.369−224680xyL₁L₂P
Each equation is a straight line. The solution (3, 2) is the point P where they cross. The inverse matrix finds P in one step.

Worked example

Solve 4x + 3y = 10 and x + 2y = 5, using the inverse found above.

  1. The matrix is the one with rows (4, 3) and (1, 2), and the right hand side is (10, 5). We found its inverse: rows (0.4, −0.6) and (−0.2, 0.8).
  2. The top number is 0.4 × 10 + (−0.6) × 5 = 1.
  3. The bottom number is −0.2 × 10 + 0.8 × 5 = 2.
  4. So x = 1 and y = 2. Check in the second equation: 1 + 2 × 2 = 5.

Answer: x = 1 and y = 2

What if the determinant is 0? Then there is no inverse, and the method stops. Look at x + 2y = 5 and 2x + 4y = 6. The matrix has determinant 1 × 4 − 2 × 2 = 0. The second equation is 2 times x + 2y = 3, but the first says x + 2y = 5. The equations disagree, so there is no solution. Their lines are parallel.

A grid with the x axis x and the y axis y. Two parallel straight lines, named L₁ and L₂, that never cross. The line L₁ is x + 2y = 5, through (1, 2) and (3, 1). The line L₂ is 2x + 4y = 6, through (1, 1) and (3, 0).246240xyL₁L₂
The matrix with rows (1, 2) and (2, 4) has determinant 0. The two lines are parallel, so there is no point that is on both. If the right hand sides had agreed, the lines would be the same line, with infinitely many solutions.

See it three ways

With things

A seller packs a small basket with 2 mangoes and 1 papaya, and a large basket with 4 mangoes and 3 papayas. An order needs 20 mangoes and 12 papayas in all. How many baskets of each kind should be packed?

As a picture

A matrix equation. The baskets matrix has first row 2, 4 and second row 1, 3. It multiplies the column of unknowns s and l, and the result is the column 20 and 12. The matrices are named baskets, numbers and fruit.2413baskets×slnumbers=2012fruit

In words

The matrix packs baskets into fruit. The inverse unpacks the fruit into baskets. The determinant is 2 × 3 − 4 × 1 = 2, so the inverse exists, and it gives 6 small baskets and 2 large ones.

In symbols

If A v = c, then v = A⁻¹ c. Here the inverse has rows (1.5, −2) and (−0.5, 1), and v = (6, 2).

Try it

Move a triangle and move it back

You need: squared paper, a ruler, a pencil.

  1. Draw axes. Mark the corners (1, 0), (3, 0), (1, 1) of a triangle.
  2. Use the matrix with rows (0, −2) and (2, 0) on each corner. For example, (1, 0) goes to (0, 2). Mark the three image points and join them.
  3. Now use the inverse, with rows (0, 0.5) and (−0.5, 0), on each image point. The point (0, 2) should go back to (1, 0).
  4. Compare the last three points with the first three.

What you will see: Every point comes back to where it started. The inverse has undone the matrix.

If you cannot try it, this is what happens.
A table with the heads start, after A and undone (after the inverse). The rows read (1, 0), (0, 2) and (1, 0); (3, 0), (0, 6) and (3, 0); (1, 1), (−2, 2) and (1, 1).startafter Aundone(1, 0)(0, 2)(1, 0)(3, 0)(0, 6)(3, 0)(1, 1)(−2, 2)(1, 1)

A wrong idea many people have

To find the inverse of a matrix, replace each entry by 1 divided by it.

Why it feels right: The inverse of the number 5 is 1/5, so the inverse of a matrix of numbers seems to be a matrix of such inverses.

The test that breaks it: Take A with rows (4, 3) and (1, 2). Replacing each entry by 1 divided by it gives rows (0.25, 0.333) and (1, 0.5). The top left entry of the product is 4 × 0.25 + 3 × 1 = 4, and the identity needs 1.

What is true: The inverse is found with the determinant: swap a and d, change the signs of b and c, and divide by ad − bc. Check any inverse by multiplying: A A⁻¹ must be I.

A wrong idea many people have

Every square matrix has an inverse.

Why it feels right: Every non-zero number has an inverse, so every non-zero matrix seems to have one.

The test that breaks it: Take the matrix with rows (1, 2) and (2, 4). It is not the zero matrix, but its determinant is 0. The formula needs a division by 0, which cannot be done. It squashes the unit square onto a line, so two points share an image.

What is true: A matrix has an inverse only when its determinant is not 0. A non-zero matrix with determinant 0 is singular and has no inverse.

Key words

inverse
the matrix A⁻¹ that undoes A, so that A A⁻¹ = A⁻¹ A = I.
singular
a matrix with determinant 0, which has no inverse.
matrix equation
an equation A v = c, where A is a matrix and v and c are column vectors.
identity matrix
the matrix I with 1s on the diagonal and 0s elsewhere, which leaves a matrix unchanged.

Back to your guess

The answer is B: The matrix with rows (0, −1) and (1, 0) turns the plane 90° anticlockwise. A turn of 90° clockwise undoes it.

To undo a turn of 90° anticlockwise you turn 90° clockwise. The matrix for that has rows (0, 1) and (−1, 0). The two matrices multiply to the identity: rows (1, 0) and (0, 1). The matrix that undoes another is its inverse, and this chapter shows how to find it and use it.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. What is the inverse of the matrix with rows (3, 2) and (4, 3)?

    Tap your answer.
    1. Not this one. This is the matrix itself. Its product with itself is not the identity. Read this page again. Try another.

    2. Not this one. You changed the signs of the diagonal and kept the signs of the other two. Swap the diagonal, and change the signs of b and c. Read this page again. Try another.

    3. Yes, that is right. The determinant is 3 × 3 − 2 × 4 = 1. Swap a and d, change the signs of b and c, and divide by 1: rows (3, −2) and (−4, 3).

    4. Not this one. This swaps the rows and columns, which is a different operation. The inverse swaps a and d and changes the signs of b and c. Read this page again. Try another.

    See the answer

    rows (3, −2) and (−4, 3)

    The determinant is 3 × 3 − 2 × 4 = 1. Swap a and d, change the signs of b and c, and divide by 1: rows (3, −2) and (−4, 3).

    • If you chose A: This is the matrix itself. Its product with itself is not the identity. Read this page again.
    • If you chose B: You changed the signs of the diagonal and kept the signs of the other two. Swap the diagonal, and change the signs of b and c. Read this page again.
    • If you chose D: This swaps the rows and columns, which is a different operation. The inverse swaps a and d and changes the signs of b and c. Read this page again.
  2. Which of these matrices has no inverse?

    Tap your answer.
    1. Yes, that is right. The determinant of the matrix with rows (2, 3) and (4, 6) is 2 × 6 − 3 × 4 = 0. A matrix with determinant 0 has no inverse.

    2. Not this one. Its determinant is −2, not 0, so it has an inverse. Read this page again. Try another.

    3. Not this one. Its determinant is −2, not 0, so it has an inverse. Read this page again. Try another.

    4. Not this one. Its determinant is 2, not 0, so it has an inverse. Read this page again. Try another.

    See the answer

    rows (2, 3) and (4, 6)

    The determinant of the matrix with rows (2, 3) and (4, 6) is 2 × 6 − 3 × 4 = 0. A matrix with determinant 0 has no inverse.

  3. A matrix has determinant 8. What is the determinant of its inverse?

    Tap your answer.
    1. Not this one. This is the determinant of the matrix itself. Undoing a stretch of 8 in area shrinks areas by 8. Read this page again. Try another.

    2. Not this one. The sign does not change. The matrix and its inverse both keep or both flip the shape. Read this page again. Try another.

    3. Not this one. The determinant of the identity is 1, and that is the product of the two determinants, not the determinant of the inverse. Read this page again. Try another.

    4. Yes, that is right. A and its inverse multiply to I, and the determinant of I is 1. Determinants multiply, so det A × det A⁻¹ = 1 and det A⁻¹ = 1 ÷ 8 = 0.125.

    See the answer

    0.125

    A and its inverse multiply to I, and the determinant of I is 1. Determinants multiply, so det A × det A⁻¹ = 1 and det A⁻¹ = 1 ÷ 8 = 0.125.

    • If you chose A: This is the determinant of the matrix itself. Undoing a stretch of 8 in area shrinks areas by 8. Read this page again.
    • If you chose B: The sign does not change. The matrix and its inverse both keep or both flip the shape. Read this page again.
    • If you chose C: The determinant of the identity is 1, and that is the product of the two determinants, not the determinant of the inverse. Read this page again.
  4. The picture shows the lines x + y = 7 and x + 2y = 10. What is the solution of the two equations?

    A grid with the x axis x and the y axis y. Two straight lines, named L₁ and L₂, cross at the point P, (4, 3). The line L₁ is x + y = 7 and the line L₂ is x + 2y = 10.1234567824680xyL₁L₂P
    Tap your answer.
    1. Not this one. These are the right hand sides of the equations, not the solution. The solution is the point where the two lines cross. Read this page again. Try another.

    2. Yes, that is right. The solution is the point where the lines cross. As a check, the matrix with rows (1, 1) and (1, 2) has the inverse with rows (2, −1) and (−1, 1). The inverse times (7, 10) is (4, 3).

    3. Not this one. You may have swapped x and y. Read the x number first: it is how far along the x axis the point P is. Read this page again. Try another.

    4. Not this one. Check it in the equations: this point is not on both lines. Read this page again. Try another.

    See the answer

    x = 4 and y = 3

    The solution is the point where the lines cross. As a check, the matrix with rows (1, 1) and (1, 2) has the inverse with rows (2, −1) and (−1, 1). The inverse times (7, 10) is (4, 3).

    • If you chose A: These are the right hand sides of the equations, not the solution. The solution is the point where the two lines cross. Read this page again.
    • If you chose C: You may have swapped x and y. Read the x number first: it is how far along the x axis the point P is. Read this page again.
    • If you chose D: Check it in the equations: this point is not on both lines. Read this page again.
  5. From an earlier chapter

    A matrix has determinant −2 and moves a shape with area 7 cm². What is the area of the image?

    Tap your answer.
    1. Not this one. An area cannot be negative. The size of the determinant multiplies the area, and the sign shows only that the shape is flipped. Go to M5.6.7. Try another.

    2. Not this one. You added the determinant to the area. The area is multiplied by the size of the determinant. Go to M5.6.7. Try another.

    3. Yes, that is right. The area is multiplied by |−2| = 2, so it becomes 2 × 7 = 14 cm².

    See the answer

    14 cm²

    The area is multiplied by |−2| = 2, so it becomes 2 × 7 = 14 cm².

    • If you chose A: An area cannot be negative. The size of the determinant multiplies the area, and the sign shows only that the shape is flipped. Go to M5.6.7.
    • If you chose B: You added the determinant to the area. The area is multiplied by the size of the determinant. Go to M5.6.7.
  6. Find the inverse of the matrix with rows (7, 2) and (3, 1). Give the four entries of the inverse, row by row.

    See the answer

    rows (1, −2) and (−3, 7)

    The determinant is 1. Swap the diagonal and change the signs of the others: rows (1, −2) and (−3, 7).

  7. Solve 5x + 2y = 14 and 2x + y = 5 with an inverse matrix. Give x and y.

    See the answer

    x = 4 and y = −3

    The matrix with rows (5, 2) and (2, 1) has determinant 1 and inverse rows (1, −2) and (−2, 5). The inverse times (14, 5) is (4, −3).

  8. Find the inverse of the matrix with rows (2, 1) and (4, 3). Give the four entries of the inverse, row by row.

    See the answer

    rows (1.5, −0.5) and (−2, 1)

    The determinant is 2 × 3 − 1 × 4 = 2. Swap the diagonal, change the signs of the others, and divide by 2: rows (1.5, −0.5) and (−2, 1).

  9. A bundle P holds 3 sticks and 2 stones. A bundle Q holds 2 sticks and 1 stone. An order needs 16 sticks and 9 stones. Use an inverse matrix to find how many bundles of P and Q to pack.

    See the answer

    2 of P and 5 of Q

    With p bundles of P and q of Q, 3p + 2q = 16 and 2p + q = 9. The determinant is −1 and the inverse is rows (−1, 2) and (2, −3). So (p, q) = (2, 5). Check: 3 × 2 + 2 × 5 = 16.

  10. The equations are written as A v = c, and A has an inverse. Which line gives v?

    Tap your answer.
    1. Not this one. The inverse must multiply on the same side as A did, which is the left. Matrix multiplication depends on the order, so c A⁻¹ is not A⁻¹ c. Read this page again. Try another.

    2. Yes, that is right. Multiply both sides of A v = c on the left by the inverse. A⁻¹ A v = A⁻¹ c, and A⁻¹ A = I, so v = A⁻¹ c. The inverse goes on the left.

    3. Not this one. There is no division of matrices. We multiply by the inverse instead. Read this page again. Try another.

    See the answer

    v = A⁻¹c

    Multiply both sides of A v = c on the left by the inverse. A⁻¹ A v = A⁻¹ c, and A⁻¹ A = I, so v = A⁻¹ c. The inverse goes on the left.

    • If you chose A: The inverse must multiply on the same side as A did, which is the left. Matrix multiplication depends on the order, so c A⁻¹ is not A⁻¹ c. Read this page again.
    • If you chose C: There is no division of matrices. We multiply by the inverse instead. Read this page again.

Keep it

Copy this into your exercise book.

A A⁻¹ = I. For rows (a, b), (c, d): swap a and d, change signs of b and c, divide by ad − bc. No inverse if ad − bc = 0. A v = c gives v = A⁻¹ c.

Draw: Two lines crossing at a point, with the matrix equation written beside them.

Key words, A to Z

Every key word in this book, what it means, and the chapter that teaches it.

acute
an angle below 90°, which has a positive scalar product. M5.6.4
area scale factor
the number that multiplies every area. For a matrix, it is the size of the determinant. M5.6.7
axes
the three lines x, y and z that meet at the origin at right angles. M5.6.3
collinear
lying on one straight line. M5.6.2
component
one of the parts of a vector: how far across and how far up. M5.6.1
coordinates
the three numbers (x, y, z) that say where a point is. M5.6.3
determinant
ad − bc for the matrix with rows (a, b) and (c, d). Its size is the area scale factor. M5.6.7
direction vector
the vector b in r = a + tb, which gives the direction of the line. M5.6.5
divides
P divides AB in the ratio m : n when AP : PB = m : n and P is on AB. M5.6.2
entry
one number inside a matrix. M5.6.6
identity matrix
the square matrix I with 1s on the diagonal and 0s elsewhere. A × I = I × A = A. M5.6.6, M5.6.8
image
the shape or point that results from a transformation. M5.6.7
inverse
the matrix A⁻¹ that undoes A, so that A A⁻¹ = A⁻¹ A = I. M5.6.8
magnitude
the length of a vector, written |a|. M5.6.1
matrix
a rectangle of numbers in rows and columns. M5.6.6
matrix equation
an equation A v = c, where A is a matrix and v and c are column vectors. M5.6.8
midpoint
the point half way along a line. Its position vector is half of the sum of the position vectors of the ends. M5.6.2
not commutative
the order matters: AB is often not equal to BA. M5.6.6
obtuse
an angle between 90° and 180°, which has a negative scalar product. M5.6.4
order
the size of a matrix: m × n means m rows and n columns. M5.6.6
origin
the fixed point O from which position vectors are measured. M5.6.2
parallel
pointing the same way or the opposite way: one is a scalar multiple of the other. M5.6.1
parameter
the number t in r = a + tb. Each value of t gives one point of the line. M5.6.5
perpendicular
at right angles. Two non-zero vectors are perpendicular when their scalar product is 0. M5.6.4
position vector
the vector from the origin O to a point. The position vector of A is OA. M5.6.2
projection
the length of the shadow of one vector on the line of another, (a · b) ÷ |a|. M5.6.4
right handed
the usual way to name the axes, with x turning onto y anticlockwise when you look down from the z axis. M5.6.3
scalar
a quantity with a size only, such as a time or a mass. M5.6.1
scalar product
a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ, a single number. Also called the dot product. M5.6.4
singular
a matrix with determinant 0, which squashes the plane onto a line or a point. M5.6.7, M5.6.8
skew lines
lines in space that are not parallel and never meet. M5.6.5
unit vector
a vector of length 1. M5.6.1
unit vectors
i, j and k, the vectors of length 1 along the x, y and z axes. M5.6.3
vector
a quantity with a size and a direction, such as a move. M5.6.1
vector equation
an equation r = a + tb that gives the position vector of every point of a line. M5.6.5