The formula for electrical impedance is Z = (sqrt)R^2 +Xl^2, where Z is impedance, R is resistance and Xl is the inductive reactance. Impedance is not the same thing as resistance. AC circuits, where impedance is measured most frequently, include inductors that make voltage and current out of sync.
An inductor creates a magnetic field that counteracts the electrical current produced by a given voltage. When voltage is positive, the current is zero. As voltage decreases to zero, the current is negative, or flowing in the opposite direction. Therefore, combining voltage and current requires vector addition using the Pythagorean theorem.