The Mathematical Toolkit
Vectors, calculus and honest numbers: the language physics is written in.
Scalars & Vectors
Why 3 + 4 is sometimes 5: quantities that carry a direction.
Physics borrows its grammar from mathematics. The first word in that grammar is the vector: a quantity that only makes sense once you know which way it points.
Throughout this course we will lean on algebra, trigonometry and geometry, plus three tools that may be newer to you: vector algebra, differential calculus and integral calculus. This chapter builds all three from the ground up, and finishes with how to report a measurement honestly.
Numbers that just add
Pour 250 g of milk into a mug that already holds 150 g of coffee. The mug now contains 400 g of liquid. No geometry is involved; the masses add like ordinary numbers. A quantity that is fully described by a single value (with its unit) and that combines by ordinary arithmetic is called a scalar.
Mass, time, temperature, energy and volume are all scalars.
Numbers that need a direction
Now think about velocity. Saying a cyclist moves at 5 m/s tells you how quickly, but not where. North? Up a hill? Toward you? To describe velocity completely you need a size and a direction.
The natural picture is an arrow. Choose a scale (say 1 cm of paper for every 1 m/s), draw a line of the right length parallel to the motion, and put an arrowhead on the leading end. The pointed end is the head, the other end the tail.
Here is the surprising part. Direction changes how such quantities combine. Try it below: two walks of fixed length can leave you anywhere between 1 m and 7 m from where you started.
At 90° the result is 5.00 m, not 7 m. Direction changes how quantities combine.
Two motions at once
Imagine a bead that slides along the inside of a drinking straw at 6 cm/s. While it slides, you push the whole straw sideways across the table at 8 cm/s, keeping it perpendicular to its length. After one second the bead has gone 6 cm along the straw and the straw has shifted 8 cm sideways. Watch where the bead actually ends up relative to the table.
The bead travels in a straight diagonal line: 10 cm in one second, at about 53° from the straw. Its true velocity is 10 cm/s, not 6 + 8 = 14 cm/s. Those three numbers (6, 8, 10) form a right triangle, and that is no coincidence.
The resultant is also called the sum of the two arrows, and this way of adding is the triangle rule of addition.
In print we mark vectors with an arrow on top, as in , or , or with bold type: v, F. The plain letter (or ) then means just the magnitude.
mass, time, energy, temperature, speed
displacement, velocity, force, field
When are two vectors equal?
Two vectors representing the same kind of quantity are equal when they have the same magnitude and the same direction. Where you draw them does not matter. Slide an arrow anywhere on the page without rotating or stretching it, and it is still the same vector. This freedom to translate arrows is exactly what lets us move the second arrow to the head of the first when we add.
- 1Scalars are single numbers with units; they add arithmetically.
- 2Vectors carry magnitude and direction and add by the head-to-tail (triangle) rule.
- 3Having a direction is not sufficient: electric current has one but is not a vector.
- 4A vector is unchanged by sliding it parallel to itself. Equal vectors have equal length and direction.
Check yourself
Videos, simulations & further reading (6)
Adding Vectors
Head-to-tail, parallelograms, and the law that gives the size of a sum.
Adding vectors is a drawing exercise before it is an algebra exercise. Get the picture right and the formula falls out of a single right triangle.
Two ways to draw the same sum
To add and with the triangle rule, place the tail of on the head of . The arrow from the tail of to the head of is the sum.
The parallelogram rule says the same thing differently. Draw both vectors from a common tail, complete the parallelogram they span, and the diagonal from the shared tail is the sum. It is the triangle rule seen twice: the far sides of the parallelogram are just copies of and , slid into place.
How long is the sum?
Let the magnitudes be and , with angle between the vectors when drawn tail to tail. In the head-to-tail picture, extend the line of and drop a perpendicular from the far corner D to meet it at E.
Side BE is the part of that runs along : . Side DE is the part that sticks out sideways: . Pythagoras on the right triangle ADE gives
and the last bracket is exactly 1. So:
The same triangle also tells us the direction. If is the angle the sum makes with , then opposite over adjacent in triangle ADE gives
Check the extreme cases in the graph below. At the cosine is 1 and the sum is simply . At the cosine is −1 and you get . At the middle term disappears and you are back to Pythagoras.
Forces of 6 N and 10 N pull on a ring, with an angle of 60° between them. Find the size of the combined pull and its direction relative to the 6 N force.
Two vectors each of magnitude make an angle with each other. Show that their sum has size and points exactly midway between them.
- 1Triangle rule: head of the first to tail of the second; the sum runs from the first tail to the last head.
- 2Parallelogram rule: tails together; the sum is the diagonal from the common tail. It gives the same answer.
- 3Size: , which ranges from to .
- 4The sum of two equal vectors bisects the angle between them.
Check yourself
Scaling & Subtracting
Stretching, flipping, unit vectors and subtraction as adding the reverse.
Multiply an arrow by a number and it stretches. Multiply by a negative number and it turns around.
Scaling a vector
Take a vector of magnitude and an ordinary number . The product is defined to be a vector of magnitude :
- if , it points the same way as ;
- if , it points the opposite way.
Multiplying by −1 keeps the length and reverses the direction. So and are equally long and point in opposite directions.
This split into “how much” and “which way” comes up constantly. In the next lesson the three unit vectors along the coordinate axes will turn vector problems into arithmetic.
Subtracting a vector
Subtraction needs no new rule. We define as the sum of and :
Because makes an angle of with , the magnitude formula changes only by a sign:
Vectors and each have magnitude 8 units, and the angle between them is 60°. Find and .
- 1 has length ; a negative reverses the direction.
- 2Any vector = magnitude × unit vector: .
- 3 means ; drawn from a common tail it runs from the head of b to the head of a.
Check yourself
Videos, simulations & further reading (3)
Components & Unit Vectors
Break any arrow into x, y and z shadows, and adding becomes arithmetic.
Shine a light straight down on an arrow and look at its shadow. That shadow is a component, and components turn vector geometry into plain arithmetic.
Resolving a vector in a plane
Put a vector in the x–y plane with its tail at the origin. Say it makes angle with the x-axis and with the y-axis. Drop perpendiculars from A to each axis, meeting them at B and C. By the triangle rule,
We have split one arrow into two: one lying along x, one along y. The length OB is the projection of on the x-axis, which is . Likewise OC .
Now bring in the unit vectors and , arrows of length 1 pointing along +x and +y. Then and , so
Three dimensions
A vector that leaves the x–y plane also casts a shadow on the z-axis. If it makes angles with the x, y and z axes, then with the unit vector along z:
The numbers , , are the components of . Equation (2.3) says that every vector is a combination of the same three building blocks .
More generally, the component of along any direction that makes angle with it is , which is its projection onto that direction. Nothing forces us to use x, y, z. Physicists often choose axes along a slope, along a rope, or along the motion, whichever makes the problem easiest.
A force of 20 N acts at 30° to the vertical. Find its vertical and horizontal components.
Why components make addition easy
Suppose we know three vectors by their components:
Adding them is just collecting like terms:
No triangles, no cosine rule, however many vectors you add. Try it with three arrows:
For vectors in the x–y plane the result is two perpendicular pieces, and , so
- 1A component is a projection: along a direction at angle θ.
- 2Any vector can be written .
- 3 for any direction.
- 4To add vectors, add their components separately, then rebuild the magnitude and angle.
Check yourself
The Dot Product
Multiply two arrows, get a number: how much one points along the other.
Two arrows go in, a single number comes out. The dot product measures how much two vectors agree about direction.
Definition
The dot product (or scalar product) of and is
Read it as “the length of times the shadow of on ” (or the other way round, since the formula is symmetric). Explore it:
Acute angle: b leans along a, so a · b is positive.
Three cases are worth fixing in memory:
- Same direction (θ = 0): , the largest possible value.
- Perpendicular (θ = 90°): , so the dot product is zero. This is the standard test for perpendicularity.
- Opposite (θ = 180°): .
Algebraic rules
The dot product behaves like ordinary multiplication in two important ways:
A crane pulls a crate upward with a force of 15 N, but the crate still moves 3.0 m downward. How much work does the crane’s force do?
The dot product from components
Write and similarly for . Expanding the product with the distributive law gives nine terms, each a dot product of two unit vectors. Those are easy, because the unit vectors have length 1 and are mutually perpendicular:
| · | |||
|---|---|---|---|
| 1 | 0 | 0 | |
| 0 | 1 | 0 | |
| 0 | 0 | 1 |
Six of the nine terms vanish, leaving a formula you will use constantly:
Find the angle between and .
- 1 is a scalar: length of one × shadow of the other.
- 2Zero dot product (for non-zero vectors) means perpendicular.
- 3In components: . Use it to find angles.
- 4Work is a dot product, so it can be positive, negative or zero.
Check yourself
The Cross Product
Multiply two arrows, get a third one standing perpendicular to both.
The second way to multiply vectors produces a new vector, one that stands perpendicular to both of the originals. Torque, angular momentum and magnetic force are all built this way.
Magnitude
The cross product (or vector product) is a vector whose size is
Draw the two vectors tail to tail and you see two angles between them, one less than 180° and one more (they add to 360°). The θ here is always the smaller one, so and the magnitude is never negative.
Geometrically, is the area of the parallelogram spanned by the two vectors (base times height ). Parallel or anti-parallel vectors span no area, so their cross product is zero.
Direction: the right-hand rule
points perpendicular to the plane containing and . That leaves two choices, up or down, and a convention picks one:
Push past 180° in the lab above. The smaller angle is now measured the other way round, your fingers curl the opposite way, and the product flips downward. Hit “swap order” and the same thing happens. Reversing the order of a cross product reverses its direction:
It does distribute over addition, but it is not associative:
units, units and units. What is the angle between and ?
Right-handed axes
Once you choose x and y axes, the z-axis must be perpendicular to both, but it could point either way. We always choose it so that . Such a frame is called right-handed, and everything else follows from the cycle:
Go round the circle with the arrows and the product is positive:
î × ĵ = k̂ · ĵ × k̂ = î · k̂ × î = ĵ
Go against the arrows and pick up a minus sign:
ĵ × î = −k̂ · k̂ × ĵ = −î · î × k̂ = −ĵ
And any unit vector crossed with itself gives zero.
Cross product from components
Expand into nine terms and use the cycle above. Three terms vanish (a unit vector crossed with itself) and the rest pair up:
- 1 = area of the parallelogram the vectors span.
- 2The direction is perpendicular to both, chosen by the right-hand rule.
- 3Order matters: . Parallel vectors give zero.
- 4Right-handed axes: , and cyclically.
Check yourself
Videos, simulations & further reading (6)
Derivatives: Measuring Change
Zoom into a curve until it looks straight. Its slope is the derivative.
Physics is full of “how fast” questions: how fast position changes, how fast velocity changes, how fast temperature drops. The derivative is the precise answer.
Rate of change, roughly
Take two quantities and linked so that each gives exactly one , and plot the graph. Nudge by a small amount ; responds with a change . A natural first guess for “the rate at which changes with ” is
which is the slope of the straight chord (the secant) joining A to B .
The trouble is that a curve’s steepness changes along the way. Between A and B it might start gentle and end steep, and the chord averages all of that into one number. To pin down the rate at A itself we need B closer. And closer.
As shrinks the chord pivots about A and settles onto the tangent line, and the ratio settles on a definite value even though both and are heading to zero. That limiting value is the derivative.
For a small but finite change you can turn this around and estimate: . This approximation is how physicists reason about small changes all the time.
Computing a derivative by hand
Graphs are great for intuition, but we usually know as a formula. Take the area of a square of side : . Grow the side to :
So . The picture says why: the area grows mostly through two strips of length , and the little corner is a second-order crumb that vanishes in the limit.
A small library of derivatives
You will not do the limit by hand every time. Here are the results for the functions that show up most in physics. is also called the derivative or differential coefficient of with respect to .
| y | dy/dx | y | dy/dx |
|---|---|---|---|
Three rules let you combine them:
Find for .
A ripple spreads so that its radius is . How fast is the enclosed area growing at ?
- 1, which is the slope of the tangent.
- 2Positive derivative: rising. Negative: falling. Zero: momentarily flat.
- 3For small changes, .
- 4Learn the table and the three rules (constant multiple, sum, product); they cover almost everything.
Check yourself
Videos, simulations & further reading (7)
Peaks & Valleys
Where the slope is zero, something interesting is happening.
The highest point of a ball’s flight, the cheapest shape for a can, the angle that throws farthest: optimisation problems all come down to finding where a slope is zero.
Flat tops and flat bottoms
Picture any smooth curve with a hump and a dip. At the very top of the hump (a maximum) and the very bottom of the dip (a minimum), the tangent line lies perfectly flat. A flat tangent has zero slope, and slope is the derivative. So at a maximum or minimum,
Peak or valley? Ask the second derivative
A zero slope alone does not say which one you have found. Look at how the slope behaves as you pass through the point:
- Approaching a maximum the slope is positive, at the top it is zero, and afterwards it is negative. The slope is decreasing.
- Through a minimum the slope goes from negative to zero to positive. The slope is increasing.
“How fast the slope changes” is the derivative of the derivative, written . That gives the test:
A ball is thrown straight up at . Its height after time is with . When is it highest, and how high does it go?
You have 20 m of fencing to enclose a rectangular garden. Which dimensions give the largest area?
- 1At a maximum or minimum, .
- 2 → maximum; → minimum.
- 3If the physical situation makes it obvious, you can skip the second test.
Check yourself
Integration: Adding Up Slivers
Slice an area into thin bars, add them all, and let the slices vanish.
Differentiation breaks a quantity into rates. Integration does the reverse: it adds up countless tiny contributions to rebuild the whole.
The area under a curve
Let a curve PQ show between and . Drop vertical lines from P and Q to the x-axis, meeting it at A and B. What is the area of the region PABQ under the curve?
Here is a strategy that works for any curve. Chop AB into equal strips, each of width . Over each strip, draw a rectangle whose height is the curve’s height at the strip’s left edge. Rectangles are easy to measure, so add them:
This is a little off, because thin slivers between the bar tops and the curve are missed (or overcounted). But use more, thinner strips and the bars touch the curve at more points while the slivers shrink. Try it:
As (equivalently ) the error vanishes and the sum becomes the exact area. We write that limit with a stretched S, for “sum”:
Doing one by hand: the area under y = x
Take . The region under it between and is a trapezium, so we know the answer should be (average height) × width . Let’s get there by summing bars. The bar heights are , an arithmetic progression of terms, so
using . Letting :
The shortcut: antiderivatives
Summing series by hand gets painful fast. Fortunately there is a beautiful shortcut. Find any function whose derivative is . Then
is called the antiderivative or indefinite integral of , written . Check it on our trapezium: , so , exactly what the long way gave.
A table of integrals
| f(x) | ∫ f(x) dx | f(x) | ∫ f(x) dx |
|---|---|---|---|
And three rules:
Evaluate .
Find the area under from to .
- 1 is the limit of a sum of thin bars, which is the area under the curve.
- 2If , then .
- 3Integration and differentiation are inverse operations.
- 4In physics, an integral means adding up many small contributions: distance from speed, work from force, and so on.
Check yourself
Significant Figures
Every digit you write is a promise. Keep only the ones you can keep.
A measurement is a claim about the world. The digits you write tell the reader how precise that claim is, so writing too many is quietly dishonest.
Certain digits and one doubtful digit
Every measurement is read off some calibrated scale: a ruler, a stopwatch, the needle of an ammeter. You write down every digit the markings give you directly, then one more digit estimated by eye between the finest markings. The finest division of the scale is its least count.
On an ordinary metre rule the numbered marks are a centimetre apart, with ten small divisions in between, so the least count is 1 mm. Suppose an object’s edge falls between the 10.4 cm and 10.5 cm marks. Mentally slice that millimetre into tenths, judge where the edge sits, and you might record 10.46 cm. The 1, 0 and 4 are certain; the 6 is a careful guess.
All of these digits, the certain ones plus the single doubtful one, are called significant digits. The reading 10.46 cm has four. The rightmost (doubtful) digit is the least significant digit; the leftmost is the most significant digit.
The trouble with zeros
Zeros are slippery. If someone reports a length as 600 mm and says nothing about the instrument, are those zeros measured or just placeholders?
- With a scale marked only every metre, the 6 is already the eye estimate. Only one digit is significant.
- With centimetre markings, “60” was read and the last zero is a placeholder: two significant digits.
- With millimetre markings, all three digits 6, 0, 0 are significant.
Scientific notation removes the guesswork: write mm, mm or mm to state one, two or three significant digits. And when a number is less than 1, the zeros right after the decimal point are never significant. They just position the decimal point. So 0.0023 has two significant digits while 1.0023 has five.
Significant digits in calculations
Say body A has a measured mass of 12.0 kg and body B 7.0 kg. A calculator says the ratio is 1.714285… But the last zero of both measurements was already doubtful, so most of those decimals are fiction. Two rules decide how much to keep.
Rounding off
When dropping digits, look at the digit right after the last one you keep. If it is more than 5, round up. If less than 5, leave it. If it is exactly 5 (with nothing but zeros after it), round so the kept digit becomes even: bump an odd digit up, leave an even one. Over many calculations this keeps rounding from drifting systematically upward. Digits dropped to the left of the decimal point are replaced with zeros.
The next digit is exactly 5. The digit being rounded (6) is even, so it stays.
Round (a) 27384, (b) 18.635, (c) 18.650 and (d) 18.750 to three significant digits.
Evaluate , where every digit shown is significant.
Evaluate 31.47 + 0.0518 + 182.3.
- 1Record all certain digits plus exactly one estimated digit.
- 2Leading zeros never count; trailing zeros in whole numbers are ambiguous, so use powers of ten.
- 3× and ÷: keep as many significant digits as the least precise input.
- 4+ and −: round to the leftmost doubtful decimal column first, then add.
- 5Exact 5: round to make the kept digit even.
Check yourself
Videos, simulations & further reading (5)
Errors & Uncertainty
Measure ten times, and the scatter tells you how much to trust the average.
Repeat any experiment and you will get slightly different answers. That scatter is not a failure. It is information about how far to trust your result.
Three kinds of error
Many things can push a result away from the truth:
- Faulty equipment: a scale with a bent zero, a stopwatch that runs fast.
- Carelessness: reading the wrong mark, mis-recording a number.
- Random causes: tiny, unpredictable variations in reaction time, air currents, where exactly your eye lines up.
The first two can be hunted down and removed once you spot the cause. Random errors cannot: there is no single culprit. What saves us is that they are as likely to push a reading up as down. Average many repetitions and they largely cancel, so the mean of many readings sits close to the true value.
Measuring the scatter: standard deviation
If an experiment repeated times gives , the best estimate is the mean . How uncertain is it? We measure how far, typically, the readings stray from that mean using the standard deviation:
We then quote the result as . Wider intervals buy more confidence: for a large number of readings there is about a 95% chance that the true value lies within , and over 99% within .
A student times one swing of a pendulum ten times and gets (in seconds): 2.04, 2.01, 2.06, 1.99, 2.03, 2.05, 2.02, 2.00, 2.04, 2.06. Report the period with its uncertainty at the ±σ level.
- 1Equipment and carelessness errors can be removed; random errors can only be averaged down.
- 2Report ; σ measures the typical scatter about the mean.
- 3≈68% inside ±σ, ≈95% inside ±1.96σ, >99% inside ±3σ (for many readings).
- 4Round the uncertainty sensibly and match the mean’s decimal places to it.