I just read up on wikipedia on the Smith Normal Matrix. But what is meant by an invertable matrix. For example if you have a start matrix with only PID values does that mean the other matrices don't have to contain PID values (for example integer values in the original, and rational in T)?
Furthermore what is meant by an invertable square matrix. Aren't all square matrices invertible since
A^-1 = adj(A) / |A|