Refactoring a symmetric matrix into a vector and back again

See