The scalar product
The scalar product (or dot product) of two vectors and is written . It multiplies two vectors and produces a scalar.
These quantities in mechanics and electricity are scalar products:
- Work done by a force moving through a displacement : .
- Electric flux through a directional area in a field : .
- Kinetic energy of a mass with velocity : .
Geometric meaning
The scalar product measures how aligned two vectors are:
- Maximum positive value: the vectors point in the same direction.
- Zero: the vectors are perpendicular (for non-zero vectors).
- Negative: the vectors point in “opposite” directions. More precisely, .
Show derivation
From Scalar product in terms of the angle, and are positive, so has the sign of for : largest at (), zero at , negative for .
The projection of onto is . This gives the equivalent form:
Here () is the angle between and .
Where it comes from
This is the definition of the scalar product (Scalar (dot) product; databook maths p16). The derivation below shows the other way round: if instead you take the three Defining properties of the scalar product as the definition, this formula follows.
Show derivation a·b = |a||b|cos θ from the properties
Let , so .
- Use (3) to expand the brackets and collect :
- Use (2):
- Compare with the cosine rule, with etc.:
is the same whichever vector you measure from, so the scalar product is commutative:
Show derivation
where is the angle measured from to . That is or (or ), and is even (), so .
Drag . The thick red bar is the projection of onto . It shrinks to zero at and goes negative beyond it, and changes sign with it.
The perpendicular part is .
Show derivation Projection of b onto a (Appendix A1)
Split into parts parallel and perpendicular to :
Write . Then , so . So . With this is .
Explanation Scalar projection or vector projection: which is which?
- The scalar projection of onto is the signed length . It is negative if .
- The vector projection is that length times the unit vector .
So is exactly the “|a| times projection” statement. It is easy to forget the (not ) in the vector form. Check the units: must have the units of .
- is a scalar. It is for an acute angle, for perpendicular (non-zero) vectors, and for an obtuse angle.
- .
- Commutative: .
- Scalar projection of on : . Vector projection: divide by , not .
The Scalar Product: distributive over addition
Put and tip to tail. Projected onto the direction of , the projection of is the projection of plus the projection of :
Show derivation
By Scalar product in terms of the angle, , the component being . Components along a fixed direction add: going along then along (head to tail) moves you along by the component of plus the component of , and that is also the component of . Multiply by : .
Explanation Why is this worth proving at all?
Distributivity is what lets you expand brackets of vectors like ordinary algebra, for example . It is also what turns into in components. Every later calculation on this page rests on it.
- You can multiply out brackets in dot products: .
- Proof idea: the projections of and onto add, tip to tail.
Alternative approach
Instead of starting from the geometry, demand that the product has these properties:
- if .
- .
- and .
Show derivation
Each follows from Scalar product in terms of the angle: (1) ; (2) the angle between and itself is , so ; (3) Commutativity and Distributive over addition. Conversely these properties are enough to define the scalar product (derivation in Scalar product in terms of the angle).
These properties alone force , as the derivation below shows.
Equality holds only when and are parallel or antiparallel.
Show derivation
Take the modulus of Scalar product in terms of the angle: , with equality exactly when , i.e. or .
Explanation Why does the cosine rule step work?
Step 2 and the cosine rule both give for the same triangle. The terms match, so the remaining terms must match too: .
You can run the same argument backwards. If you already know , expanding proves the cosine rule in one line. That is a common “show that” question.
- Expand and compare with the cosine rule. This links the axioms to .
- .
Scalar product in terms of coordinates
Take in the orthonormal Right-handed Cartesian basis. The basis vectors satisfy if and if .
Show derivation
, using Distributive over addition and the orthonormal basis (, the others ). The same for .
So the scalar product measures how much of each basis vector is present. As in the original definition, it is the projection of one vector onto another.
In the last form and are column vectors (linear algebra form, used in later lectures).
Show derivation Expanding in components
With , distributivity gives
The component formula needs an orthonormal basis. With , the cross terms etc. no longer vanish.
- : dot with a unit basis vector to pick out a component.
- In an orthonormal basis, .
Einstein summation and the Kronecker delta
Using the Einstein summation convention, write and . Use for 's index so it does not clash with . Then
For orthonormal :
So , which is the component form as before.
Summing over against replaces by .
Show derivation What the δ actually does
By the summation convention,
Explanation How do I keep the indices straight?
- An index that appears twice in a term (like in ) is a dummy. It is summed, and you may rename it freely.
- An index that appears once (like there) is free. It must appear once in every term of the equation.
- That is why needs a new letter. Writing would put four times in one term, which is meaningless.
- A quick check of the same rule: , not 1.
- (1 if , else 0).
- : the δ “eats” a summed index. Hence .
- Give each vector its own dummy index before multiplying out.
Angle between two vectors
Rearranging Scalar product in terms of the angle gives the angle.
Show derivation
Rearrange Scalar product in terms of the angle: . Since and is one-to-one on that range, is unique. Work out from Scalar product in components.
Example Angle between (1, 1, 0) and (1, 1, √2)
Take and .
- .
- and .
Therefore
Explanation Angle between two vectors, or between two lines?
returns a value in , and a negative dot product gives an obtuse angle. For the angle between two lines or planes (whose direction vectors could point either way), the convention is the acute angle. Use , or take .
- : compute the dot product and both magnitudes, then divide.
- Perpendicular test: . There is no need to find .
Application: plane eqn of the form r · n̂ = d
This is a second form for the equation of a plane (compare Plane through three points).
- is a unit normal to the plane.
- is the shortest distance from the origin to the plane.
Show derivation Deriving r · n̂ = d
The point of the plane closest to the origin is . For any point on the plane, lies in the plane, so it is perpendicular to :
is signed. It is positive if points from the origin towards the plane. Reversing reverses the sign of but gives the same plane.
Drag to move around the plane: stays equal to . Reverse : the plane is unchanged but changes sign. Drag the view to rotate.
Write the normal as (no hats on the coefficients) and . This gives the familiar Cartesian form:
Show derivation
Write Plane: normal form in components (Scalar product in components): and give . If is not a unit vector, is the distance times .
Explanation What if the normal I’m given isn’t a unit vector?
Any plane is with . Divide through by to get the normal form: and .
Only after normalising is a distance. For example, is at distance from O, not 5.
Explanation Distance from any point to the plane
The same idea works from an arbitrary point . Dot with : the signed distance from to the plane is .
The origin () is the special case. The example below uses exactly this.
- Use whenever the normal is known.
- must be a unit vector for to be a distance. Otherwise divide by .
- is signed: if points from O towards the plane.
- Distance of a point from the plane: .
Example
Example Circle cut from a sphere by a plane
Problem. A plane is with . Find the radius of the circle formed where it intersects a sphere of radius 5 centred at .
Sketch a diagram!
The distance from a point on the plane to the centre is smallest when plane. Call this point . Then , and must be the centre of the circle in the plane.
Dot with , using :
Pythagoras in the right-angled triangle (centre, circle centre, point on the circle):
Explanation Why is r₀ the centre of the circle?
Every point on the circle is 5 from and lies in the plane. By Pythagoras, its distance from is , the same for all of them. So the circle is centred on .
If the plane misses the sphere. If it touches at a single point.
Differentiation of a scalar product
Show derivation
In components (Scalar product in components), , a sum of products of scalar functions of . Use the ordinary product rule on each term (Derivative of a vector: the components of are ):
Example Rate of change of kinetic energy
For :
Setting in the product rule:
Show derivation
. Put in Product rule for a scalar product: (Commutativity).
At a minimum or maximum of , this derivative is zero, so is orthogonal to .
If is constant for all , then at all times. An example is circular motion, where (Circular motion: position, velocity, acceleration).
Show derivation
By Derivative of |a|², . At a maximum or minimum, or everywhere if is constant, this is zero, so : the two are perpendicular (if neither is zero).
If is fixed, the tip of can only move around a circle (a sphere in 3D), so is tangent to it.
Explanation What does the result say about the magnitude itself?
Since , you get , i.e. .
Only the component of along changes its length. The perpendicular component only turns it. Do not confuse with : in uniform circular motion the first is 0 and the second is not.
- (databook).
- . Stationary means . Constant means always.
- Minimise a distance by minimising its square: no square roots.
Application: minimum distance: point to line
Take a line (Line with a unit direction) and a fixed point . The task is to find the minimum of .
Since , we have . Then Derivative of |a|² (with in place of ) gives
Show derivation Closest point C and the minimum distance
Let C be the point on the line, with position , such that is perpendicular to the line. Since :
Triangle A, C, P has a right angle at C, with . By Pythagoras:
Using the vector product (later): .
Show derivation
From the right-angled triangle in Closest point on a line to p: with .
Slide . is smallest exactly when , i.e. when reaches C at .
These formulae need a unit direction . If the line is given as with , either normalise first or use .
Explanation Why is it a minimum and not a maximum?
Expand the square:
- Shortest distance means the connecting vector is to the line: .
- Method: write in terms of , differentiate, set to zero.
- is the projection of on the line. follows by Pythagoras.
Example: Tripos-standard question
Example Point to a finite line segment
Problem. Find the minimum distance between the point and the finite line segment between and .
Step 1: shortest distance to the infinite line. Here , , , so
Step 2: where is the segment? The minimum for the infinite line occurs at . Write :
, so the foot of the perpendicular C lies on the “opposite” side of A from B. The closest point of the segment must therefore be A.
Step 3: check.
Lesson: always check whether the minimising parameter value lies within the range that defines the finite line segment. If it does not, the answer is the nearer endpoint.
The bold part of the curve is the segment . Its lowest point is the end A (, value 5), not the parabola’s minimum at (value 4.5), which lies off the segment.
Explanation Why must the nearest endpoint be the answer?
is a parabola in with its minimum at . It increases steadily as you move away from in either direction. If lies outside , the smallest value on the interval is at the end closer to .
Computing both endpoint distances, as the lecturer does, is a cheap check that catches a wrong sign.
- Point to segment AB: find for the infinite line, then find (with ).
- If , the answer is . Otherwise it is the distance to the nearer endpoint.
- Quick check: compute and .