A Greek mathematician called Hero of Alexandria first invented imaginary numbers. Later in 1572, an Italian mathematician Gerolamo Cardano developed the rules for multiplying imaginary numbers.