The canonical references are Spacetrack Report #3Spacetrack Report #3 which is the original documentation of the SGP4 algorithm, and Vallado + Kelso's Revisiting Spacetrack Report #3Revisiting Spacetrack Report #3 which has updates, analysis and modern* source code with discussion.
* well, kinda :)