A walk through of the maths behind Bertaut’s method of representational analysis of magnetic structures