Both alternating current and direct current are measured in amperes

Both alternating current and direct current are measured in amperes. But how is the ampere defined for an alternating current?

As we know that, the AC current changes its direction with time. So, AC ampere must be defined in terms of some property which is independent of direction of current. Thus, Joules heating effect is the property, which defines rms value of AC.