Depends what you mean.
A factory reset will do the same after root as before, i.e. delete all installed apps, user data and settings. So if that's what you mean, remove all user data, then it is that easy.
What it won't do is unroot the phone or return it to the original ROM. If you want to do those, then a ROM Update Utility (RUU) is the answer - see the FAQ.
One other thing: if you have used revolutionary (or S-Offed using Alpharev) then you'd need extra steps to reset the bootloader (flash the downgrader hboot first).
So, what do you want to do?