Retaining the property of Symmetric?

These two probably need to stay the way they are. The product of two symmetric matrices is not necessarily symmetric. In your specific examples, the result is symmetric because the factors are identical, but that’s a property of the values, not their types. It’s generally desirable for the return type to only depend on the argument types, not the argument values.

For S.^2 it would be reasonable to return Symmetric, but changing that now might be considered too breaking, that is, not backward compatible.

2 Likes