The Extreme.Mathematics.LinearAlgebra.Complex
namespace contains classes that implement complex valued vectors and matrices. The class hierarchy is almost
identical to that of real vectors and matrices. We only highlight the differences here.
Complex Vector Classes
The following table lists the complex equivalent of the real vector classes:
The complex dot product uses the conjugate of the first argument, so the dot product of a complex vector with
itself is always a real number.
Complex Matrix Classes
Most of the classes for real matrices have an equivalent complex matrix class. Complex symmetric matrices are
relatively uncommon. Much more common are hermitian matrices, whose components above the diagonal are the conjugate
of the corresponding element below the diagonal. For this reason, there is no ComplexSymmetricMatrix
class, but there is a new ComplexHermitianMatrix class that
represents hermitian matrices.
Complex matrices have four additional methods. GetRealPart()()() returns a real matrix with
the real components of each matrix element. GetImaginaryPart()()() returns a real
matrix with the imaginary components of each matrix element. Conjugate()()() returns a complex matrix whose
components are the conjugate of the corresponding component in the original matrix. ConjugateTranspose()()() returns a
complex matrix whose components are the conjugate of the corresponding component in the transpose of the original
matrix.
The following table lists the complex equivalent of the real matrix classes:
There are some additional differences, mainly related to the ComplexHermitianMatrix class. You can
only extract an upper triangular matrix from a Hermitian matrix if the Hermitian matrix' data is stored in the upper
triangular part. Likewise, you can only extract a lower triangular matrix if the Hermitian matrix' data is stored in
the lower triangular part.
For the same reason, the form of the complex Cholesky decomposition depends on how the data is stored. The
TriangularFactor
property of the ComplexCholeskyDecomposition class
returns a ComplexTriangularMatrix that is
upper triangular if the Hermitian matrix' data is stored in the upper triangular part, and lower triangular if the
Hermitian matrix' data is stored in the lower triangular part.