I've recently written a simple code to numerically compute the Hessian of some function (at a point). Most electronic structure packages will compute the Hessian and then project out the translations and rotations. I have tried to look up how one actually does this, but I can't find any good information really.
I feel like this should be pretty simple, so I feel a bit silly for not knowing how to do it, but if someone can provide some mathematical detail on how to project out the translational and rotational modes, that would be greatly appreciated.