Again, Julian's answer is excellent. I would also add that only perfect intervals remain perfect when they are inverted - in other words a perfect interval's compliment is also perfect. For example, C to F is a perfect 4th. When that interval is inverted and becomes F to C it is now a perfect 5th. When inverted, minor intervals become major (and vice versa), and diminished intervals become augmented (and vice versa). Perfect intervals have the moniker "perfect" not only for their consonant sound (in most cases), but also because they do not change their quality when inverted. A major third, for example, will have a consonant sound (in most cases), but the major 3rd's quality changes to minor when it is inverted. It is then a minor 6th.
Boom, music theory!