I'm working from a book at the moment and in it there is a problem where you have to multiply two fractions. I don't need to show you the whole sum but there is a part of it that has and in order to diagonal cancel the fraction down you needed to know that you can change that to . But i don't know the rule that lets you do that.

I know that but i still didn't know i could just apply it like that. Is there a rule or formula i can use that can solve things like this in the future?