Structure of the nth roots of a matrix