10. Vector Algebra
10.1 Chapter Opener: Introduction and Directed Line Segments
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.
A gust of wind pushes a ball sideways while it rolls forward. A boat engine pushes east while the river pushes north. In each case two directed efforts combine into one real motion. This chapter builds the mathematics of such combinations: how to describe an arrow by numbers, add arrows tip to tail, stretch them, locate points that divide a segment in a given ratio, and multiply vectors in two useful ways.
- Sections 10.1 to 10.3: what vectors and scalars are, how to write a position vector, what direction cosines say, and the family of vector types.
- Sections 10.4 to 10.5: adding vectors, stretching them by a number, working in components, and the section formula.
- Section 10.6: the two products — the dot product (a number that tests right angles and finds projections) and the cross product (a vector that gives areas and perpendicular directions).
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.
- [Board Standard] A scalar has only a size (magnitude). Examples: mass, time, temperature, distance, speed, area, energy.
- [HOTS] A vector has a size and a direction. Examples: displacement, velocity, acceleration, force, momentum.
The magnitude of a vector is its size, written with bars: the magnitude of is . It is never negative.
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.
Read the figure: follow the solid teal path first, counting east and then north, for a total of . Then look at the dashed orange arrow, which jumps straight from start to end. Its length is shorter than the walked path, because a straight line is the shortest route. The path is distance; the straight arrow is displacement.
Suppose a runner completes one full lap of a -metre track and stops at the start line. The distance covered is metres, but the displacement is the zero vector: start and end are the same place. A taxi meter charges by distance, but a map app navigates by displacement. Keeping the two ideas apart avoids the most common error in this chapter.
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 |
The word vector comes from the Latin vectus, which means "carried": a vector carries you from one point to another.
- Pushes combine like a parallelogram. The idea that two pushes on an object combine by the parallelogram rule is very old. Ancient Greek thinkers studied it, and in 1586 the Flemish engineer Simon Stevin showed how to add forces correctly. Whenever two people push a heavy box from two sides, the box moves along the diagonal.
- Arrows in the plane, around 1800. The Norwegian surveyor Caspar Wessel (1745–1818) and the Swiss bookkeeper Jean-Robert Argand (1768–1822) each showed that a number of the form can be drawn as an arrow in a plane. This gave directed line segments their first precise mathematical home.
- Quaternions, 1843. The Irish mathematician William Rowan Hamilton (1805–1865) wanted a way to multiply vectors in three dimensions. He invented quaternions: numbers of the form that follow special rules. He was the first to use the word vector for a directed line segment, in his Lectures on Quaternions (1853).
- Modern vectors, 1880s. The American scientist Josiah Willard Gibbs (1839–1903) and the English engineer Oliver Heaviside (1850–1925) 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 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. The chapter's big idea survives unchanged: direction plus size, combined by rules.
10.2 Basic Concepts: Position Vectors, Direction Cosines and Types of Vectors
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:
The idea: first find the flat distance in the -plane, . Then treat that as one leg of a second right triangle whose other leg is the vertical step . The hypotenuse of the second triangle is .
Example: for and , the differences are , , . The squares add to , so . Note that a negative difference, such as , still gives a positive square, .
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.
Read the figure: find the labelled points and first, then follow the teal arrow from to . The arrow rises units in while moving along and along . Here .
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 . Watch the signs: , so a negative component still adds a positive amount to the length.
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.
Read the figure: start at the origin and follow the three dashed steps, along , then along , then straight up. The teal arrow is the shortcut that does all three steps at once. Its length is the straight-line distance from to .
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 squares of the direction cosines always add to .== 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 .
| Vector | Length | Direction cosines | Angles |
|---|---|---|---|
| , , | , , | ||
| , , | , , |
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 .
Vectors come in families. Each name below captures one simple idea: zero size, unit size, a shared start, a shared line, or an exact match. Learn each name with its example row.
| 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 . The final check is always the same: the squares of the unit-vector components must add to .
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.
10.3 Vector Addition, Scalar Multiplication and Components
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.
Read the figure: the teal arrow runs east, the orange arrow starts at its tip and runs north, and the dark arrow jumps from the start straight to the end. 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: . To subtract, change every sign in and then add: for , for , for .
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.
Vector addition follows the same rules as adding numbers. Each rule was checked with numbers by computer, using , and .
- [Concept] Commutative: . Both give . The order does not matter: the two routes of the parallelogram end at the same corner.
- [Board Standard] Associative: . Both give . You can group in any way, so we may write .
- [Board Standard] Zero vector: . Adding the zero vector changes nothing.
- [HOTS] 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).
Read the figure: the two dashed sides complete the parallelogram, and the dark diagonal is shared by both routes. Whichever side you walk first, you arrive at the same far corner. That shared corner is why addition is commutative.
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 , , : . For a square of side : .
Multiplying a vector by a number stretches or shrinks it. The number is called a scalar. The result has:
- [Concept] length ;
- [Board Standard] the same direction as if , the opposite direction if ;
- [HOTS] 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).
Read the figure: all three arrows lie on one straight line through the origin. The orange arrow reaches exactly twice as far as the teal one, while the grey arrow points the opposite way with the same length as the teal one. Scaling never turns the arrow sideways.
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 . The final check: , and .
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.
- [Concept] Magnitude: .
- [Board Standard] Equal vectors: exactly when all three components match.
- [Board Standard] Sum and difference: add or subtract the matching components.
- [HOTS] Scalar multiple: multiply each component.
- [HOTS] 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. Each component is read straight off the vector: no geometry is needed.
Let and . Then
- [Board Standard] , with .
- [HOTS] , with .
Do the subtraction one component at a time: for , for , for . Then .
For which is parallel to ? The ratio of the -components is , and for the -components . They agree, so . The computer confirmed that and are parallel.
Write as . Comparing components: and . Solving gives and . Check: .
10.4 Vector Joining Two Points and Section Formula
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.
Read the figure: the two thin grey arrows are the position vectors and from the origin. The teal arrow completes the triangle . Sliding so it starts at shows that , which is why .
Example 2: a triangle. Take , , . Then , and . Adding the three gives , as it must for a closed triangle.
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
Why does the internal formula work? The point is of the way from to , so its position is . Clearing the denominator gives .
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.
Read the figure: sits on the segment between and , nearer to . That matches the ratio , since is the shorter piece. If the ratio were , would sit exactly in the middle.
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 .
10.5 Scalar (Dot) 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.
A mover pushes a box with force newtons while the box slides metres. The dot product is : only the along the motion counts, so the work is joules. The cross product is : it points along with size , the area swept by the two arrows. Same two arrows, two different answers, each useful.
| Question | Dot product | Cross product |
|---|---|---|
| Written as | ||
| Answer is | a number | a vector |
| Needs | the cosine of the angle | the sine of the angle |
| Zero when | perpendicular | parallel |
| Order | does not matter | swap changes the sign |
| Tells you | agreement and work | area and turning |
Read the table row by row: the first two rows say what each product looks like, the next three say when each one vanishes or changes, and the last row says what each one is for. The rest of this section fills in every cell.
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 . ==Why the sign works: is positive for sharp angles, at a right angle, and negative for wide angles.==
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
Multiply the matching components and add. Example. For and : . The lengths are and . So
So . The positive dot product already told us the angle is sharp before we computed it.
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.
Read the figure: both arrows start at the origin, so the gap between them is the angle in the formula. Because the gap looks sharp (less than a right angle), the dot product comes out positive. A wide gap would give a negative product.
- [Concept] Perpendicular vectors. If and are non-zero, then exactly when they are perpendicular (because ). Example: and give , so they are perpendicular.
- [Board Standard] The sign tells the angle. Positive means (sharp). Zero means . Negative means (wide). Example: and give , and the angle is .
- [Board Standard] A vector with itself. , since and . For this is . This is how we get the length: .
- [HOTS] Order does not matter. .
- [HOTS] The unit vectors. Each of , , has length , and the three are mutually perpendicular. So:
Read the table: the diagonal is all (each unit vector with itself), and every off-diagonal entry is (different unit vectors are perpendicular). This table is why the component formula works: all the cross-terms like are zero, and all the square terms are one.
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 Projection of a Vector and Exercise 10.3
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 wide (the shadow points backwards). As a vector, the shadow is this length times the unit vector :
The denominator is the squared length, so no square root is needed for the vector form. Divide the dot product by one length for the number, and by the squared length times the vector for the arrow.
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. Every vector splits into an along-part and a square-part relative to any direction.
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.
Read the figure: the orange arrow lies exactly on top of the grey arrow , ending at the labelled point. The dashed segment drops from the tip of to that point at a right angle, like a shadow cast straight down. Its length is the projection number.
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 . The dot product unites the two halves of this chapter.
If , and , then , so . Always solve for first and take the inverse cosine last.
A graph of the cosine curve from 0 to 180 degrees. It starts at 1, crosses zero at 90 degrees and ends at minus 1. Five marked points show 0, 45, 90, 135 and 180 degrees.
Read the figure: the curve starts at (arrows aligned, dot product largest), passes through at (perpendicular, dot product zero) and ends at (opposite arrows, dot product most negative). The five marked points are the angles you should know by heart.
| Angle | Cosine | Dot product sign | Meaning |
|---|---|---|---|
| sharp, less than | positive | positive | the arrows mostly agree |
| zero | perpendicular | ||
| wide, more than | negative | negative | the arrows mostly oppose |
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.
10.7 Vector (Cross) Product of Two Vectors and Exercise 10.4
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 ). The length of the cross product is the area of the parallelogram the two vectors span.
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.
Read the figure: the teal and orange arrows lie flat on the floor (), and the dashed lines complete their parallelogram. The dark arrow shoots straight up, at right angles to both: that is the right-hand rule in action, since curling from (east) towards (north-east) lifts the thumb upwards. Its length equals base times height .
Using the products , , (and the reverse orders giving the negatives), one finds
This is the expansion of the determinant . Cover the column and cross-multiply the rest for the -part, then move across.
Let and . Then
- [Concept] -part: .
- [Board Standard] -part: .
- [HOTS] -part: .
So , with magnitude . As a check, its dot product with is and with is , so it is perpendicular to both. Always run this dot-product check: a non-zero result means an arithmetic slip.
- [Concept] Swapping flips the sign. . For the vectors in the last section, .
- [Board Standard] A vector crossed with itself is zero. , because .
- [Board Standard] Parallel vectors have cross product zero. For non-zero vectors, exactly when . Example: and give .
- [HOTS] Scalars come out. . Check with : both sides are .
- [HOTS] Distributive law. . Check with , , : both sides equal .
| Rule | Dot product | Cross product |
|---|---|---|
| Swap the factors | no change | sign flips |
| Vector with itself | ||
| Zero means | perpendicular | parallel |
| Scalar | comes out | comes out |
| Spreads over | yes | yes |
Read the table: the two products share the last two rows but differ in the first three. That difference is what Exercise 10.4 tests, so learn it as pairs: dot is symmetric and self-gives-length; cross is anti-symmetric and self-gives-zero.
- [Concept] Area of a parallelogram with adjacent sides , : .
- [Board Standard] Area of a triangle with sides , from one vertex: .
- [Board Standard] A perpendicular direction. is perpendicular to both. Dividing by its length gives a unit vector perpendicular to both.
- [HOTS] 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 .
10.8 Miscellaneous Worked Examples
The worked examples below mix every tool in the chapter: dot and cross products, magnitudes, the section formula and geometric checks. Read each one as a model for the final exercise set.
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 . The negative of this vector is equally correct: both point along the same line.
Suppose and the lengths are , , . Find . Square the sum: . So the sum of dot products is . Example: , , add to and the dot products total . Note that , , is a Pythagoras triple, so these three arrows form a closed right triangle.
A right triangle with corners at (0, 0), (3, 0) and (3, 4). The bottom side is 3 long, the right side is 4 long and the sloping side is 5 long.
Read the figure: follow the teal path from the start along the bottom (), up the right side (), then back along the slope (). The three arrows close the loop, which is exactly what says.
Take , , , . Then and are equal, so is a parallelogram. Its area is . The test is always the same: opposite sides must be equal vectors, not just equal lengths.
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 . Only the along-slope part can move the box; the rest presses into the ramp.
A parallelogram has adjacent sides and . By the cross product, , so the area is . By base times height: the base along is , and the height is the -part of , which is , so the area is . The two routes agree, as they must.
10.9 Miscellaneous Exercise and Board Assessment
10.10 Chapter Summary and Vector Identity Matrix
This chapter built the algebra of arrows. Every rule below was met with a worked example above; use this list to revise before the final exercise set.
- 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: .
- Choosing the product: to test a right angle, find a shadow, or compute work, use the dot product. To find an area, a turning effect, or a perpendicular direction, use the cross product.