Complex Numbers for Electronics
Also known as: j operator, rectangular polar
13 min read
Quick Answer
A complex number in electronics is a pair of values written as a real part plus an imaginary part, using j for the square root of minus one because i already means current. The same number can be written instead as a magnitude and an angle, and the two forms describe one quantity.
Intuition
A bearing instead of two distances
Ask someone in a field how to reach a marker and there are two good answers. One is a pair of distances: three paces east, then four paces north. The other is a single distance with a direction: five paces, heading north of east. Neither is better. They pick out the same spot, and which you want depends on what happens next. If a second leg of the walk is coming, two pairs of distances add together without effort. If the question is how far the marker is, the distance-and-direction answer has already said so.
A complex number is that same choice written down. It holds two independent numbers that travel together, and it will present them as a pair of components or as a size with a direction. The components are the real part and the imaginary part, and a marker letter keeps them apart: the imaginary part always carries that letter in front of it. Mathematics uses i, for imaginary. Electronics cannot, because i already means current and an equation containing both would be unreadable, so electronics writes j instead and means the same thing.
The word imaginary is a leftover from a time when these numbers were distrusted, and it misleads nearly everyone who meets it. Nothing about the second number is less real than the first. It points in a different direction, at right angles to the first, and needs a label of its own so the two are never added together by accident.
Measure that direction as an angle and the marker in the field lies at 53.13° from due east. Surveyors count clockwise from north and mathematics anticlockwise from east, so the two trades write different numbers for one heading. What sits underneath is the same.
Practitioner
Converting between the two forms
Written out in full, a complex quantity is its real part plus j times its imaginary part. Three plus j four means a real part of three and an imaginary part of four. Written that way it is in rectangular form, the one to reach for whenever you are adding or subtracting: real parts combine with real parts, imaginary with imaginary, and the two columns never mix.
Polar form presents the same quantity as a length with an angle. The length is the magnitude, and Pythagoras on the two parts delivers it:
The angle is called the argument. It is the arctangent of the imaginary part divided by the real part, and that arctangent has a blind spot: hand it the ratio on its own and it cannot tell the first quadrant from the third, since four divided by three and minus four divided by minus three are the same number. Languages and calculators get round this with a two-argument arctangent, usually named atan2, which takes the imaginary and real parts separately and returns an angle in the quadrant the number really occupies.
Worked example — Rectangular to polar, and one quarter turn
A quantity has a real part of 3 and an imaginary part of 4. Its magnitude is 5, and its argument, measured anticlockwise from the positive real axis, is 53.13°.
Multiply that same quantity by j and the two parts become -4 and 3. The magnitude is still 5. Only the direction has moved, to 143.13°, a quarter turn further round.
The return trip takes two projections: the real part is the magnitude times the cosine of the angle, and the imaginary part is the magnitude times the sine.
Which form to work in follows from the operation in front of you.
- Adding or subtracting: rectangular. Handle the two parts separately and keep them separate.
- Multiplying: polar. Multiply the magnitudes, add the angles.
- Dividing: polar. Divide the magnitudes, subtract the angles.
A long calculation flips between the forms as often as it needs to, and there is no cost to that beyond the conversion arithmetic. Multiplying two rectangular numbers directly is perfectly legal, but it is where sign errors breed, so most people convert first.
On paper and on instrument displays, polar form is normally written as a magnitude, the angle symbol ∠, and the angle in degrees. Software works in radians instead, and the conversion between the two is left entirely to you.
Engineer
The complex plane and what the method assumes
Put the real part along a horizontal axis and the imaginary part along a vertical one and every complex number becomes a point on a plane, drawn this way since the early nineteenth century and usually called the Argand diagram. Rectangular form gives the point's two coordinates. Polar form gives the length of the arrow from the origin and the angle that arrow makes with the positive real axis. The conversion between them is trigonometry on a right triangle whose two legs are the real and imaginary parts.
The picture also accounts for j. Multiplying a number by j leaves its length alone and turns it a quarter circle anticlockwise, which is what the dashed arc in the diagram above traces. Apply it twice and the arrow has turned a half circle, pointing in the opposite direction, and reversing a direction is what multiplying by minus one does. So j times j is minus one, and the rule that looked arbitrary in school arithmetic is two quarter turns.
Euler's relation ties the two forms together permanently: the exponential of j times an angle equals the cosine of that angle plus j times its sine. Read left to right, it says that raising e to an imaginary power lands you somewhere on a circle of radius one. Read right to left, it says polar form is an exponential in disguise, and that reading is the reason multiplying complex numbers adds their angles. Exponentials multiply by adding exponents; angles are the exponents here.
Worked example — Polar back to rectangular, and a round trip
A quantity of magnitude 100 sits at an angle of -30°. Its real part is the magnitude times the cosine of that angle, giving 86.60, and its imaginary part is the magnitude times the sine, giving -50.00. The negative angle puts the point below the real axis, so the imaginary part comes out negative while the real part does not.
Push those two components back through the magnitude relationship and the answer is 100, which is where the quantity started. A conversion that fails to survive the round trip has a sign or a quadrant wrong somewhere.
Nothing so far has mentioned electricity, and that is deliberate. The mathematics does not care what the two components stand for. That changes the moment they stand for something, because then they arrive with units attached:
Worked example — The same triangle wearing units
A resistance of 30 Ω sits in series with a reactance of 40 Ω, with no opposing reactance to cancel any of it. The magnitude of the combination is 50 Ω, and the angle it makes with the resistance is 53.13°.
These are the proportions of the first worked example again, now carrying ohms. The resistance became the real part, the reactance became the imaginary part, and the geometry never noticed the difference.
The model has edges, and they are worth marking before phasors make it look universal. A complex number here is bookkeeping: a container for two real numbers that have to be carried together and combined by fixed rules. It is not a signal, it does not vary with time, and no instrument will ever display an imaginary volt. When the notation is applied to a circuit it stands for a sinusoid at one fixed frequency, and every step of the arithmetic depends on the circuit being linear. Put two frequencies in at once, or a component whose behaviour changes with signal size, and the method stops describing anything.
One further limit is quieter. A magnitude on its own has thrown the angle away, and the angle is usually where the physics lives: two quantities of equal magnitude can be in step or in opposition, and only the argument separates those cases. Reporting a magnitude and dropping its angle is the commonest way to lose information from a calculation that was otherwise correct.
Professional
Where j shows up, and the conventions that differ
Across a resistor, voltage and current stay in step, and one real number describes the relationship completely. Put a capacitor or an inductor in the path and they no longer do, so the description needs a second number, and the imaginary part is what carries it. Impedance is the result: resistance on the real axis, reactance on the imaginary one, positive for an inductor and negative for a capacitor. The magnitude says how much current flows. The argument says when.
From there the notation spreads through the rest of the subject. A phasor is a complex number standing in for a sinusoid at a single frequency, its magnitude the amplitude and its argument the phase. Once every source and every component in a circuit has been written as a complex number, AC circuit analysis is the familiar DC methods run again with complex arithmetic in place of real.
Control and filter work pushes it further. A transfer function is written in a complex variable, and its poles and zeros are complex numbers whose real parts set how fast a disturbance dies away and whose imaginary parts set how fast it oscillates while doing so. A pole whose real part is positive describes a response that grows rather than settles, so stability turns into a question about which half of the plane a number happens to occupy.
Spectra are complex too. Each coefficient of a Fourier series carries both an amplitude and a starting phase, which needs two numbers per harmonic. A spectrum analyser normally displays only the magnitudes, so the phase information exists in the mathematics and simply never reaches the screen.
The conventions are where careful people still lose an afternoon.
- Degrees on the page, radians in the machine. Instruments and hand calculations work in degrees, while every programming language's trigonometric functions take radians. Convert at the boundary, and convert once.
- The letter itself. Python and NumPy write complex literals with j, MATLAB accepts either letter, and physics texts and some simulator manuals use i throughout. Check a tool's documentation before assuming it follows the electronics convention.
- Wrapped angles. Most software returns an argument between minus 180 and plus 180 degrees, so a phase that drifts smoothly past that boundary appears to jump a full turn. Unwrapping is a separate operation, and a plot with a sudden vertical cliff in its phase curve has usually not had it applied.
- The sign of a reactance. Some references write a capacitor's reactance as a positive number and then subtract it; others write it as a negative number and add it. Both reach the same impedance, and mixing the two inside one calculation does not.
Everyday work adds one more habit: hold intermediate results in rectangular form inside a program and convert to polar only for display. Rectangular arithmetic needs no trigonometric functions, so nothing wraps and no accuracy is spent on conversions that will only be undone, and a magnitude computed from the stored components always agrees with them. None of this needs mathematics beyond this page. What changes from one application to the next is what the two components are called and what the angle means physically.
Common mistakes
- Reading the imaginary part as fictional — it is the component at right angles to the real one and carries just as much physical information. The name records an old suspicion about these numbers, not a property of them.
- Adding two quantities in polar form — convert to rectangular first. The lengths add correctly only in the special case where both angles are equal.
- Trusting a single-argument arctangent — it sees only the ratio, so numbers in the second and third quadrants come back 180 degrees out. The two-argument form takes both parts and gets the quadrant right.
- Mixing degrees and radians in one expression — a calculator left in the wrong mode returns an answer that is wrong and still looks reasonable, which is the hardest kind of error to spot.
- Dropping the angle once the magnitude is known — magnitude answers how much, argument answers when. A result quoted without its angle cannot be combined with anything downstream.
- Writing i inside a circuit equation — i is current. The whole point of the j convention is to stop one symbol carrying two meanings on the same line.
Frequently asked questions
Why does electronics write j instead of i?
The symbol i is already taken: it means instantaneous current, and an equation containing both meanings would be ambiguous. The letter j denotes the same quantity, the one whose square is minus one. Mathematics and physics keep i, and in practice the two notations rarely meet in one document.
Is the imaginary part physically real?
Yes, in every sense that matters to a circuit. It represents the component of a quantity at right angles to the reference direction, which for an AC voltage or current means the part a quarter cycle out of step. The name is historical and describes nobody's experience of using it.
When should I use rectangular form and when polar?
Rectangular for addition and subtraction, polar for multiplication and division. Converting between them costs only the arithmetic of the conversion, so a long calculation moves back and forth freely.
What does multiplying by j change?
The direction, and nothing else. It rotates a quantity a quarter turn anticlockwise on the complex plane and leaves its magnitude untouched. Doing it twice gives a half turn, which is the same as multiplying by minus one.
Do I need complex numbers for DC circuits?
No. With steady direct current there is no phase to track, so each quantity is a single real number and the DC relationships work as written. Complex numbers start to earn their place as soon as a capacitor or an inductor meets a changing signal.