Unit 1
Vectors & the Geometry of Space
Everything in this course happens in three dimensions, so the first job is to get comfortable living there: locating points, describing directions, writing down lines, planes and curved surfaces, and switching between the three coordinate systems engineers actually use. None of it is hard, but all of it has to be automatic before Unit 3, because a partial derivative you cannot picture is a formula you will misapply. Three of the sections below have interactive labs β drag the views around until the pictures in your head match the ones on screen.
1 Β· Coordinates in three dimensions
Add a third axis, \(z\), perpendicular to the familiar \(xy\)-plane. The three axes must form a right-handed system: curl the fingers of your right hand from the positive \(x\)-axis toward the positive \(y\)-axis and your thumb points along positive \(z\). This is not a convention you can ignore β the cross product in Section 4 and every magnetic-force calculation you will ever do depend on it.
The three coordinate planes are \(z=0\) (the \(xy\)-plane, the “floor”), \(y=0\) (the \(xz\)-plane) and \(x=0\) (the \(yz\)-plane). They cut space into eight octants; the first octant is where all three coordinates are positive, and most textbook pictures live there.
In the plane, \(x = 2\) is a vertical line. In space, \(x = 2\) is a whole plane parallel to the \(yz\)-plane. Each equation you impose removes one degree of freedom: a single equation in three variables is a surface, two equations together are a curve, three are a point. Ask “how many variables are free?” before you sketch anything.
2 Β· Vectors
A vector is a quantity with magnitude and direction β a displacement, a velocity, a force, an electric field. It does not live anywhere in particular: the same arrow drawn from a different start point is the same vector. We write it by its components:
The vector from point \(A\) to point \(B\) is tip minus tail: \(\overrightarrow{AB} = \langle b_1 - a_1,\; b_2 - a_2,\; b_3 - a_3\rangle\). The position vector of a point is the vector from the origin to it, so a point and its position vector have the same three numbers β which is why we slide between them without comment.
| Operation | Components | Geometry |
|---|---|---|
| Sum \(\mathbf{a}+\mathbf{b}\) | \(\langle a_1+b_1,\ a_2+b_2,\ a_3+b_3\rangle\) | Tip-to-tail; diagonal of the parallelogram |
| Difference \(\mathbf{a}-\mathbf{b}\) | \(\langle a_1-b_1,\ a_2-b_2,\ a_3-b_3\rangle\) | Arrow from the tip of \(\mathbf{b}\) to the tip of \(\mathbf{a}\) |
| Scalar multiple \(c\mathbf{a}\) | \(\langle ca_1,\ ca_2,\ ca_3\rangle\) | Same line; stretched by \(|c|\), reversed if \(c < 0\) |
| Unit vector \(\hat{\mathbf{a}}\) | \(\mathbf{a}/|\mathbf{a}|\) | Direction only; length exactly 1 |
\(|\langle 3, 4, 12\rangle|\) is \(\sqrt{9+16+144} = 13\), not \(3+4+12\). And \(|\mathbf{a}+\mathbf{b}| \ne |\mathbf{a}| + |\mathbf{b}|\) unless the vectors point the same way β a 3 V phasor plus a 4 V phasor at right angles is 5 V, not 7. That triangle inequality is the whole reason AC circuit analysis needs vectors in the first place.
3 Β· The dot product
The result is a scalar, which is the whole point: the dot product measures how much two vectors point the same way. It is positive for acute angles, zero at \(90^\circ\), negative for obtuse angles.
- Orthogonality test: \(\mathbf{a}\perp\mathbf{b} \iff \mathbf{a}\cdot\mathbf{b} = 0\). This is the single most used fact in the course.
- Length: \(\mathbf{a}\cdot\mathbf{a} = |\mathbf{a}|^2\).
- Algebra: commutative, distributive, and \((c\mathbf{a})\cdot\mathbf{b} = c(\mathbf{a}\cdot\mathbf{b})\). It behaves like ordinary multiplication except that you cannot divide by a vector.
Projections
Work is the dot product's home application: a constant force \(\mathbf{F}\) moving an object through displacement \(\mathbf{d}\) does work \(W = \mathbf{F}\cdot\mathbf{d}\). Only the component of force along the motion counts. In Unit 5 this becomes \(\int\mathbf{F}\cdot d\mathbf{r}\), and voltage will turn out to be exactly that integral with \(\mathbf{E}\) in place of \(\mathbf{F}\).
The angles \(\alpha, \beta, \gamma\) a vector makes with the three positive axes satisfy \(\cos\alpha = a_1/|\mathbf{a}|\), etc., and \(\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1\). The three direction cosines are just the components of the unit vector \(\hat{\mathbf{a}}\). Antenna patterns are specified this way.
For a hands-on refresher, the 3D vectors lab lets you drag two vectors and watch the dot and cross products respond.
4 Β· The cross product
The result is a vector β perpendicular to both \(\mathbf{a}\) and \(\mathbf{b}\), in the direction given by the right-hand rule (fingers from \(\mathbf{a}\) to \(\mathbf{b}\), thumb gives \(\mathbf{a}\times\mathbf{b}\)), with magnitude
\(\mathbf{b}\times\mathbf{a} = -(\mathbf{a}\times\mathbf{b})\). The cross product is anticommutative. Swapping the factors flips the direction β and in physics that flip is the difference between a force pushing a wire up and pushing it down. Also, it is not associative: \((\mathbf{a}\times\mathbf{b})\times\mathbf{c} \ne \mathbf{a}\times(\mathbf{b}\times\mathbf{c})\) in general.
Where EE meets the cross product
| Quantity | Formula | What the cross product does |
|---|---|---|
| Lorentz force on a charge | \(\mathbf{F} = q\,\mathbf{v}\times\mathbf{B}\) | Force is perpendicular to both velocity and field β so a magnetic field can steer a charge but never speed it up. |
| Force on a current-carrying wire | \(\mathbf{F} = I\,\boldsymbol{\ell}\times\mathbf{B}\) | Motors. Reverse the current, reverse the force. |
| Torque | \(\boldsymbol{\tau} = \mathbf{r}\times\mathbf{F}\) | Only the perpendicular part of the force turns the shaft. |
| Poynting vector | \(\mathbf{S} = \mathbf{E}\times\mathbf{H}\) | Direction and density of electromagnetic power flow. A wave with \(\mathbf{E}\) along \(\mathbf{i}\) and \(\mathbf{H}\) along \(\mathbf{j}\) travels along \(\mathbf{k}\). |
| Angular momentum | \(\mathbf{L} = \mathbf{r}\times\mathbf{p}\) | Gyroscopes, spinning electrons, magnetic moments. |
The scalar triple product
5 Β· Lines in space
A line in the plane has a slope. A line in space does not β there is no single number that captures a direction in 3D. Instead a line is pinned down by a point on it and a direction vector along it:
Solve each parametric equation for \(t\) and equate to get the symmetric equations:
- Line through two points \(P\) and \(Q\): use \(\mathbf{v} = \overrightarrow{PQ}\) and either point as \(\mathbf{r}_0\).
- Parallel lines have parallel direction vectors. Perpendicular: \(\mathbf{v}_1\cdot\mathbf{v}_2 = 0\).
- Skew lines are not parallel and do not intersect β a possibility that does not exist in the plane. To test for intersection, set the two parametrisations equal (using different parameters \(t\) and \(s\)!), solve two of the three equations, and check the third.
When checking whether two lines meet, they are traversed independently, so \(\mathbf{r}_1(t) = \mathbf{r}_2(s)\) β never \(\mathbf{r}_1(t) = \mathbf{r}_2(t)\). Using the same letter forces both to be at the same “time” and will tell you two intersecting lines miss each other.
6 Β· Planes
A plane is pinned down by a point on it and a vector perpendicular to it β the normal \(\mathbf{n} = \langle a,b,c\rangle\). Any point \(P\) is on the plane exactly when the vector from \(P_0\) to \(P\) is perpendicular to \(\mathbf{n}\):
- Plane through three points \(P, Q, R\): \(\mathbf{n} = \overrightarrow{PQ}\times\overrightarrow{PR}\), then use any of the three points.
- Angle between planes = angle between their normals. Planes are parallel if the normals are parallel; perpendicular if \(\mathbf{n}_1\cdot\mathbf{n}_2 = 0\).
- Line of intersection of two planes has direction \(\mathbf{n}_1\times\mathbf{n}_2\) β it must lie in both planes, so it is perpendicular to both normals. Find one common point by setting \(z = 0\) (or any coordinate) and solving the remaining \(2\times2\) system.
- Intercepts: set two variables to zero. The plane \(ax+by+cz = d\) crosses the \(x\)-axis at \(d/a\).
Plane explorer
The sliders set \(a, b, c, d\) in \(ax + by + cz = d\). The orange arrow is the normal \(\mathbf{n} = \langle a,b,c\rangle\), the dots on the axes are the intercepts, and the dashed segment drops from the free point \(Q\) perpendicularly onto the plane β its length is the distance formula. Drag the view to orbit. Try making \(c = 0\) and watch the plane stand up vertically, parallel to the \(z\)-axis.
Drag to orbit. Orange arrow: normal \(\mathbf{n}\). Blue dot: \(Q\). Dashed: perpendicular from \(Q\) to the plane.
Plane \(ax + by + cz = d\)
Free point \(Q\)
7 Β· Quadric surfaces
A quadric is the graph of a second-degree equation in \(x, y, z\) β the three-dimensional cousins of the conic sections. There are six you must recognise on sight, plus the cylinders. The technique for identifying any of them is the same: take traces. Set \(z = k\) and see what curve you get in that horizontal slice; then \(x = k\) and \(y = k\). The pattern of traces names the surface.
| Surface | Standard equation | Horizontal traces \(z=k\) | Vertical traces | Tell-tale |
|---|---|---|---|---|
| Ellipsoid | \(\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}+\dfrac{z^2}{c^2} = 1\) | ellipses | ellipses | All plus signs, \(=1\). A sphere if \(a=b=c\). |
| Elliptic paraboloid | \(\dfrac{z}{c} = \dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}\) | ellipses (\(k > 0\) only) | parabolas | One variable appears to the first power. A bowl. Opens along that axis. |
| Hyperbolic paraboloid | \(\dfrac{z}{c} = \dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}\) | hyperbolas | parabolas, opposite ways | First power in one variable, mixed signs in the others. A saddle. |
| Cone | \(\dfrac{z^2}{c^2} = \dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}\) | ellipses; a point at \(k=0\) | hyperbolas; two lines through the origin | All squares, \(=0\). Two nappes, tip to tip. |
| Hyperboloid of one sheet | \(\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}-\dfrac{z^2}{c^2} = 1\) | ellipses | hyperbolas | One minus, \(=1\). A cooling tower; connected. The minus sign names the axis it wraps around. |
| Hyperboloid of two sheets | \(-\dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}+\dfrac{z^2}{c^2} = 1\) | ellipses for \(|k| > c\); none for \(|k| < c\) | hyperbolas | Two minuses, \(=1\). Two separate bowls facing away from each other along the plus axis. |
| Cylinder | any equation missing a variable, e.g. \(x^2+y^2 = 4\) or \(z = x^2\) | the plane curve, extruded along the missing axis | A variable is absent. Not necessarily round β \(z = x^2\) is a parabolic cylinder. | |
- Identify the type from the table.
- Find the axis: the variable that is different (first power, or opposite sign) is the axis the surface is built around.
- Draw two or three traces perpendicular to that axis, then connect them.
Do not try to draw the whole thing free-hand. Draw the traces; the surface appears.
Quadric surface viewer
Pick a surface, adjust \(a, b, c\), then slide the trace plane through it. The highlighted curve is the trace in that plane, and the readout names it β exactly the identification you would do by hand on an exam. Notice how the hyperboloids are the cone with the tip pulled apart (one sheet) or pinched open (two sheets).
Drag to orbit. The translucent sheet is the trace plane; the orange curve is the trace.
Shape parameters
8 Β· Cylindrical and spherical coordinates
Cartesian coordinates describe boxes well and nothing else well. A coaxial cable, a point charge, a rotating machine β each of these has a symmetry that its natural coordinate system makes trivial and Cartesian makes miserable. Learn both systems now; Unit 4 will make you integrate in them.
Cylindrical \((r, \theta, z)\) β polar coordinates with height
| Equation | Surface |
|---|---|
| \(r = 2\) | Cylinder of radius 2 around the \(z\)-axis |
| \(\theta = \pi/4\) | Vertical half-plane through the \(z\)-axis |
| \(z = r\) | Cone (opening upward from the origin) |
| \(z = r^2\) | Circular paraboloid |
| \(r^2 + z^2 = 9\) | Sphere of radius 3 |
Spherical \((\rho, \theta, \phi)\) β distance and two angles
| Equation | Surface |
|---|---|
| \(\rho = 3\) | Sphere of radius 3, centred at the origin |
| \(\phi = \pi/6\) | Cone with half-angle \(30^\circ\) opening upward |
| \(\phi = \pi/2\) | The \(xy\)-plane |
| \(\theta = \pi/3\) | Vertical half-plane, same as in cylindrical |
| \(\rho = 2\cos\phi\) | Sphere of radius 1 centred at \((0,0,1)\) β multiply through by \(\rho\) to see \(x^2+y^2+z^2 = 2z\) |
Mathematics texts (and this course) use \(\theta\) for longitude and \(\phi\) for the polar angle. Most physics and EE texts do the opposite: \(\theta\) is the polar angle from \(z\) and \(\phi\) is longitude. The conversion formulas are identical once you swap the letters, but an antenna pattern labelled \(E(\theta)\) in an EE book means the angle from the axis. Check the definition before you trust the symbol.
Locate a point three ways
One point, three descriptions. Choose which system you want to drive with the chips, move the sliders, and watch the same point being located by a different construction: three perpendicular steps (Cartesian), a radius and a turn in the floor plus a rise (cylindrical), or a distance and two angles (spherical). The conversions are worked live below the readouts with your numbers in them.
Drag to orbit. Dashed lines are the Cartesian steps; the foot on the floor is the point's shadow.
9 Β· Worked examples
1. Angle between two vectors, and the projection
Let \(\mathbf{a} = \langle 2, -1, 2\rangle\) and \(\mathbf{b} = \langle 1, 2, 2\rangle\). Find the angle between them and \(\operatorname{proj}_{\mathbf{b}}\mathbf{a}\).
Sanity check: the projection has length \(\tfrac49\cdot 3 = \tfrac43\), and \(\operatorname{comp}_{\mathbf{b}}\mathbf{a} = 4/3\) directly. β It is shorter than \(|\mathbf{a}| = 3\), as a shadow must be.
2. Force on a moving charge
An electron (\(q = -1.6\times10^{-19}\) C) moves with velocity \(\mathbf{v} = \langle 2\times10^6, 0, 1\times10^6\rangle\) m/s through \(\mathbf{B} = \langle 0, 0.5, 0\rangle\) T. Find the force.
Check perpendicularity: \(\mathbf{F}\cdot\mathbf{v} = 8\times10^{-14}\cdot 2\times10^6 + 0 - 1.6\times10^{-13}\cdot10^6 = 1.6\times10^{-7} - 1.6\times10^{-7} = 0\). β The force is perpendicular to the velocity β it changes direction, never speed. Note that the negative charge reversed the direction of \(\mathbf{v}\times\mathbf{B}\).
3. Plane through three points
Find the plane through \(P(1,0,0)\), \(Q(0,2,0)\), \(R(0,0,3)\).
Two vectors in the plane: \(\overrightarrow{PQ} = \langle -1, 2, 0\rangle\), \(\overrightarrow{PR} = \langle -1, 0, 3\rangle\).
Through \(P\): \(6(x-1) + 3y + 2z = 0\), i.e.
Check all three points: \(Q\): \(0 + 6 + 0 = 6\) β; \(R\): \(0+0+6 = 6\) β. The intercept form on the right is worth knowing β a plane with intercepts \(p, q, r\) is always \(x/p + y/q + z/r = 1\).
4. Line of intersection of two planes
Find parametric equations for the line where \(x + y + z = 1\) and \(x - 2y + 3z = 1\) meet.
Direction: perpendicular to both normals.
A point: set \(z = 0\). Then \(x + y = 1\) and \(x - 2y = 1\); subtracting, \(3y = 0\), so \(y = 0\), \(x = 1\). Point \((1, 0, 0)\).
Verify with \(t = 1\): \((6, -2, -3)\). First plane: \(6-2-3 = 1\) β. Second: \(6 + 4 - 9 = 1\) β. Always check a second point β the direction could be right and the base point wrong.
5. Identify a quadric
Identify and sketch \(4x^2 - y^2 + z^2 = 4\).
Divide by 4: \(x^2 - \dfrac{y^2}{4} + \dfrac{z^2}{4} = 1\). All squares, \(=1\), one minus sign β hyperboloid of one sheet. The minus sign is on \(y\), so the surface wraps around the \(y\)-axis.
Traces:
- \(y = k\): \(x^2 + z^2/4 = 1 + k^2/4\) β ellipses, growing with \(|k|\). Smallest at \(y = 0\) (the “waist”).
- \(x = 0\): \(z^2/4 - y^2/4 = 1\) β hyperbola opening along \(z\).
- \(z = 0\): \(x^2 - y^2/4 = 1\) β hyperbola opening along \(x\).
Sketch: a cooling-tower shape lying along the \(y\)-axis, with elliptical cross-sections whose semi-axes are 1 (in \(x\)) and 2 (in \(z\)) at the waist. Set the lab above to Hyperboloid, 1 sheet and look at it from the side to see the shape β then remember to rotate the axis.
6. Convert between coordinate systems
(a) Convert the point \((-1, \sqrt3, 2)\) to cylindrical and spherical. (b) Write the cone \(z = \sqrt{x^2+y^2}\) in both systems.
(a) Cylindrical. \(r = \sqrt{1 + 3} = 2\). \(\tan\theta = \sqrt3/(-1)\), and the point is in quadrant II (\(x<0, y>0\)), so \(\theta = 2\pi/3\), not \(-\pi/3\). \(z = 2\). Cylindrical: \((2, 2\pi/3, 2)\).
Spherical. \(\rho = \sqrt{1+3+4} = 2\sqrt2\). \(\cos\phi = z/\rho = 2/(2\sqrt2) = 1/\sqrt2\), so \(\phi = \pi/4\). \(\theta\) is unchanged. Spherical: \((2\sqrt2, 2\pi/3, \pi/4)\).
Check: \(r = \rho\sin\phi = 2\sqrt2\cdot\tfrac{1}{\sqrt2} = 2\). β
(b) Cylindrical: \(\sqrt{x^2+y^2} = r\), so the cone is simply \(z = r\). Spherical: \(\rho\cos\phi = \rho\sin\phi\), so \(\tan\phi = 1\), \(\phi = \pi/4\). A cone is a single coordinate held constant in spherical coordinates β the sign that spherical is the right system for it.
Checklist
- I can locate a point in 3D and find distances and sphere equations by completing the square.
- I compute dot products by components and interpret them by \(|\mathbf{a}||\mathbf{b}|\cos\theta\); zero means perpendicular.
- I set up the cross product as a determinant every time and know it is anticommutative.
- I can read the normal vector straight off a plane equation, and the direction vector straight off a line.
- I use two different parameters when intersecting two lines.
- I identify a quadric by counting signs and taking traces, and know which variable is the axis.
- I can convert points and surfaces between Cartesian, cylindrical and spherical β with \(\theta\) placed in the correct quadrant.
- I know \(\phi\) is measured from the \(z\)-axis and that EE books often swap \(\theta\) and \(\phi\).