Two oppositions at right angles
A resistor and a reactance both oppose current in ohms, and it is tempting to add them. Do not. In a resistor the voltage peaks exactly when the current does; in a reactance it peaks a quarter-cycle away. They are 90° out of step, and quantities 90° apart never add head-on.
, read aloud Z equals root R squared plus X squared. is the impedance magnitude — the total opposition the supply actually feels — in ohms; is the resistance in ohms; and is the reactance in ohms, whether it came from a coil or a capacitor. Draw R along the bottom and X up the side, and Z is the hypotenuse. That picture is the impedance triangle, and it is the same triangle you will meet again as kW, kvar and kVA.
When both kinds of reactance are present they settle with each other first, because they point in opposite directions: , where is the inductive reactance and the capacitive one, both in ohms. The subtraction happens INSIDE the bracket, before the squaring — cancel first, then Pythagoras. When the two are equal the bracket is zero, the impedance collapses to R alone, and you have found resonance.
The angle of that triangle has a name you will use for the rest of your career. — phi equals arc-cosine of P F, with the Greek letter phi, the phase angle in degrees between voltage and current, and the power factor, a bare ratio between −1 and 1. The power factor IS the cosine of that angle; it is also , the adjacent side over the hypotenuse. Same triangle, told twice.