VECTOR ALGEBRA
Chapter 10: Vector Algebra
Chapter 10
Vector Algebra
Big idea: some quantities need a direction as well as a size. Vectors give them an algebra, so that pushes, journeys and velocities can be added, scaled and compared with simple arithmetic.
10.1 Introduction
Think of two kinds of information. "The room is metres long" needs only a number. "Walk metres" is incomplete: which way? Some quantities are complete with a number and a unit. Others also need a direction.
- A scalar has only a size (magnitude). Examples: mass, time, temperature, distance, speed, area, energy.
- A vector has a size and a direction. Examples: displacement, velocity, acceleration, force, momentum.
A person walks blocks east and then blocks north. The distance walked is blocks: a scalar, which only counts how far the feet moved. The displacement is the straight line from the start to the end. It is a vector. By Pythagoras its size is blocks, and its direction is north of east.
A map grid. A solid path goes from the start at (0, 0) east to (3, 0) and then north to (3, 4). A dashed straight line goes directly from the start to the end point (3, 4). The path is 7 units long and the straight line is 5 units long.
Vectors are used wherever direction matters: in physics (forces, velocities), engineering (structures, circuits), computer graphics (movement, lighting) and navigation.
| Scalar (size only) | Vector (size and direction) |
|---|---|
| distance | displacement |
| speed | velocity |
| mass | force, weight |
| energy, work | momentum, acceleration |
10.2 Some Basic Concepts
Every point in space is described by three coordinates , measured along three perpendicular axes that meet at the origin . The -axis points up. The distance between two points comes from Pythagoras' theorem, used twice:
Example: for and , the differences are , , . The squares add to , so .
A vector is a directed line segment: a straight line with a start and an end, drawn with an arrowhead at the end. If it starts at and ends at , we write . The start is the initial point and the end is the terminal point. A vector is also written with a single letter and an arrow, such as .
The magnitude of is the length of the segment, written . It equals the distance . Two things describe a vector completely: its magnitude and its direction. It does not matter where on the page it is drawn.
A three-dimensional picture with coordinate axes. A teal arrow points from the point A = (1, 1, 0) to the point B = (4, 3, 2). Both points are labelled.
Here .
Position Vector
If you fix the origin , every point gets its own vector from the origin to . This is the position vector of . If , then
Here , , are unit vectors (length ) along the , and axes. The numbers , , are the components of the vector. The magnitude comes from the distance formula:
Example 1. For : and .
Example 2. For : and .
A three-dimensional picture. A teal arrow goes from the origin to the point P = (2, 3, 6). Dashed lines drop from P straight down to the floor point (2, 3, 0) and then across to the origin, showing how the three components 2, 3 and 6 build the vector.
Direction Cosines
A vector makes three angles with the positive , , axes. Call them , , (the direction angles). The cosines of these angles are the direction cosines:
For of length , the -component is the adjacent side of the angle with the -axis, so
Square and add: . This always holds. The direction cosines are also the components of the unit vector .
For we have . The direction cosines are , , . Their squares are , which add to . The direction angles are , , .
For we have . The direction cosines are , , . The negative sign tells us the vector leans away from the positive -axis, so is more than . The other angles are and .
Any numbers proportional to the direction cosines are called direction ratios. For above, and are both direction ratios, because the second is the first times . Direction cosines are the special direction ratios whose squares add to . To get them from direction ratios , divide each by .
If a vector makes equal angles with all three axes, then . From we get , so . The vector is one such vector, and its angle with each axis is .
10.3 Types of Vectors
| Type | What it means | Example |
|---|---|---|
| Zero vector | size , no direction (start and end point are the same) | |
| Unit vector | size exactly | , , |
| Co-initial vectors | start at the same point | two arrows from the origin |
| Collinear (parallel) vectors | lie along the same line or parallel lines, whatever their sizes | and |
| Equal vectors | same size and same direction (the starting point does not matter) | two arrows that match exactly |
| Negative of | same size, opposite direction, written |
Dividing a vector by its own length gives a unit vector in the same direction. We write it . For the length is . So
As a check, , and the decimals are .
Two vectors are collinear if one is a number times the other. For and , we see that . So they are collinear. The minus sign means they point in opposite directions.
Take and . The vector goes along , along , along , so . It is equal to the vector drawn from the origin, even though it starts somewhere else.
EXERCISE 10.1
- Say whether each quantity is a scalar or a vector: temperature, displacement, area, force, volume, acceleration, kinetic energy, momentum.
- Find the magnitude of each position vector: , , , .
- Find the direction cosines of and the angle it makes with the -axis.
- Find the unit vector in the direction of .
- Which of , , are collinear? Which pairs point the same way?
- Are and collinear?
- Find so that is collinear with .
- Write the vector from to and find its magnitude.
- Find the magnitude of for and .
- Explain why and are the same vector, and give its direction cosines.
Answers
- Scalars: temperature, area, volume, kinetic energy. Vectors: displacement, force, acceleration, momentum.
- , , , . For example .
- , so the direction cosines are , , . The angle with the -axis is .
- The length is , so the unit vector is .
- All three are collinear: and . The vectors and point the same way (positive multiple). points opposite to both.
- No. The first two components of the second are twice those of the first, but the third is not (), so it is not a multiple of the first.
- The second vector is times , so .
- and .
- and . Their difference is , with magnitude .
- The component of in is , so they are equal. The length is , so the direction cosines are , , (angles , , ).
10.4 Addition of Vectors
A boat points straight east and its engine gives it a speed of metres per second through still water. At the same time a river current pushes it north at metres per second. Where does the boat actually go? Its real velocity is the sum of the two velocities. This is vector addition.
Put the second arrow so that it starts where the first one ends. The sum is the arrow from the very start to the very end. If and , then
A flat picture in three dimensions. A teal arrow a goes from the origin east to the point (3, 0, 0). An orange arrow b goes from there north to the point (3, 4, 0). A dark arrow a plus b goes directly from the origin to (3, 4, 0), closing the triangle.
Here , with magnitude . The boat moves at m/s, in a direction between east and north. Notice that : the resultant is shorter than the two sides added, because they do not point the same way.
If two vectors start at the same point, draw the parallelogram they span. The sum is the diagonal from the common starting point. This is the same as the triangle law, with moved to the far side.
In practice, add component by component. For and :
Subtraction means adding the negative: .
Any side of a triangle is shorter than the other two together, so for all vectors . For the numbers above, , and , and indeed . Equality happens only when both vectors point the same way.
Properties of vector addition
Vector addition follows the same rules as adding numbers. Each rule was checked with numbers by computer, using , and .
- Commutative: . Both give . The order does not matter: the two routes of the parallelogram end at the same corner.
- Associative: . Both give . You can group in any way, so we may write .
- Zero vector: . Adding the zero vector changes nothing.
- Negative: . Going somewhere and coming straight back means no displacement.
A flat picture in three dimensions. Two arrows start at the origin: a teal arrow to (4, 0, 0) and an orange arrow to (1, 3, 0). Dashed lines complete a parallelogram. A dark diagonal arrow goes from the origin to the far corner (5, 3, 0).
Closed polygon. If you walk around a closed shape (a triangle, a square, any polygon) and come back to the start, the displacements add to the zero vector. For the triangle , , : .
10.5 Multiplication of a Vector by a Scalar
Multiplying a vector by a number stretches or shrinks it. The result has:
- length ;
- the same direction as if , the opposite direction if ;
- the zero vector if .
Three arrows in a flat picture, all along the same line through the origin. The teal arrow a goes from the origin to (1, 1, 0). The orange arrow 2a goes in the same direction to (2, 2, 0), twice as long. The grey arrow minus a goes the opposite way to (minus 1, minus 1, 0).
In components, multiply every component: .
The unit vector has length . So has length and the direction of . Example: find a vector of length in the direction of .
The length of is . So the vector is . Check: has length , and dividing by gives length .
So the answer is .
10.5.1 Components of a vector
Every vector can be written in one way as . The numbers , , are its components. This is the same as the position vector of the point . Working with components turns geometry into arithmetic.
- Magnitude: .
- Equal vectors: exactly when all three components match.
- Sum and difference: add or subtract the matching components.
- Scalar multiple: multiply each component.
- Collinear (parallel) vectors: exactly when for some number , that is, the components are proportional: .
A drone climbs with velocity metres per second ( east, north, up). Its speed is m/s.
Let and . Then
- , with .
- , with .
For which is parallel to ? The ratio of the -components is , and for the -components . They agree, so . The computer confirms and are parallel.
Write as . Comparing components: and . Solving gives and . Check: .
10.5.2 Vector joining two points
Suppose the points and have position vectors and . To walk from to you can go from back to and then on to . In the triangle the triangle law gives , so
Rule: the vector from to is "end minus start", component by component.
Example 1. For and : , and . The vector is the negative: .
A three-dimensional picture with a teal arrow from the point P = (1, 2, 3) to the point Q = (4, minus 2, 5). The origin is also marked, and thin arrows show the position vectors OP and OQ.
Example 2: a triangle. Take , , . Then , and . Adding the three gives , as it must for a closed triangle.
10.5.3 Section formula
A point lies on the line through and and divides the segment in the ratio . This means . If and have position vectors and , then has position vector
Notice the crossing: the far vector gets the larger share when its number is bigger. The mid-point is the special case : .
External division. If lies on the line outside the segment, with (and ), then
Let and . The point dividing internally in the ratio is . Externally in the ratio it is . The mid-point is .
A three-dimensional picture. A line segment joins A = (1, 2, 3) and B = (6, minus 3, 8). A third point R = (3, 0, 5) is marked on the segment, closer to A than to B. The ratio AR to RB is 2 to 3.
The centroid of a triangle is where the three medians meet. It lies of the way from each vertex to the opposite mid-point. For , , : the mid-point of is . Doubling gives . Dividing internally in the ratio gives . In general, the centroid has position vector .
Take , , . Then and . Since , the vectors are parallel and share the point , so , , are on one line. Indeed is the mid-point of .
EXERCISE 10.2
- Find and for and .
- Find the mid-point of the line segment joining and .
- Find the point that divides the segment from to internally in the ratio .
- Find the point that divides the same segment externally in the ratio .
- is a parallelogram with , , . Find .
- Show that , , are on one line.
- For and , find and its magnitude.
- Write as .
- In what ratio does the plane (the -plane) divide the segment joining and ? Where does it meet the segment?
- Find the centroid of the triangle with vertices , , .
Answers
- and .
- .
- .
- .
- The diagonals of a parallelogram bisect each other, so , so . Check: the mid-point of and the mid-point of are both .
- and . The vectors are parallel and share , so the three points are collinear.
- , with magnitude .
- and give , . Check: .
- Let the ratio be . The -coordinate is , so and . The meeting point is .
- .
10.6 Product of Two Vectors
You can add two vectors and you can scale one. Can you multiply two vectors? There is more than one sensible answer, because two arrows can be combined in two useful ways:
- The scalar product (or dot product), written . The answer is a number. It measures how much the two vectors point the same way. Example: work $= $ force displacement.
- The vector product (or cross product), written . The answer is a vector that is perpendicular to both. It measures how much they point different ways. Examples: the area of a parallelogram, and the turning effect (torque) of a force.
10.6.1 Scalar (or dot) product of two vectors
Let be the angle between two non-zero vectors and when they are drawn from the same point, with . The scalar product is
If either vector is the zero vector, the product is . The answer is a plain number, which can be positive, zero or negative, depending on whether is less than, equal to, or more than .
A force moves an object through a displacement . Only the part of the force along the motion does work. So the work done is . For example, a force newtons moves a box by metres. The work is joules: the in the -direction is sideways to the motion and contributes nothing.
Writing both vectors in components, the dot product is simply
Example. For and : . The lengths are and . So
So .
A three-dimensional picture with two arrows from the origin: a teal arrow a to the point (1, 2, 3) and an orange arrow b to the point (4, minus 1, 2). The angle between them is about 62.2 degrees.
Observations on the dot product
- Perpendicular vectors. If and are non-zero, then exactly when they are perpendicular (because ). Example: and give , so they are perpendicular.
- The sign tells the angle. Positive means (acute). Zero means . Negative means (obtuse). Example: and give , and the angle is .
- A vector with itself. , since and . For this is . This is how we get the length: .
- Order does not matter. .
- The unit vectors. Each of , , has length , and the three are mutually perpendicular. So:
This table is why the component formula works: all the cross-terms like are zero, and all the square terms are one.
Two important properties of scalar product
Property 1 (distributive law). . The dot product spreads over addition, like ordinary multiplication.
Check with , , . Then and . On the other side, and , which equals .
Property 2 (scalars come out). . With : , which is .
The component formula. Expand with Property 1 into nine terms. The table in the last section kills the six mixed terms and leaves .
Squares of sums. Since , we get
Check: has . And . In the same way .
10.6.2 Projection of a vector on a line
Shine a light straight down onto a line from the tip of . The shadow of on the line is its projection. Suppose the line has the direction of , and is the angle between and . Then the (signed) length of the shadow is . This number is called the projection of on . It equals
This is a number. It is negative if is obtuse (the shadow points backwards). As a vector, the shadow is this length times the unit vector :
For and (along the -axis): and , so the projection is . The vector projection is . This simply keeps the -part of .
For and : and . So the projection is , and the vector projection is .
What is left over, , is perpendicular to : its dot product with is . So splits into a part along and a part at right angles to it.
A three-dimensional picture. A grey arrow b goes from the origin to (4, 4, 2). A teal arrow a goes from the origin to (1, 2, 3). An orange arrow, the projection of a on b, goes from the origin to (2, 2, 1) along b. A dashed line joins the tip of a to the tip of the projection and is perpendicular to b.
Observations on projection, angles and inequalities
The unit vector points along the -axis, so the angle between and the -axis satisfies . This is the direction cosine from Section 10.2. In the same way and .
If , and , then , so .
Since , we always have . This is the Cauchy–Schwarz inequality. For and : , while .
Equality holds exactly when the vectors are parallel. For and : and .
We know . Equality needs the two vectors to point the same way. With the vectors just above, , and , so (because ).
For any vectors, . So the sum and difference are perpendicular exactly when . Example: and both have length . Then , , and their dot product is . This is the fact that the diagonals of a rhombus cross at right angles.
EXERCISE 10.3
- Find and the angle between them for and .
- Find so that and are perpendicular.
- Show that and are perpendicular.
- Find the angle between and .
- Find the projection of on , and the vector projection.
- A force newtons moves an object through metres. Find the work done.
- and . Show that . Why does this happen?
- Show that and have the same length, and that is perpendicular to .
- Find the angle between a space diagonal of a cube and one of its edges (take the cube with vertices at and ).
- Check the inequality for and .
- For and , find the projection of on and of on . Are they equal?
- The points , , form a triangle. Show that it has a right angle at .
Answers
- . The dot product is negative, so the angle is obtuse: .
- The dot product is , so . The computer confirmed that and have dot product .
- .
- The dot product is and each length is , so and .
- and , so the projection is . The vector projection is .
- joules.
- Both are . The two vectors are perpendicular, so and the cross-terms in vanish.
- and . Then and , with dot product .
- The diagonal is and an edge is . Then , so .
- , so . Also and , so . Indeed .
- Projection of on : . Projection of on : . They are not equal, because the two lengths in the denominators differ.
- and . Their dot product is , so the sides at are perpendicular.
10.6.3 Vector (or cross) product of two vectors
The vector product of two non-zero vectors and , with angle between them (), is
Here is a unit vector perpendicular to both and . Its direction follows the right-hand rule: curl the fingers of your right hand from towards . Your thumb points along . If and are parallel, or one is zero, then .
The size is an area. is exactly the area of the parallelogram with sides and (base times height ).
A three-dimensional picture. A teal arrow a goes along the x-axis from the origin to (2, 0, 0). An orange arrow b goes from the origin to (1, 2, 0), both lying on the floor. A dark arrow a cross b points straight up from the origin to (0, 0, 4), perpendicular to the floor. Dashed lines complete the parallelogram on the floor.
Using the products , , (and the reverse orders giving the negatives), one finds
This is the expansion of the determinant .
Let and . Then
- -part: .
- -part: .
- -part: .
So , with magnitude . As a check, its dot product with is and with is , so it is perpendicular to both.
Observations on the cross product
- Swapping flips the sign. . For the vectors in the last section, .
- A vector crossed with itself is zero. , because .
- Parallel vectors have cross product zero. For non-zero vectors, exactly when . Example: and give .
- Scalars come out. . Check with : both sides are .
- Distributive law. . Check with , , : both sides equal .
- Area of a parallelogram with adjacent sides , : .
- Area of a triangle with sides , from one vertex: .
- A perpendicular direction. is perpendicular to both. Dividing by its length gives a unit vector perpendicular to both.
- The sine of the angle. .
Example: area of a triangle. The triangle has corners , , . Then and , so . Its length is . The area of the triangle is half of this: .
Lagrange's identity. Adding the dot and cross products gives a neat link: . It comes from . Check with and : , so . On the other side, .
Example: the angle. For and : and , so and .
EXERCISE 10.4
- Find for and .
- Find for and .
- Find a unit vector perpendicular to both and .
- Find the area of the parallelogram with adjacent sides and .
- Find the area of the triangle with vertices , , .
- Show that and are parallel by computing their cross product.
- Show that from Question 1 is perpendicular to both and .
- Check Lagrange's identity for and .
- Find for the angle between and , using the cross product.
- A wrench has the lever arm metres. A force newtons is applied at its end. The torque (turning effect) is . Find it.
- A parallelogram has sides and . Find its area two ways: from , and from half the cross product of the diagonals.
- Find so that and have cross product .
Answers
- : . : . : . So .
- , so .
- , with length . A unit vector is . (The negative of this vector also works.)
- , so the area is square units.
- , , and with length . The area is .
- The cross product is , the zero vector, so they are parallel.
- and .
- , and . Right side: . Left side: and . They agree.
- and , so and .
- newton-metres. It points along the -axis, the axis the wrench turns about, and has size (lever arm times force , since they are perpendicular).
- , so the area is . The diagonals are and , with cross product and length . Half of it is , the same.
- The second vector is twice , so the first must be this vector too: . (The computer confirmed that and are parallel.)
Miscellaneous Examples
Show that . Expand with the distributive law: . Since and , the result is . Check with , : both sides equal .
Find a unit vector perpendicular to both and . Their cross product is and its length is . So the unit vector is .
Suppose and the lengths are , , . Find . Square the sum: . So the sum of dot products is . Example: , , add to and the dot products total .
Take , , , . Then and are equal, so is a parallelogram. Its area is .
A box of weight units rests on a ramp that points along ( along, up). The part of the weight that pulls the box along the ramp is the projection of on : . The minus sign means it pulls down the slope, with strength .
Miscellaneous Exercise on Chapter 10
- Find and for and .
- Find so that is perpendicular to , where , , .
- Show that the points , , are the corners of an equilateral triangle, and find its area.
- Two unit vectors make an angle of . Find the lengths of their sum and difference.
- If and with , show that .
- Find the unit vector along the bisector of the angle between and , which have equal lengths.
- A parallelogram has sides and . Show that the cross product gives the same area as base height.
- Show that in general.
Answers
- . .
- . Its dot product with is . This is for , and then .
- Each side vector, such as , has length , so all three sides are equal. The area is .
- , so . , so .
- Let . Then and . The first says is perpendicular to (or zero). The second says is parallel to (or zero). Only the zero vector is both, so .
- Both have length . For equal lengths, is along the bisector (the diagonal of a rhombus). has length . The unit vector is .
- , so the area is . The base is and the height (the -component of ) is , and .
- and . Adding and using gives the result.
Summary
- A vector has magnitude and direction. A scalar has magnitude only.
- Position vector of : , with .
- Direction cosines , , satisfy . The unit vector is .
- Vector joining two points: from to is (end minus start).
- Addition: triangle law and parallelogram law; add components. It is commutative and associative. .
- Scalar multiple: . Vectors are parallel exactly when one is a multiple of the other.
- Section formula: the point dividing internally in the ratio is . Externally: . Centroid of a triangle: .
- Dot product: . It is a number. Zero exactly when the vectors are perpendicular. .
- Projection of one vector on another: . The vector projection of on is .
- Cross product: , perpendicular to both (right-hand rule). In components it is the determinant with rows ; ; . Swapping reverses the sign. It is zero exactly when the vectors are parallel.
- Areas: parallelogram ; triangle .
- Lagrange's identity: .
Historical Note
The word vector comes from the Latin vectus, which means "carried": a vector carries you from one point to another.
- Around 1800. Caspar Wessel (1745–1818) and Jean-Robert Argand (1768–1822) showed that a complex number can be drawn as an arrow in a plane. This was one of the first geometric uses of directed line segments.
- Forces. The idea that two pushes on an object combine by the parallelogram rule is very old. It goes back to ancient Greek thinkers, and in the 16th century Simon Stevin showed how to add forces correctly.
- 1840s and 1850s. William Rowan Hamilton (1805–1865), an Irish mathematician, invented quaternions: numbers of the form that follow special rules. He wanted a way to multiply vectors in three dimensions. He was the first to use the word "vector" for a directed line segment, in his Lectures on Quaternions (1853).
- 1880s. Josiah Willard Gibbs (1839–1903), an American scientist, and Oliver Heaviside (1850–1925), an English engineer, separated the "scalar part" of a quaternion from its "vector part". This created the vector analysis used today, with the dot product and cross product that you learned in this chapter. Gibbs printed his Elements of Vector Analysis in 1881 and 1884.
Today vectors are everywhere: in physics, in engineering, and in every computer game or animation, where a character's position, speed and direction are all stored as vectors.