The position, or translation in 3D terminology, is the last row of the matrix.

The rotation and scale are a bit more difficult because they get combined in the matrix, so extracting them can be tough. I'll see what I can find.