See Wikipedia: Moore–Penrose pseudoinverse.
Some of its properties are explained in the following pages: