Since my application is in physics, I created a specialized version of this question on physics.SE.

One can write a symmetric matrix $M \in \{\mathbb{R}, \mathbb{C}\}^{n \times n}$ in a half-vectorized representation, e.g., $$ M = \begin{bmatrix} a & b\\ b & c \end{bmatrix} \rightarrow \vec m = \begin{bmatrix} a\\ b\\ c \end{bmatrix}, $$ where the resulting vector $\vec m \in \{\mathbb{R}, \mathbb{C}\}^{n(n-1)/2}$ is either real or complex valued. Similarly, one can exploit the redundant information in a Hermitian matrix. If the technique above is applied, the resulting vector is a mixture of real values (main diagonal terms) and complex values (off-diagonal terms). For the implementation in strongly typed programming languages, a completely real valued representation would be helpful. Now there are several degrees of freedom how to arrange the main diagonal terms, the real part terms, and the imaginary part terms in an array.

Is there a standard way to split the real and imaginary part of the off-diagonal terms and write the matrix $M$ as real valued vector $\vec m \in \mathbb{R}^{n^2}$?

My approach would be to iterate over the matrix elements $M_{ij}$ and assign to the vector elements $$ m_{i + jN} = \begin{cases} M_{ij}, & i = j,\\ \Re\{M_{ij}\}, & i < j,\\ \Im\{M_{ij}\}, & i > j. \end{cases} $$ Does this arrangement have a certain name?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.