Learn

Vectors

Contents

A vector is a quantity with both a size and a direction. A distance of 5 km is a scalar. A move of 5 km north-east is a vector. In three dimensions, lines, planes and the angles and distances between them all come from two products: the dot product and the vector product.

What is a vector?

A vector is drawn as an arrow. The length of the arrow is the size and the head shows the direction. A temperature of 20° is a scalar. A wind of 20 km/h from the north-west is a vector.

a = (3, 2) means 3 across and 2 up. A vector carries a direction, not just a size. Full lesson: Vectors

To calculate with a vector, write it as two numbers: the step across and the step up. A column vector writes the step across on top.

The vector goes 4 across and 3 up. A column vector writes the horizontal step on top. Full lesson: Column Vectors

A vector records a movement, not a place. The arrow from (1, 1) to (4, 3) and the arrow from (0, 0) to (3, 2) are the same vector, because both mean 3 across and 2 up.

Negating a vector keeps its length and reverses its direction. Full lesson: Column Vectors

See Vectors and Column vectors.

How do you add and subtract vectors?

To add two vectors, add the across parts and add the up parts. On a diagram, start the second arrow where the first one ends. The sum is the arrow from the first start to the last finish.

You land at (5, 5): 3 + 2 = 5 across and 1 + 4 = 5 up. Each part adds. Full lesson: Adding Vectors

To subtract a vector, add its negative, so each part subtracts. If a and b are the position vectors of two points, then b − a is the arrow from the first point to the second: destination minus start.

The gap between two points is exactly this move: destination minus start. Full lesson: Subtracting Vectors

Multiplying a vector by a number is scalar multiplication. Multiplying by 3 makes the arrow three times as long in the same direction. A negative number reverses it as well. Two vectors are parallel exactly when one is a scalar multiple of the other.

The scalar 3 makes three copies of one journey: 3a takes (2, 1) out to (6, 3). Full lesson: Scalar Multiplication

See Adding vectors, Subtracting vectors and Scalar multiplication.

Now you

The drawing chains a then b. Where does the journey end?

(-4, -2) + (-2, 2) is what?

What is the magnitude of a vector, and what is a unit vector?

The magnitude of a vector is the length of its arrow, written |a|. The two components are the shorter sides of a right triangle and the vector is the hypotenuse, so Pythagoras gives it: |(3, 4)| = √(3² + 4²) = 5.

Three across and four up draws a right triangle with the vector as its hypotenuse. Full lesson: Magnitude of a Vector

A unit vector has length 1. To make one in the direction of a, divide every component by |a|. For (3, 4) that gives (3/5, 4/5).

The short arrow points exactly the same way, and its length is now one. Full lesson: Unit Vectors

i is one step along the x-axis and j is one step along the y-axis, so 3i + 4j is the vector (3, 4). The position vector of a point is the vector from the origin O to that point, and the vector from A to B is AB = OB − OA.

In numbers: OB − OA = (2 − 5, 6 − 2) = (−3, 4), so 3 back and 4 up. Full lesson: Position Vectors

See Magnitude of a vector, Unit vectors, The unit vectors i and j and Position vectors.

Now you

How long is the vector (5, 12)?

A is at (3, 3) and B at (9, 11). How long is AB?

How do you prove a geometry result with vectors?

Write every point as a position vector. If A and B have position vectors a and b, the midpoint M of AB is reached by walking to A and then half of the gap: OM = a + ½(b − a) = ½(a + b).

Walk to A, then half the gap — the algebra simplifies to half of a plus b. Full lesson: Vector Proofs with Midpoints

In triangle OAB, let P and Q be the midpoints of OA and OB. Then PQ = ½b − ½a = ½AB. Because PQ is a multiple of AB, this one line proves that PQ is parallel to AB and half its length.

To prove PQ parallel to AB, show one is a multiple of the other. That is all. Full lesson: Vector Proofs with Midpoints

Two vectors are collinear when one is a multiple of the other, with the same multiplier in every component. Three points lie on one straight line when the vector from the first to the second is a multiple of the vector from the first to the third.

Now compare b = (3, 4) with a = (2, 1): 3 is 1.5 × 2, but 4 is 4 × 1. Full lesson: Collinear Vectors

See Vector proofs with midpoints and Collinear vectors.

Now you

Are (2, 3) and (7, 9) along the same line?

Are (4, 4) and (12, 12) along the same line?

What does the dot product actually measure?

The dot product measures how far two vectors point the same way. Multiply the matching components and add: (a₁, a₂) · (b₁, b₂) = a₁b₁ + a₂b₂. The answer is a number, not a vector.

Multiply matching components — across with across, up with up — then add. Full lesson: The Dot Product

The same number is |a| |b| cos θ, where θ is the angle between the arrows. It is largest when the vectors point the same way, zero at a right angle, and negative past 90°.

It is a’s length times the part of b lying along a — biggest when the two line up. Full lesson: The Dot Product

To find the angle, divide the dot product by both lengths: cos θ = a · b / (|a| |b|). Perpendicular vectors have a dot product of zero, because cos 90° = 0.

a · b = |a| |b| cos θ, so dividing by both lengths leaves cos θ on its own. Full lesson: The Angle Between Vectors

See The dot product and The angle between vectors.

Now you

Which pair is perpendicular? Check the dot products.

Two vectors have a dot product of 0. What is the angle between them?

How do vectors work in three dimensions?

A vector in three dimensions has a third component for depth: (2, 3, 6), or 2i + 3j + 6k, where k is one step into depth. Addition, scalar multiplication and the dot product work exactly as before.

A third number for depth: (2, 3, 6) cuts corner to corner through a box. Full lesson: Vectors in Three Dimensions

The magnitude gains one more square under the root: |(2, 3, 6)| = √(4 + 9 + 36) = 7.

The length just gains one more square: the root of 4 + 9 + 36 is 7. Full lesson: Vectors in Three Dimensions

The distance between two points is the magnitude of the vector between them. The midpoint averages each coordinate on its own, z included.

A(1, 2, 3) to B(7, 10, 27): the gaps are 6, 8 and 24, so the distance is 26. Full lesson: Distance and Midpoint in Three Dimensions

See Vectors in three dimensions and Distance and midpoint in three dimensions.

What is the vector equation of a line?

A line is fixed by one point a on it and one direction d along it. Every point of the line is r = a + t d for some number t.

Start at a, then walk copies of d — every stride lands on the same line. Full lesson: The Vector Equation of a Line

The Cartesian form removes the parameter. Make t the subject of each coordinate equation and set the three expressions equal: (x − a₁)/d₁ = (y − a₂)/d₂ = (z − a₃)/d₃. The numerators give the point and the denominators give the direction.

So set them equal. That is the Cartesian form, with the parameter gone. Full lesson: The Cartesian Form of a Line

In space, two lines that are not parallel can still miss each other, like a bridge and the road under it. Such lines are skew. Set the two positions equal, solve two of the three component equations for t and s, and substitute into the third. If it holds, the lines meet. If it fails, they are skew.

The spare equation is the test. It holds, so the lines really do meet at (3, 4, 2). Full lesson: Intersecting and Skew Lines

See The vector equation of a line, The Cartesian form of a line and Intersecting and skew lines.

What is the cross product for?

The vector product, or cross product, a × b is a new vector at right angles to both a and b: a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁). Swapping the order reverses the answer: b × a = −(a × b).

Both arrows lie flat with no depth, and the answer is pure depth: (0, 0, 5). Full lesson: The Vector Product

Its length is |a| |b| sin θ, the area of the parallelogram the two vectors span. Half of that is the area of the triangle with the same two sides.

Two vectors from one corner span a parallelogram: base |a|, height |b| sin θ. Full lesson: Parallelogram Area from the Vector Product
The diagonal cuts it into two matching triangles, each one half of the area. Full lesson: Parallelogram Area from the Vector Product

See The vector product and Parallelogram area from the vector product.

How do you write the equation of a plane?

From one point a on the plane and two directions b and c inside it, every point is r = a + λb + μc. The other form uses a normal n, a vector at right angles to the plane. For any point r of the plane, r − a lies in the plane, so (r − a) · n = 0, which is r · n = a · n. Call that constant d: r · n = d.

Writing r as (x, y, z) opens the dot product out into ax + by + cz = d, and the coefficients are the components of the normal. The plane 2x + 3y + z = 7 has normal (2, 3, 1).

Write r as (x, y, z) and the dot product opens out into 2x + 3y + z = 7. Full lesson: The Cartesian Equation of a Plane

The angle between two planes is the angle between their normals.

Two planes tilt apart by exactly the angle their two normals tilt apart. Full lesson: The Angle Between Two Planes

The angle between a line and a plane is 90° minus the angle between the line and the normal. Complementary angles swap cosine for sine, so sin θ = |d · n| ÷ (|d| |n|). The common mistake is to stop at cos θ, which is the angle to the normal.

A normal stands at right angles to its plane, so the two angles always add to 90°. Full lesson: The Angle Between a Line and a Plane

See The vector equation of a plane, The Cartesian equation of a plane, The angle between two planes and The angle between a line and a plane.

How do you find where things meet, and how far apart they are?

To find where a line meets a plane, substitute the line's x, y and z, each in terms of t, into the plane equation. Solve for t, then put t back into the line. If the t terms cancel, the line is parallel to the plane.

Solve for t, then put it back into the line to find the meeting point. Full lesson: The Intersection of a Line and a Plane

Two planes that are not parallel meet along a line. The line lies in both planes, so its direction is the cross product of the two normals. For a point on it, set z = 0 and solve the two plane equations for x and y.

The line is perpendicular to both normals, so the cross product gives its direction. Full lesson: The Intersection of Two Planes

The shortest distance from a point P to a plane runs along the normal. Substitute P into ax + by + cz, subtract d, take the size of the result, and divide by |n|. The division converts lengths of n into ordinary distance.

Any other route to the plane is a hypotenuse, so the perpendicular is shortest. Full lesson: The Distance from a Point to a Plane

See The intersection of a line and a plane, The intersection of two planes and The distance from a point to a plane.

Now you

P is (6, 6, 4) and sits 3 from a plane with normal (2, 1, 2), which has length 3. Where is the foot of the perpendicular?

Which direction gives the shortest route from a point to a plane?

How do vectors describe motion?

If an object starts at r₀ and moves with constant velocity v, its position after t seconds is r = r₀ + v t.

Add v again for each second that passes. The positions lie on one straight line. Full lesson: Position and Velocity as Vectors

Two objects collide only if their position vectors are equal at the same time t. Solve one coordinate for t, then test the other.

These two straight paths cross. That is a fact about the routes, not about the objects on them. Full lesson: Meeting Points and Travel Times

For the closest approach, subtract one position vector from the other to get the gap as a vector in t. The square of its length is a quadratic in t. Differentiate, set the derivative to 0 to find t, then take the square root for the distance.

The curve turns once. That turning point is the moment the two are nearest. Full lesson: The Closest Approach of Two Objects

When the velocity varies, differentiate the position vector coordinate by coordinate for the velocity, and again for the acceleration. An object that sets off k seconds later has position r(t − k).

See Position and velocity as vectors, Meeting points and travel times, The closest approach of two objects, Velocity that varies with time and Motion that starts later.

The mistakes worth naming

Learn this properly in the app

Every lesson linked above is an illustrated screen in Math Challenge with a diagram, a worked example and practice questions. Lines, angles and Pythagoras covers the right triangle behind the magnitude formula, matrices and determinants write the same geometry another way, and triangle trigonometry and bearings solves the same problems without vectors.

Your turn

Three to try — tap what you get.

(2, 3) + (4, −1)

3 × (1, −2)

The magnitude of (3, 4)

Math ChallengePractice that adapts to you, the whole lesson ladder, and your progress saved.
Start with Math Challenge

Mr. Chalk Practice this lesson in the app