EEI

Appendix B: Mathematical tools

Electrical Engineering I · Module 92315 · Appendix B

The mathematics the course assumes, in one place: line integrals and flux, vector arithmetic with the dot and cross products, the two-argument angle, linear systems from network analysis, and complex numbers in the j notation of AC analysis. Coordinate systems have their own page, Appendix A.

B.1 Line integrals along a path

Many field quantities in the course are line integrals: the voltage between two points, the work done on a charge, the circulation of a field round a loop. A line integral adds up a quantity along a path C from a start point PA to an end point PB. Cut the path into short pieces Δsi, multiply each piece by the value of the quantity there, and let the pieces shrink to zero.

Line integral of a scalar∫PAPB f(x, y) ds = lim ∑i=1n f(xi, yi) ΔsiRead it as: “the integral of f along the path is the limit of the sum of f times each small piece of length”.The limit is taken with n → ∞ and every Δsi → 0; it exists when the result does not depend on how the path is cut.

For a vector field such as E, only the part of E along the path counts, which the dot product picks out (B.4).

Line integral of a vector field∫PAPB E · ds = lim ∑i=1n |Ei| |Δsi| cos αiRead it as: “the integral of E dot d s: add the component of E along the path, times the path length”.αi is the angle between the field and the path piece. A field perpendicular to the path contributes nothing; a field along the path contributes its full size. If the path is closed (PA = PB) the sign gets a ring: ∮C E · ds.
Work along a semicircle. A constant force F pushes along +y while the path runs round the right half of a circle of radius a, from PA to PB. At each point only the part of F along eφ does work.

Example · work along a semicircle

  1. Set up: path ρ = a, φ from −π2 to π2, force F = ey Fy. On the circle the path element is ds = eφ a dφ (cylindrical coordinates, Appendix A).
  2. The dot product ey · eφ = cos φ (from eφ = −sin φ ex + cos φ ey), so F · ds = a Fy cos φ dφ.
  3. Integrate: W = a Fy ∫−π/2π/2 cos φ dφ = a Fy [sin φ] = 2a Fy.

Check: a constant force does the same work on every path between the same two points, so the straight route from PA to PB, of length 2a along +y, must give 2a Fy too. It does.

B.2 Flux through a surface

Flux measures how much of a field passes through a surface. Picture a steady stream of particles crossing a flat frame: tilt the frame and fewer pass through, because the frame presents a smaller cross-section to the stream. The tilt enters through the angle between the flow and the frame's surface normal, the unit vector n perpendicular to the frame that fixes which side counts as positive.

Flux through a flat surface in a uniform fieldΨ = B · A = B A cos αA = n ARead it as: “the flux is B dot A, the field times the area times the cosine of the tilt”.A is the oriented area: its size is the surface area and its direction the normal n. α is the angle between B and n, so a surface parallel to the field (α = 90°) catches no flux.
Flux through any surfaceΨ = ∫A B · dAΨ = ∯A B · dARead it as: “the flux is the surface integral of B dot d A”.Cut the surface into small flat pieces ΔAi, add Bi · ΔAi and let the pieces shrink. For a closed surface the normal points outwards by convention and the sign gets a ring. Two shortcuts: if B is parallel to dA everywhere, Ψ = ∫A B dA; if in addition B is the same everywhere on the surface, Ψ = B A.

Example · a tilted frame

  1. A uniform field B = 0.5 T crosses a flat frame of area A = 0.02 m2 whose normal is tilted by α = 60° from the field.
  2. Ψ = B A cos α = 0.5 T · 0.02 m2 · 0.5 = 0.005 Wb = 5 mWb.

Check: at α = 0 the frame faces the field squarely and catches the most, 10 mWb; at 90° it catches none. 1 Wb = 1 V s = 1 T m2.

B.3 Vectors: components, length and direction

A scalar such as time t or work W is a number with a unit. A vector such as a force or a field also has a direction. Free vectors may be moved anywhere; bound vectors, such as a field value or a position vector, belong to one point. In Cartesian coordinates a vector is its three components along ex, ey, ez.

Componentsa = ax ex + ay ey + az ez = (ax, ay, az)TRead it as: “a is a x along e x plus a y along e y plus a z along e z”.The notes write vectors as columns and use the transposed row (·)T to save space. Two vectors are equal when all three components agree. The zero vector has length 0 and no direction.
Scaling, adding, subtractingc a = (c ax, c ay, c az)Ta ± b = (ax ± bx, ay ± by, az ± bz)TEverything works component by component. Scaling by c stretches the arrow by |c| and reverses it for c < 0; dividing by c means scaling by 1c. Adding places the arrows head to tail (the parallelogram of forces).
Length and unit vector|a| = √ax2 + ay2 + az2ea = a|a|Read it as: “the unit vector along a is a divided by its length”.Pythagoras in three dimensions. A unit vector has length 1 and only carries a direction; it exists for every a ≠ 0. Rules: |−a| = |a|, |c a| = |c| |a|, and the triangle inequality |a + b| ≤ |a| + |b|.

B.4 The dot product

The dot product turns two vectors into a number that says how much they point the same way. It is what picks out the component along a path in a line integral (B.1) and the component through a surface in a flux (B.2).

Dot producta · b = |a| |b| cos αa · b = axbx + ayby + azbzRead it as: “a dot b is the length of a times the length of b times the cosine of the angle between them”.α is the angle between the arrows, 0 ≤ α ≤ π. The component form follows because ex · ex = 1 and ex · ey = 0 for different unit vectors. The product is commutative and distributive, and a · a = |a|2.
What it tells youα = arccos a · b|a| |b|ba = a · b|a|2 aPerpendicular: a · b = 0. Parallel: a · b = |a| |b|; antiparallel: −|a| |b|. The second line is the projection of b onto the direction of a. Cauchy–Schwarz: |a · b| ≤ |a| |b|.

Example · angle and projection

  1. a = (1, 2, 2)T, b = (2, 0, 1)T. Then a · b = 2 + 0 + 2 = 4, |a| = √1 + 4 + 4 = 3 and |b| = √5.
  2. α = arccos 43√5 ≈ arccos 0.596 ≈ 53.4°.
  3. Projection of b onto a: 49 a = (49, 89, 89)T.

Check: the leftover b − ba = (149, −89, 19)T has dot product 149 − 169 + 29 = 0 with a, so it is perpendicular to a, as a projection's remainder must be.

B.5 The cross product

The cross product turns two vectors into a third that stands perpendicular to both. Its length is the area of the parallelogram the two span, and its direction follows the right-hand rule: thumb along a, index finger along b, middle finger along a × b. It appears wherever a force or a field turns at right angles, as in the magnetic force on a moving charge.

Cross producta × b = (aybz − azby, azbx − axbz, axby − aybx)T|a × b| = |a| |b| sin αRead it as: “the length of a cross b is the length of a times the length of b times the sine of the angle”.Only defined in three dimensions. The result is perpendicular to both factors: (a × b) · a = (a × b) · b = 0. The components are the determinant of the 3 × 3 array with ex, ey, ez in one column and the components of a and b in the others.
Rulesa × b = −b × aa × (b + c) = a × b + a × cNot commutative: swapping the factors flips the result. Parallel or antiparallel vectors give a × b = 0. For an angle, use the dot product (B.4): arcsin |…| only returns angles up to 90° and cannot tell 30° from 150°.
Length of the cross product. The parallelogram spanned by a and b has base |a| and height |b| sin α, so its area is |a × b|. The vector a × b itself points out of the page.

Example · a cross product

  1. a = (1, 2, 0)T, b = (0, 1, 3)T.
  2. a × b = (2 · 3 − 0 · 1, 0 · 0 − 1 · 3, 1 · 1 − 2 · 0)T = (6, −3, 1)T.
  3. Its length is √36 + 9 + 1 ≈ 6.78, the area of the parallelogram spanned by a and b.

Check perpendicularity: (6, −3, 1) · (1, 2, 0) = 6 − 6 + 0 = 0 and (6, −3, 1) · (0, 1, 3) = 0 − 3 + 3 = 0.

B.6 Angles in the plane: atan(x, y), not arctan of the ratio

Cartesian, cylindrical and spherical coordinates, their unit vectors and their path, area and volume elements are collected in Appendix A. One point from the notes deserves its own card, because it causes most sign errors: the polar angle of a point needs both coordinates, not just their ratio.

The two-argument angleφ = atan(x, y)atan(x, y) = arctan(yx) for x > 0, arctan(yx) ± π for x < 0, ±π2 for x = 0Read it as: “phi is the angle of the point (x, y), worked out from both coordinates”.For x < 0 add π when y ≥ 0 and subtract π when y < 0; for x = 0 take +π2 or −π2 by the sign of y; at the origin the angle is undefined. This gives −π < φ ≤ π; for the range [0, 2π) add 2π to negative values. arctan(yx) alone only covers quadrants I and IV.

Example: the point (−1, −1) has yx = 1, so arctan gives π4, which points into quadrant I. atan(−1, −1) = π4 − π = −3π4, or 5π4 in [0, 2π). The same rule gives the phase of a complex number (B.8). The notes write the arguments in the order atan(x, y); a calculator's or a program's atan2 usually takes (y, x), so check the order before you trust a result.

B.7 Systems of linear equations

Network analysis produces systems of linear equations: M equations in N unknowns, written as A x = b with the coefficient matrix A, the unknowns x and the right-hand side b. In circuit problems the method gives exactly as many independent equations as unknowns, so A is square and regular and the system has exactly one solution.

When a square system has exactly one solutionA x = b has one solution ⇔ det A ≠ 0 ⇔ rank A = Nx = A−1 bRead it as: “a square system has one solution exactly when the determinant of A is not zero”.These statements are equivalent for a square A: the system has exactly one solution, A is invertible, det A ≠ 0, rank A = N. Swapping equations, multiplying one by a nonzero number and adding one to another never change the solutions.
Gaussian eliminationforward elimination → upper triangle → back substitutionForward: use one equation to remove x1 from all the others, then repeat with x2 in what is left, until the last equation contains only xN. Back: solve for xN, then xN−1, and so on. It works for every system, including over- and underdetermined ones. To limit rounding errors, eliminate with the largest available coefficient (partial pivoting).

Example · Gaussian elimination

  1. Solve x1 + x2 + x3 = 6, 2x1 − x2 + x3 = 3, x1 + 2x2 − x3 = 2.
  2. Subtract twice the first equation from the second and once from the third: −3x2 − x3 = −9 and x2 − 2x3 = −4.
  3. Add a third of the new second equation to the new third: −73 x3 = −7, so x3 = 3.
  4. Back substitution: −3x2 − 3 = −9 gives x2 = 2, and x1 = 6 − 2 − 3 = 1.

Check in the original third equation: 1 + 4 − 3 = 2.

Cramer's rulexj = det Ajdet ARead it as: “x j is the determinant of A with column j replaced by b, over the determinant of A”.Aj is A with its j-th column replaced by b. Only for regular square systems, and expensive for many unknowns, because every unknown needs a determinant of its own.

Example · Cramer's rule

  1. Solve 3x1 + 2x2 = 7, x1 − x2 = −1. det A = 3 · (−1) − 2 · 1 = −5 ≠ 0.
  2. Replace the first column by b: det A1 = 7 · (−1) − 2 · (−1) = −5, so x1 = 1.
  3. Replace the second column: det A2 = 3 · (−1) − 7 · 1 = −10, so x2 = 2.

Check: 3 + 4 = 7 and 1 − 2 = −1.

Too many or too few equationsxopt = (ATA)−1 AT bOverdetermined (M > N equations, rank N): the equations usually contradict each other, and the best compromise xopt minimises the sum of the squared errors. Note: the notes print (A AT)−1; for an M × N matrix with M > N that product is M × M and never invertible, so the least-squares formula must use ATA, which is N × N and invertible exactly when rank A = N. Underdetermined (rank A < N): if any solution exists (rank [A | b] = rank A), the solutions form a family with N − rank A free parameters.

B.8 Complex numbers in the course's notation

Alternating-current analysis (Chapter 6) runs on complex numbers. Electrical engineering writes the imaginary unit as j, because i already means a current, and marks a complex quantity with an underline, x. The full treatment is in the MEI Chapter 4 guide; this section collects the rules in the EEI notation.

Cartesian and exponential formx = xRe + j xIm, j2 = −1x = |x| ejφ = |x|(cos φ + j sin φ)Read it as: “x is its real part plus j times its imaginary part, or its magnitude times e to the j phi”.xRe = Re{x} and xIm = Im{x} are real. The magnitude is |x| = √xRe2 + xIm2 (the notes put a hat over the letter) and the phase is φ = atan(xRe, xIm) from B.6, not arctan of the ratio. The second line is Euler's formula.
Conjugatex* = xRe − j xIm = |x| e−jφx x* = |x|2Re{x} = 12(x + x*)Im{x} = 12j(x − x*)The asterisk reflects the point in the real axis: same magnitude, opposite phase.
Arithmeticx1 ± x2 = (xRe1 ± xRe2) + j(xIm1 ± xIm2)x1 x2 = |x1| |x2| ej(φ1 + φ2)x1x2 = |x1||x2| ej(φ1 − φ2)Add in Cartesian form, like vectors. Multiply and divide in exponential form: magnitudes multiply or divide, phases add or subtract. In Cartesian form a quotient is expanded with the conjugate of the denominator.
Multiplying by jj x = ejπ/2 x = −xIm + j xRexj = −j x = xIm − j xReMultiplying by j turns a phasor a quarter turn counterclockwise (+π2); dividing by j turns it a quarter turn clockwise (−π2). This is the source of the ±90° phase shifts of ideal coils and capacitors.
Powers and rootsxN = |x|N ejφNwn = |x|1/N ej(φ + 2πn)/N, n = 0, 1, …, N − 1An N-th root has N different values, spread evenly round a circle. In particular xN = 1 is solved by ej2πn/N.
A product in the complex plane. x1 = 3 + j4 and x2 = 1 − j. Their product 7 + j has magnitude 5 · √2 and phase 53.1° − 45°.

Example · multiply, divide, take roots

  1. x1 = 3 + j4, x2 = 1 − j. Product: (3 + j4)(1 − j) = 3 − j3 + j4 − j24 = 7 + j.
  2. Quotient: multiply top and bottom by 1 + j: (3 + j4)(1 + j)2 = −1 + j72 = −0.5 + j3.5.
  3. Phase of x1: atan(3, 4) = arctan 43 ≈ 0.927 rad ≈ 53.1° (quadrant I), magnitude 5.
  4. Cube roots of 8j = 8ejπ/2: magnitude 2, phases π6, 5π6, 3π2, giving √3 + j, −√3 + j and −2j.

Check: |7 + j| = √50 = 5√2 = |x1| |x2|, and (−2j)3 = −8j3 = 8j.

Personal reference sheet based on the Electrical Engineering 1 lecture notes, Chapter 7 “Mathematical Appendix” (printed pages 531–597), rearranged and explained in my own words, mostly with my own examples (the B.1 semicircle is the notes’ example, worked in my own words); the original figures and tables are not reproduced. Not an official FAU publication; check details against the current course material. Made by Thanate Amornjiraporn (Focus).