add Matrix.atoms()
Merge pull request #2413 from zanzibar7/matrix_atoms

add Matrix.atoms()