Hello,

I am writing a package for manipulating positive definite matrices on their Riemannian manifold.

Those matrix may be real or complex and the code should be able to treat either case alike.

My code involves standard linear algebra operations such as, for example, Cholesky and eigenvalue-eigenvector decomposition.

For performance concern, should i take care to flag the matrices as Symmetric is they are real and as Hermitian if they are complex, or should I flag them as Hermitian in both cases?

1 Like

Hermitian in both cases should be fine — a `Hermitian{T}`

array of element type `T`

should be processed equivalently to `Symmetric{T}`

when `T`

is real.

1 Like

OK, thanks. What is the use of ‘Symmetric’ matrices then?

Frankly, I think they have fairly limited use. For real numbers they are equivalent, and for complex numbers there are very rare cases where you would be interested in a matrix being symmetric, not Hermitian. FWIW, it would be great to unify everything into Hermitian.

1 Like

I agree, it would avoid confusions and simplify the code.